org.synyx.hades.sample.dao.impl
Class UserDaoJdbcImpl

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.jdbc.core.support.JdbcDaoSupport
          extended by org.springframework.jdbc.core.simple.SimpleJdbcDaoSupport
              extended by org.synyx.hades.sample.dao.impl.UserDaoJdbcImpl
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, UserDaoCustom

public class UserDaoJdbcImpl
extends org.springframework.jdbc.core.simple.SimpleJdbcDaoSupport
implements UserDaoCustom

Class with the implementation of the custom DAO code. Uses JDBC in this case. For basic programatic setup see UserDaoImpl for examples.

As you need to hand the instance a DataSource or SimpleJdbcTemplate you manually need to declare it as Spring bean:

 <hades:dao-config base-package="org.synyx.hades.sample.dao" />
 
 <bean id="userDaoImpl" class="...UserDaoJdbcImpl">
   <property name="dataSource" ref="dataSource" />
 </bean>
 
Using userDaoImpl will cause the DAO instance get this bean injected for custom DAO logic as the default postfix for custom DAO instances is Impl.

Author:
Oliver Gierke - gierke@synyx.de

Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
UserDaoJdbcImpl()
           
 
Method Summary
 java.util.List<User> myCustomBatchOperation()
          Custom DAO operation.
 
Methods inherited from class org.springframework.jdbc.core.simple.SimpleJdbcDaoSupport
getSimpleJdbcTemplate, initTemplateConfig
 
Methods inherited from class org.springframework.jdbc.core.support.JdbcDaoSupport
checkDaoConfig, createJdbcTemplate, getConnection, getDataSource, getExceptionTranslator, getJdbcTemplate, releaseConnection, setDataSource, setJdbcTemplate
 
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

UserDaoJdbcImpl

public UserDaoJdbcImpl()
Method Detail

myCustomBatchOperation

public java.util.List<User> myCustomBatchOperation()
Description copied from interface: UserDaoCustom
Custom DAO operation.

Specified by:
myCustomBatchOperation in interface UserDaoCustom
Returns:


Copyright © 2009-2010 Synyx GmbH & Co. KG. All Rights Reserved.