org.hdpagination.dataaccess.jdbc
Class AbstractNoParamBindJdbcQueryCallback
java.lang.Object
org.hdpagination.dataaccess.jdbc.AbstractJdbcQueryCallback
org.hdpagination.dataaccess.jdbc.AbstractNoParamBindJdbcQueryCallback
- All Implemented Interfaces:
- java.io.Serializable, QueryCallback, JdbcQueryCallback
public abstract class AbstractNoParamBindJdbcQueryCallback
- extends AbstractJdbcQueryCallback
A subclass of AbstractJdbcQueryCallback providing empty implementation of
setValues(PreparedStatement ps). It suits for query scenario where no parameters are
required to bind with.
- Since:
- 1.0
- Author:
- Liangfeng Ren
- See Also:
- Serialized Form
|
Method Summary |
abstract java.lang.Object |
processRow(java.sql.ResultSet rs)
Implementations implement this method to fetch each row of data in the ResultSet
and map the fetched data to an object of any type you wish and finally return it. |
void |
setValues(java.sql.PreparedStatement ps)
Do nothing |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractNoParamBindJdbcQueryCallback
public AbstractNoParamBindJdbcQueryCallback(java.lang.String queryStmt)
- Parameters:
queryStmt - The SQL statement to query
AbstractNoParamBindJdbcQueryCallback
public AbstractNoParamBindJdbcQueryCallback(java.lang.String queryStmt,
java.lang.String orderBy)
- Parameters:
queryStmt - The SQL to queryorderBy - column that will be added to the 'order by' clause of SQL statement
AbstractNoParamBindJdbcQueryCallback
public AbstractNoParamBindJdbcQueryCallback(java.lang.String queryStmt,
java.lang.String orderBy,
boolean ascending)
- Parameters:
queryStmt - The SQL to queryorderBy - column that will be added to the 'order by' clause of SQL statementascending - if sorted by ascending order
setValues
public void setValues(java.sql.PreparedStatement ps)
throws java.sql.SQLException
- Do nothing
- Specified by:
setValues in interface JdbcQueryCallback- Specified by:
setValues in class AbstractJdbcQueryCallback
- Throws:
java.sql.SQLException
processRow
public abstract java.lang.Object processRow(java.sql.ResultSet rs)
throws java.sql.SQLException
- Description copied from interface:
JdbcQueryCallback
- Implementations implement this method to fetch each row of data in the ResultSet
and map the fetched data to an object of any type you wish and finally return it.
Thus it provides the way of adding the fetched data in the type of any class you
prefer to the search result(java.util.List).
- Specified by:
processRow in interface JdbcQueryCallback- Specified by:
processRow in class AbstractJdbcQueryCallback
- Returns:
-
- Throws:
java.sql.SQLException
Copyright © 2008 HDPagination All Rights Reserved.