|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectwicket.contrib.phonebook.HibernateContactDao
public class HibernateContactDao
implements ContactDao.
| Constructor Summary | |
|---|---|
HibernateContactDao()
|
|
| Method Summary | |
|---|---|
protected org.hibernate.Query |
buildFindQuery(QueryParam qp,
Contact filter,
boolean count)
builds a query object to satisfy the provided parameters |
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. |
protected org.hibernate.Session |
getSession()
Helper method for retrieving hibernate session |
List<String> |
getUniqueLastNames()
Returns a list of unique last names |
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 |
setSessionFactory(org.hibernate.SessionFactory factory)
Setter for session factory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HibernateContactDao()
| Method Detail |
|---|
public void setSessionFactory(org.hibernate.SessionFactory factory)
factory - hibernate session factoryprotected org.hibernate.Session getSession()
public Contact load(long id)
Contact from the DB, given it's id .
load in interface ContactDaoid - The id of the Contact to load.
public Contact save(Contact contact)
save in interface ContactDaocontact -
public void delete(long id)
Contact from the DB, given it's id.
delete in interface ContactDaoid - The id of the Contact to delete.
public Iterator<Contact> find(QueryParam qp,
Contact filter)
find in interface ContactDaoqp - Query Parameters to use.
public int count(Contact filter)
count in interface ContactDaopublic List<String> getUniqueLastNames()
getUniqueLastNames in interface ContactDao
protected org.hibernate.Query buildFindQuery(QueryParam qp,
Contact filter,
boolean count)
qp - sorting and paging criteriafilter - filter criteriacount - true if this is a query meant to retrieve the number of rows
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||