net.sf.javaprinciples.persistence.db.jdbc
Class DaoSupport
java.lang.Object
net.sf.javaprinciples.persistence.db.jdbc.DaoSupport
public abstract class DaoSupport
- extends Object
Support class providing common functionality for Product and Task DAOs.
- Author:
- rvanluinen
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
jdbcTemplate
protected org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations jdbcTemplate
queryProvider
protected NamedQueryProvider queryProvider
sqlParameterSourceFactory
protected SqlParameterSourceFactory sqlParameterSourceFactory
DaoSupport
protected DaoSupport(org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations jdbcTemplate,
NamedQueryProvider queryProvider,
SqlParameterSourceFactory sqlParameterSourceFactory)
logException
protected void logException(String method,
org.springframework.dao.DataAccessException ex)
performInsert
protected long performInsert(org.springframework.jdbc.core.namedparam.SqlParameterSource parameterSource,
Enum<?> operation)
- Insert a row.
- Parameters:
parameterSource - The columns to persist, must not be nulloperation - The query to obtain to facilitate the insert. Must not be null.
- Returns:
- The primary key returned from the persistent store.
performQuery
protected <T> List<T> performQuery(org.springframework.jdbc.core.namedparam.SqlParameterSource parameterSource,
Enum<?> operation,
org.springframework.jdbc.core.simple.ParameterizedRowMapper<T> rowMapper)
performQueryForZeroToSingleResult
protected <T> T performQueryForZeroToSingleResult(org.springframework.jdbc.core.namedparam.SqlParameterSource parameterSource,
Enum<?> operation,
org.springframework.jdbc.core.simple.ParameterizedRowMapper<T> rowMapper)
performQueryForSingleResult
protected <T> T performQueryForSingleResult(org.springframework.jdbc.core.namedparam.SqlParameterSource parameterSource,
Enum<?> operation,
org.springframework.jdbc.core.simple.ParameterizedRowMapper<T> rowMapper)
performQueryForIntResult
protected int performQueryForIntResult(org.springframework.jdbc.core.namedparam.SqlParameterSource parameterSource,
Enum<?> operation)
getParameterSource
protected EnhancedBeanPropertySqlParameterSource getParameterSource()
getParameterSource
protected EnhancedBeanPropertySqlParameterSource getParameterSource(Object sourceBean)
setPrimaryKeyColumnName
public void setPrimaryKeyColumnName(String primaryKeyColumnName)
Copyright © 2013. All Rights Reserved.