org.hdpagination.dataaccess.support
Class QueryBuilder

java.lang.Object
  extended by org.hdpagination.dataaccess.support.QueryBuilder
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
HBN3QueryCallbackNamedParamWrapper, HBN3QueryCallbackWrapper, JdbcQueryCallbackWrapper, JPAQueryCallbackNamedParamWrapper, JPAQueryCallbackWrapper

public abstract class QueryBuilder
extends java.lang.Object
implements java.io.Serializable

Abstract base class for JdbcQueryCallbackWrapper, HBNQueryCallbackWrapper and JPAQueryCallbackWrapper to facilitate the generation of query.

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

Field Summary
protected  boolean asending
           
protected  java.lang.String countStatement
           
protected  java.lang.String orderBy
           
protected  java.lang.String selectFrom
           
 
Constructor Summary
QueryBuilder(java.lang.String selectFrom)
           
 
Method Summary
 java.lang.String getCountRecordsQueryStatement()
          Query statement to count total records.
 QueryOrder getQueryOrder()
          Order information used by query statement
 void setCountRecordsQueryStatement(java.lang.String countStmt)
          Query statement to count total records.
 void setQueryOrder(QueryOrder order)
          This method should never be called.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

selectFrom

protected java.lang.String selectFrom

countStatement

protected java.lang.String countStatement

orderBy

protected java.lang.String orderBy

asending

protected boolean asending
Constructor Detail

QueryBuilder

public QueryBuilder(java.lang.String selectFrom)
Parameters:
selectFrom - SELECT ... FROM .." statement
Method Detail

getCountRecordsQueryStatement

public 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:

setCountRecordsQueryStatement

public void setCountRecordsQueryStatement(java.lang.String countStmt)
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).

Parameters:
countStmt -

getQueryOrder

public QueryOrder getQueryOrder()
Order information used by query statement

Returns:

setQueryOrder

public void setQueryOrder(QueryOrder order)
This method should never be called. Only used by sort tags

Parameters:
order -


Copyright © 2008 HDPagination All Rights Reserved.