|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.query.PageableQuerySpec
wt.query.BasicPageableQuerySpec
This class provides a standard implementation for establishing a paging
session. It also extends the PageableQuerySpec and can be used to retrieve
an intial result page.
Supported API: true
Extendable: false
Field Summary | |
private boolean |
backgroundThreadEnabled
|
private static String |
CLASSNAME
|
static boolean |
DEBUG
|
private static DMLGenerator |
dmlGenerator
|
static long |
EXTERNALIZATION_VERSION_UID
|
private Object |
fetchInfo
|
private int |
groupFromIndex
|
private boolean |
isAllPersistable
|
private boolean |
limitModeEnabled
|
private static DebugWriter |
LOG
|
protected static long |
OLD_FORMAT_VERSION_UID
|
private int |
pageThreshold
|
private boolean |
pagingRuleHintEnabled
|
private int |
pagingSnapshotQueryLimit
|
private StatementSpec |
pagingSpec
|
private static String |
RESOURCE
|
private static String |
RULE_HINT
|
(package private) static long |
serialVersionUID
|
private StatementSpec |
snapshotSpec
|
Fields inherited from class wt.query.PageableQuerySpec |
|
Fields inherited from interface wt.query.PageableSessionQuerySpec |
BACKGROUND_THREAD_ENABLED, FETCH_INFO, GROUP_FROM_INDEX, LIMIT_MODE_ENABLED, OFFSET_BIND_INDEX, PAGE_THRESHOLD, PAGING_RULE_HINT_ENABLED, PAGING_SNAPSHOT_QUERY_LIMIT, PRIMARY_STATEMENT, RANGE_BIND_INDEX, SESSION_ID_BIND_INDEX, SNAPSHOT_SPEC |
Fields inherited from interface wt.pds.StatementSpec |
ADVANCED_QUERY, ADVANCED_QUERY_ENABLED, AGGREGATE_SELECT, CORRELATED_CLASS_ATTRIBUTES, FETCH_SIZE, PRIMARY_CLASS, QUERY_LIMIT, RESULT_BUILDER, RESULT_CURSOR, SINGLE_RESULT_COMPATIBLE, STATEMENT_BUILDER, USE_BIND |
Constructor Summary | |
BasicPageableQuerySpec()
|
Method Summary | |
private void |
appendOrderBy(QuerySpec pagingSpec,
int fromCount)
|
private void |
appendOrderBySelect(QuerySpec pagingSpec,
int fromCount,
boolean isSelectOnly)
|
private void |
buildSpecs(List a_objArray,
int a_groupFromIndex,
long a_sessionId)
|
private void |
buildSpecsInternal(QuerySpec snapshotSpec,
QuerySpec pagingSpec,
Hashtable aliasMap,
List objArray,
int groupFromIndex,
long sessionId)
|
private String[] |
getAliasArray(int count,
OrderByClause a_orderByClause)
|
private DMLGenerator |
getDMLGenerator()
|
Object |
getFetchInfo()
Gets the value of the attribute: fetchInfo. |
int |
getGroupFromIndex()
Gets the value of the attribute: groupFromIndex; Specifies a FromIndex from the snapshor query that will be used to group results for paging. |
private String[] |
getOrderAttribute(int fromCount)
|
int |
getPageThreshold()
Gets the value of the attribute: pageThreshold; Specifies threshold at which a paging session will be established. |
PagingSessionSpec |
getPagingSessionSpec(long a_sessionId,
int a_totalSize)
This method returns a PagingSessionSpec that can be used to fetch subsequent pages for the established session. |
PagingSessionSpec |
getPagingSessionSpec(long a_sessionId,
int a_totalSize,
List a_objArray,
int a_groupFromIndex)
This method returns a PagingSessionSpec that can be used to fetch subsequent pages for the established session. |
int |
getPagingSnapshotQueryLimit()
Gets the value of the attribute: pagingSnapshotQueryLimit; Specifies the limit for the number of paging snapshot query result. |
StatementSpec |
getPrimaryStatement()
Gets the object for the association that plays role: primaryStatement. |
StatementSpec |
getSnapshotSpec()
Gets the value of the attribute: snapshotSpec; StatementSpec instance used to retrieve the intial "snapshot" of the entire results for a paging session. |
boolean |
isBackgroundThreadEnabled()
Gets the value of the attribute: backgroundThreadEnabled. |
boolean |
isLimitModeEnabled()
Gets the value of the attribute: limitModeEnabled. |
boolean |
isPagingRuleHintEnabled()
Gets the value of the attribute: pagingRuleHintEnabled. |
void |
readExternal(ObjectInput input)
Reads the non-transient fields of this class from an external source. |
private boolean |
readOldVersion(ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source, which is not the current version. |
protected boolean |
readVersion(BasicPageableQuerySpec thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
private void |
respecifyOrderSelect(QuerySpec a_spec,
String[] a_alias)
|
void |
setBackgroundThreadEnabled(boolean a_BackgroundThreadEnabled)
Sets the value of the attribute: backgroundThreadEnabled. |
void |
setFetchInfo(Object a_FetchInfo)
Sets the value of the attribute: fetchInfo. |
void |
setGroupFromIndex(int a_GroupFromIndex)
Sets the value of the attribute: groupFromIndex; Specifies a FromIndex from the snapshor query that will be used to group results for paging. |
void |
setLimitModeEnabled(boolean a_LimitModeEnabled)
Sets the value of the attribute: limitModeEnabled. |
void |
setPageThreshold(int a_PageThreshold)
Sets the value of the attribute: pageThreshold; Specifies threshold at which a paging session will be established. |
void |
setPagingRuleHintEnabled(boolean a_PagingRuleHintEnabled)
Sets the value of the attribute: pagingRuleHintEnabled. |
void |
setPagingSnapshotQueryLimit(int a_PagingSnapshotQueryLimit)
Sets the value of the attribute: pagingSnapshotQueryLimit; Specifies the limit for the number of paging snapshot query result. |
void |
setPrimaryStatement(StatementSpec a_PrimaryStatement)
Sets the object for the association that plays role: primaryStatement. |
String |
toString()
|
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private int groupFromIndex
private int pageThreshold
private int pagingSnapshotQueryLimit
private boolean limitModeEnabled
private Object fetchInfo
private boolean backgroundThreadEnabled
private boolean pagingRuleHintEnabled
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
public static final boolean DEBUG
private static final DebugWriter LOG
private transient StatementSpec snapshotSpec
private transient StatementSpec pagingSpec
private transient boolean isAllPersistable
private static DMLGenerator dmlGenerator
private static final String RULE_HINT
Constructor Detail |
public BasicPageableQuerySpec()
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class PageableQuerySpec
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class PageableQuerySpec
input
-
IOException
ClassNotFoundException
protected boolean readVersion(BasicPageableQuerySpec thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public StatementSpec getSnapshotSpec() throws WTException
getSnapshotSpec
in interface PageableSessionQuerySpec
WTException
public int getGroupFromIndex()
getGroupFromIndex
in interface PageableSessionQuerySpec
public void setGroupFromIndex(int a_GroupFromIndex) throws WTPropertyVetoException
setGroupFromIndex
in interface PageableSessionQuerySpec
a_GroupFromIndex
-
WTPropertyVetoException
public int getPageThreshold()
getPageThreshold
in interface PageableSessionQuerySpec
public void setPageThreshold(int a_PageThreshold) throws WTPropertyVetoException
setPageThreshold
in interface PageableSessionQuerySpec
a_PageThreshold
-
WTPropertyVetoException
public int getPagingSnapshotQueryLimit()
getPagingSnapshotQueryLimit
in interface PageableSessionQuerySpec
public void setPagingSnapshotQueryLimit(int a_PagingSnapshotQueryLimit) throws WTPropertyVetoException
setPagingSnapshotQueryLimit
in interface PageableSessionQuerySpec
a_PagingSnapshotQueryLimit
-
WTPropertyVetoException
public boolean isLimitModeEnabled()
isLimitModeEnabled
in interface PageableSessionQuerySpec
public void setLimitModeEnabled(boolean a_LimitModeEnabled)
setLimitModeEnabled
in interface PageableSessionQuerySpec
a_LimitModeEnabled
- public Object getFetchInfo()
getFetchInfo
in interface PageableSessionQuerySpec
public void setFetchInfo(Object a_FetchInfo)
setFetchInfo
in interface PageableSessionQuerySpec
a_FetchInfo
- public boolean isBackgroundThreadEnabled()
isBackgroundThreadEnabled
in interface PageableSessionQuerySpec
public void setBackgroundThreadEnabled(boolean a_BackgroundThreadEnabled)
setBackgroundThreadEnabled
in interface PageableSessionQuerySpec
a_BackgroundThreadEnabled
- public boolean isPagingRuleHintEnabled()
isPagingRuleHintEnabled
in interface PageableSessionQuerySpec
public void setPagingRuleHintEnabled(boolean a_PagingRuleHintEnabled)
setPagingRuleHintEnabled
in interface PageableSessionQuerySpec
a_PagingRuleHintEnabled
- public PagingSessionSpec getPagingSessionSpec(long a_sessionId, int a_totalSize, List a_objArray, int a_groupFromIndex) throws WTException
getPagingSessionSpec
in interface PageableSessionQuerySpec
a_sessionId
- uniquely idnentifies the paging sessiona_totalSize
- specifies the total number of results that can be paged througha_objArray
- a_groupFromIndex
-
WTException
public PagingSessionSpec getPagingSessionSpec(long a_sessionId, int a_totalSize) throws WTException
getPagingSessionSpec
in interface PageableSessionQuerySpec
a_sessionId
- uniquely idnentifies the paging sessiona_totalSize
- specifies the total number of results that can be paged through
WTException
public StatementSpec getPrimaryStatement()
getPrimaryStatement
in interface PageableSessionQuerySpec
getPrimaryStatement
in class PageableQuerySpec
public void setPrimaryStatement(StatementSpec a_PrimaryStatement) throws WTPropertyVetoException
setPrimaryStatement
in interface PageableSessionQuerySpec
setPrimaryStatement
in class PageableQuerySpec
a_PrimaryStatement
-
WTPropertyVetoException
public String toString()
private void buildSpecs(List a_objArray, int a_groupFromIndex, long a_sessionId) throws WTException
WTException
private void buildSpecsInternal(QuerySpec snapshotSpec, QuerySpec pagingSpec, Hashtable aliasMap, List objArray, int groupFromIndex, long sessionId) throws WTException, WTPropertyVetoException
WTException
WTPropertyVetoException
private void appendOrderBy(QuerySpec pagingSpec, int fromCount) throws WTException
WTException
private void appendOrderBySelect(QuerySpec pagingSpec, int fromCount, boolean isSelectOnly) throws WTException
WTException
private void respecifyOrderSelect(QuerySpec a_spec, String[] a_alias) throws WTException, WTPropertyVetoException
WTException
WTPropertyVetoException
private String[] getOrderAttribute(int fromCount)
private String[] getAliasArray(int count, OrderByClause a_orderByClause)
private DMLGenerator getDMLGenerator()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |