wicket.contrib.phonebook
Class IbatisContactDao

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.ibatis.support.SqlMapClientDaoSupport
          extended by wicket.contrib.phonebook.IbatisContactDao
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, ContactDao

public class IbatisContactDao
extends org.springframework.orm.ibatis.support.SqlMapClientDaoSupport
implements ContactDao

implements ContactDao.

Author:
igor

Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
IbatisContactDao()
           
 
Method Summary
 int count(Contact filter)
          Return the number of Configs 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 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
 
Methods inherited from class org.springframework.orm.ibatis.support.SqlMapClientDaoSupport
checkDaoConfig, getDataSource, getSqlMapClient, getSqlMapClientTemplate, setDataSource, setSqlMapClient, setSqlMapClientTemplate
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IbatisContactDao

public IbatisContactDao()
Method Detail

load

public Contact load(long id)
             throws org.springframework.dao.DataAccessException
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
Throws:
org.springframework.dao.DataAccessException

save

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

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

delete

public void delete(long id)
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)
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)
Return the number of Configs in the DB.

Specified by:
count in interface ContactDao
Returns:
count

getUniqueLastNames

public List<String> getUniqueLastNames()
Returns a list of unique last names

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


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