wicket.contrib.phonebook
Class ShadesContactDao

java.lang.Object
  extended by wicket.contrib.phonebook.ShadesContactDao
All Implemented Interfaces:
ContactDao

public class ShadesContactDao
extends Object
implements ContactDao

Author:
Geoffrey Rummens Hendrey

Constructor Summary
ShadesContactDao()
          Creates a new instance of ShadesContactDao
 
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.
 DataSource getDataSource()
           
 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
 void setDataSource(DataSource ds)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShadesContactDao

public ShadesContactDao()
Creates a new instance of ShadesContactDao

Method Detail

load

public Contact load(long id)
Description copied from interface: ContactDao
Load a Contact from the DB, given it's id.

Specified by:
load in interface ContactDao
Parameters:
id - The id of the Contact to load.
Returns:
Contact

save

public Contact save(Contact contact)
Description copied from interface: ContactDao
Save the contact to the DB

Specified by:
save in interface ContactDao
Returns:
persistent instance of contact

delete

public void delete(long id)
Description copied from interface: ContactDao
Delete a Contact from the DB, given it's id.

Specified by:
delete in interface ContactDao
Parameters:
id - The id of the Contact to delete.

find

public Iterator<Contact> find(QueryParam qp,
                              Contact filter)
Description copied from interface: ContactDao
Query the DB, using the supplied query details.

Specified by:
find in interface ContactDao
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: ContactDao
Return the number of Contacts in the DB.

Specified by:
count in interface ContactDao
Returns:
count

getUniqueLastNames

public List<String> getUniqueLastNames()
Description copied from interface: ContactDao
Returns the list of all unique last names in the database

Specified by:
getUniqueLastNames in interface ContactDao
Returns:
the list of all unique last names in the database

setDataSource

public final void setDataSource(DataSource ds)

getDataSource

public final DataSource getDataSource()


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