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,
org.apache.wicket.extensions.markup.html.repeater.util.SortParam sort)
select contacts and apply sort
|
Contact |
get(long id)
find contact by id
|
int |
getCount() |
List<Contact> |
getIndex(org.apache.wicket.extensions.markup.html.repeater.util.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, org.apache.wicket.extensions.markup.html.repeater.util.SortParam sort)
first - count - sort - public List<Contact> getIndex(org.apache.wicket.extensions.markup.html.repeater.util.SortParam sort)
public int getCount()
public void save(Contact contact)
contact - public void delete(Contact contact)
contact - Copyright © 2017. All rights reserved.