org.hdpagination.dataaccess.orm.hibernate2
Class NoParamBindHBN2QueryCallback

java.lang.Object
  extended by org.hdpagination.dataaccess.orm.hibernate2.AbstractHBN2QueryCallback
      extended by org.hdpagination.dataaccess.orm.hibernate2.NoParamBindHBN2QueryCallback
All Implemented Interfaces:
java.io.Serializable, QueryCallback, HBN2QueryCallback
Direct Known Subclasses:
DefaultHBN2QueryCallback

public abstract class NoParamBindHBN2QueryCallback
extends AbstractHBN2QueryCallback

A subclass of AbstractHBN2QueryCallback providing empty implementation of setValues(Query query). It suits for query scenario where no parameters are required to bind with.

Since:
1.0
Author:
Liangfeng Ren
See Also:
Serialized Form

Constructor Summary
NoParamBindHBN2QueryCallback(java.lang.String queryStmt)
           
NoParamBindHBN2QueryCallback(java.lang.String queryStmt, java.lang.String orderBy)
           
NoParamBindHBN2QueryCallback(java.lang.String queryStmt, java.lang.String orderBy, boolean ascending)
           
 
Method Summary
abstract  java.util.List processQueriedResult(java.util.List queriedResult)
          process the result from calling net.sf.hibernate.Query.list() method in Hibernate2QueryTemplate.query(QueryCallback callback, int pageSize, int pageNo), and the value(java.util.List) returned by current method will be used as the return value of Hibernate2QueryTemplate.query(QueryCallback callback, int pageSize, int pageNo).
 void setValues(net.sf.hibernate.Query query)
          Do nothing
 
Methods inherited from class org.hdpagination.dataaccess.orm.hibernate2.AbstractHBN2QueryCallback
getCountRecordsQueryStatement, getQueryOrder, getQueryStatement, setCountRecordsQueryStatement, setQueryOrder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoParamBindHBN2QueryCallback

public NoParamBindHBN2QueryCallback(java.lang.String queryStmt)
Parameters:
queryStmt - HQL statement

NoParamBindHBN2QueryCallback

public NoParamBindHBN2QueryCallback(java.lang.String queryStmt,
                                    java.lang.String orderBy)
Parameters:
queryStmt - HQL statement
orderBy - column that will be added to the 'order by' clause of HQL statement

NoParamBindHBN2QueryCallback

public NoParamBindHBN2QueryCallback(java.lang.String queryStmt,
                                    java.lang.String orderBy,
                                    boolean ascending)
Parameters:
queryStmt - HQL statement
orderBy - column that will be added to the 'order by' clause of HQL statement
ascending - if sorted by ascending order
Method Detail

setValues

public void setValues(net.sf.hibernate.Query query)
Do nothing

Specified by:
setValues in interface HBN2QueryCallback
Specified by:
setValues in class AbstractHBN2QueryCallback

processQueriedResult

public abstract java.util.List processQueriedResult(java.util.List queriedResult)
Description copied from interface: HBN2QueryCallback
process the result from calling net.sf.hibernate.Query.list() method in Hibernate2QueryTemplate.query(QueryCallback callback, int pageSize, int pageNo), and the value(java.util.List) returned by current method will be used as the return value of Hibernate2QueryTemplate.query(QueryCallback callback, int pageSize, int pageNo).

Specified by:
processQueriedResult in interface HBN2QueryCallback
Specified by:
processQueriedResult in class AbstractHBN2QueryCallback
Returns:


Copyright © 2008 HDPagination All Rights Reserved.