org.hdpagination.core
Interface QueryCallback

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
HBN2QueryCallback, HBN3QueryCallback, JdbcQueryCallback, JPAQueryCallback
All Known Implementing Classes:
AbstractColumnMapJdbcQueryCallback, AbstractHBN2QueryCallback, AbstractHBN3QueryCallback, AbstractJdbcQueryCallback, AbstractJPAQueryCallback, AbstractNoParamBindJdbcQueryCallback, DefaultHBN2QueryCallback, DefaultHBN3QueryCallback, DefaultJdbcQueryCallback, DefaultJPAQueryCallback, HBN3QueryCallbackNamedParamWrapper, HBN3QueryCallbackWrapper, JdbcQueryCallbackWrapper, JPAQueryCallbackNamedParamWrapper, JPAQueryCallbackWrapper, NoParamBindHBN2QueryCallback, NoParamBindHBN3QueryCallback, NoParamBindJPAQueryCallback, NotProcessResultHBN2QueryCallback, NotProcessResultHBN3QueryCallback, NotProcessResultJPAQueryCallback

public interface QueryCallback
extends java.io.Serializable

An interface defining the type of callback object which is generated by custom action class based on the received request parameters and passed to query engine class to execute query.

Different types of persistency technologies have their QueryCallback sub interfaces, such as:

They define their own methods about how to execute query, but they share some common features such as:

It's important to choose the correct QueryCallback type to return in your custom action class and the type should match with the injected QueryTemplate

Since:
1.0
Author:
Liangfeng Ren

Method Summary
 java.lang.String getCountRecordsQueryStatement()
          Query statement to count total records.
 QueryOrder getQueryOrder()
          Order information used by query statement
 java.lang.String getQueryStatement()
          Query statement(e.g.
 void setQueryOrder(QueryOrder order)
          Set order information used by query statement
 

Method Detail

getQueryStatement

java.lang.String getQueryStatement()
Query statement(e.g. sql for JDBC and queryString for Hibernate)

Returns:

getCountRecordsQueryStatement

java.lang.String getCountRecordsQueryStatement()
Query statement to count total records. If this property is not provided, the corresponding QueryTemplate will do some auto translation to generate the "count query statement" based on "queryStatement" property and related persistence technology or database provides (e.g. the way of translation is different between Hibernate and JDBC, Oracle and DB2).

Returns:

getQueryOrder

QueryOrder getQueryOrder()
Order information used by query statement

Returns:

setQueryOrder

void setQueryOrder(QueryOrder order)
Set order information used by query statement

Parameters:
order -


Copyright © 2008 HDPagination All Rights Reserved.