wicket.contrib.phonebook
Interface ContactDao

All Known Implementing Classes:
HibernateContactDao, IbatisContactDao, ShadesContactDao

public interface ContactDao

The implementation-independent DAO interface. Defines the operations required to be supported by an implementation.

Author:
igor

Method Summary
 int count(Contact filter)
          Return the number of Contacts in the DB.
 void delete(long id)
          Delete a Contact from the DB, given it's id.
 Iterator<Contact> find(QueryParam qp, Contact filter)
          Query the DB, using the supplied query details.
 List<String> getUniqueLastNames()
          Returns the list of all unique last names in the database
 Contact load(long id)
          Load a Contact from the DB, given it's id.
 Contact save(Contact contact)
          Save the contact to the DB
 

Method Detail

load

Contact load(long id)
Load a Contact from the DB, given it's id.

Parameters:
id - The id of the Contact to load.
Returns:
Contact

save

Contact save(Contact contact)
Save the contact to the DB

Parameters:
contact -
Returns:
persistent instance of contact

delete

void delete(long id)
Delete a Contact from the DB, given it's id.

Parameters:
id - The id of the Contact to delete.

find

Iterator<Contact> find(QueryParam qp,
                       Contact filter)
Query the DB, using the supplied query details.

Parameters:
qp - Query Paramaters to use.
Returns:
The results of the query as an Iterator.

count

int count(Contact filter)
Return the number of Contacts in the DB.

Returns:
count

getUniqueLastNames

List<String> getUniqueLastNames()
Returns the list of all unique last names in the database

Returns:
the list of all unique last names in the database


Copyright © 2005-2012 Wicket developers. All Rights Reserved.