jp.terasoluna.fw.web.struts.action
Class DBMessageBeanMappingSqlQuery

java.lang.Object
  extended by org.springframework.jdbc.object.RdbmsOperation
      extended by org.springframework.jdbc.object.SqlOperation
          extended by org.springframework.jdbc.object.SqlQuery
              extended by org.springframework.jdbc.object.MappingSqlQueryWithParameters
                  extended by org.springframework.jdbc.object.MappingSqlQuery
                      extended by jp.terasoluna.fw.web.struts.action.DBMessageBeanMappingSqlQuery
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean

public class DBMessageBeanMappingSqlQuery
extends org.springframework.jdbc.object.MappingSqlQuery

This is the implementation class of MappingSqlQuery. It implements the method which fills the DBMessageBean instance with the rows fetched from DB and returns the DBMessageBean instance.

See Also:
DBMessageBean, MessageResourcesDAOImpl

Nested Class Summary
 
Nested classes/interfaces inherited from class org.springframework.jdbc.object.MappingSqlQueryWithParameters
org.springframework.jdbc.object.MappingSqlQueryWithParameters.RowMapperImpl
 
Field Summary
private static java.lang.String DB_MESSAGE_BEAN_MAPPING_SQL_QUERY
          Error code indicating that an error is observed in SQL settings.
private static org.apache.commons.logging.Log log
          Log class.
 
Fields inherited from class org.springframework.jdbc.object.RdbmsOperation
logger
 
Constructor Summary
DBMessageBeanMappingSqlQuery(javax.sql.DataSource dataSource, java.lang.String sql)
          Constructor.
 
Method Summary
protected  DBMessageBean createDBMessageBean(java.sql.ResultSet rs)
          Fills DBMessageBean with row and returns DBMessageBean.
protected  DBMessageBean mapRow(java.sql.ResultSet rs, int rowNum)
          Fills DBMessageBean with row and returns DBMessageBean.
 
Methods inherited from class org.springframework.jdbc.object.MappingSqlQuery
mapRow
 
Methods inherited from class org.springframework.jdbc.object.MappingSqlQueryWithParameters
newRowMapper
 
Methods inherited from class org.springframework.jdbc.object.SqlQuery
execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, executeByNamedParam, executeByNamedParam, findObject, findObject, findObject, findObject, findObject, findObject, findObject, findObject, findObject, findObject, findObjectByNamedParam, findObjectByNamedParam, getRowsExpected, setRowsExpected
 
Methods inherited from class org.springframework.jdbc.object.SqlOperation
compileInternal, getParsedSql, newPreparedStatementCreator, newPreparedStatementCreator, newPreparedStatementSetter, onCompileInternal
 
Methods inherited from class org.springframework.jdbc.object.RdbmsOperation
afterPropertiesSet, allowsUnusedParameters, checkCompiled, compile, declareParameter, getDeclaredParameters, getGeneratedKeysColumnNames, getJdbcTemplate, getResultSetType, getSql, isCompiled, isReturnGeneratedKeys, isUpdatableResults, setDataSource, setFetchSize, setGeneratedKeysColumnNames, setJdbcTemplate, setMaxRows, setParameters, setQueryTimeout, setResultSetType, setReturnGeneratedKeys, setSql, setTypes, setUpdatableResults, supportsLobParameters, validateNamedParameters, validateParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DB_MESSAGE_BEAN_MAPPING_SQL_QUERY

private static final java.lang.String DB_MESSAGE_BEAN_MAPPING_SQL_QUERY
Error code indicating that an error is observed in SQL settings.

See Also:
Constant Field Values

log

private static org.apache.commons.logging.Log log
Log class.

Constructor Detail

DBMessageBeanMappingSqlQuery

DBMessageBeanMappingSqlQuery(javax.sql.DataSource dataSource,
                             java.lang.String sql)
Constructor.

Parameters:
dataSource - Data source
sql - SQL
Method Detail

mapRow

protected DBMessageBean mapRow(java.sql.ResultSet rs,
                               int rowNum)
                        throws java.sql.SQLException
Fills DBMessageBean with row and returns DBMessageBean.

Specified by:
mapRow in class org.springframework.jdbc.object.MappingSqlQuery
Parameters:
rs - Rows
rowNum - Row number being processed
Returns:
DBMessageBean which is filled with the row
Throws:
java.sql.SQLException - When there is a error in the set SQL

createDBMessageBean

protected DBMessageBean createDBMessageBean(java.sql.ResultSet rs)
                                     throws java.sql.SQLException
Fills DBMessageBean with row and returns DBMessageBean.

Parameters:
rs - Row
Returns:
DBMessageBean which is filled with the row
Throws:
java.sql.SQLException - When there is a error in the set SQL