public class ContactsDatabase extends Object
Constructor and Description |
---|
ContactsDatabase(int count)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected void |
add(Contact contact) |
void |
delete(Contact contact)
delete contact from the database
|
List<Contact> |
find(long first,
long count,
SortParam sort)
select contacts and apply sort
|
Contact |
get(long id)
find contact by id
|
int |
getCount() |
List<Contact> |
getIndex(SortParam sort) |
void |
save(Contact contact)
add contact to the database
|
public ContactsDatabase(int count)
count
- number of contacts to generate at startuppublic Contact get(long id)
id
- protected void add(Contact contact)
public List<Contact> find(long first, long count, SortParam sort)
first
- count
- sort
- public int getCount()
public void save(Contact contact)
contact
- public void delete(Contact contact)
contact
- Copyright © 2006–2022 Apache Software Foundation. All rights reserved.