Package wicket.contrib.phonebook
Class ShadesContactDao
- java.lang.Object
-
- wicket.contrib.phonebook.ShadesContactDao
-
- All Implemented Interfaces:
ContactDao
public class ShadesContactDao extends Object implements ContactDao
- Author:
- Geoffrey Rummens Hendrey
-
-
Constructor Summary
Constructors Constructor Description ShadesContactDao()Creates a new instance of ShadesContactDao
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcount(Contact filter)Return the number of Contacts in the DB.voiddelete(long id)Delete aContactfrom the DB, given it's id.Iterator<Contact>find(QueryParam qp, Contact filter)Query the DB, using the supplied query details.DataSourcegetDataSource()List<String>getUniqueLastNames()Returns the list of all unique last names in the databaseContactload(long id)Load aContactfrom the DB, given it's id.Contactsave(Contact contact)Save the contact to the DBvoidsetDataSource(DataSource ds)
-
-
-
Method Detail
-
load
public Contact load(long id)
Description copied from interface:ContactDaoLoad aContactfrom the DB, given it's id.- Specified by:
loadin interfaceContactDao- Parameters:
id- The id of the Contact to load.- Returns:
- Contact
-
save
public Contact save(Contact contact)
Description copied from interface:ContactDaoSave the contact to the DB- Specified by:
savein interfaceContactDao- Returns:
- persistent instance of contact
-
delete
public void delete(long id)
Description copied from interface:ContactDaoDelete aContactfrom the DB, given it's id.- Specified by:
deletein interfaceContactDao- Parameters:
id- The id of the Contact to delete.
-
find
public Iterator<Contact> find(QueryParam qp, Contact filter)
Description copied from interface:ContactDaoQuery the DB, using the supplied query details.- Specified by:
findin interfaceContactDao- Parameters:
qp- Query Paramaters to use.- Returns:
- The results of the query as an Iterator.
-
count
public int count(Contact filter)
Description copied from interface:ContactDaoReturn the number of Contacts in the DB.- Specified by:
countin interfaceContactDao- Returns:
- count
-
getUniqueLastNames
public List<String> getUniqueLastNames()
Description copied from interface:ContactDaoReturns the list of all unique last names in the database- Specified by:
getUniqueLastNamesin interfaceContactDao- Returns:
- the list of all unique last names in the database
-
setDataSource
public final void setDataSource(DataSource ds)
-
getDataSource
public final DataSource getDataSource()
-
-