|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.jdbc.object.RdbmsOperation
org.springframework.jdbc.object.SqlOperation
org.springframework.jdbc.object.SqlQuery
org.springframework.jdbc.object.MappingSqlQueryWithParameters
org.springframework.jdbc.object.MappingSqlQuery
jp.terasoluna.fw.web.codelist.DBCodeListQuery
public class DBCodeListQuery
RDBMS operation class that fetches the code list from the database.
Code list can be fetched from database by specifying the SQL statement and the data-source to be used to connect with the database as constructor.
This class is used only in
DBCodeListLoader
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.springframework.jdbc.object.MappingSqlQueryWithParameters |
---|
org.springframework.jdbc.object.MappingSqlQueryWithParameters.RowMapperImpl |
Field Summary |
---|
Fields inherited from class org.springframework.jdbc.object.RdbmsOperation |
---|
logger |
Constructor Summary | |
---|---|
DBCodeListQuery(javax.sql.DataSource dataSource,
java.lang.String sql)
Constructor that performs the settings of datasource and SQL statement. |
Method Summary | |
---|---|
private CodeBean |
createCodeBean(java.sql.ResultSet rs)
Fetches the value from ResultSet and generates CodeBean instance. |
protected java.lang.Object |
mapRow(java.sql.ResultSet rs,
int rowNum)
This method is called at the time of fetching each row. |
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 |
Constructor Detail |
---|
public DBCodeListQuery(javax.sql.DataSource dataSource, java.lang.String sql)
dataSource
- Data source which is used to connect to the database. sql
- SQL statement used for fetching code list.Method Detail |
---|
protected java.lang.Object mapRow(java.sql.ResultSet rs, int rowNum) throws java.sql.SQLException
Consider the first row as "id" and 2nd row as "name" and link the value retreived from database with CodeBean intance.
mapRow
in class org.springframework.jdbc.object.MappingSqlQuery
rs
- ResultSet that contains the current row information.rowNum
- Row number that is being currently referred. (First is 0th row)
java.sql.SQLException
- SQL exception.private CodeBean createCodeBean(java.sql.ResultSet rs) throws java.sql.SQLException
rs
- ResultSet that retains the value.
java.sql.SQLException
- SQL exception.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |