wt.query
Interface PageableSessionQuerySpec

All Superinterfaces:
StatementSpec
All Known Implementing Classes:
BasicPageableQuerySpec

public interface PageableSessionQuerySpec
extends StatementSpec

This interface specifies the abstractions necessary to establish a persistent paging session.

Supported API: true

Extendable: false


Field Summary
static String BACKGROUND_THREAD_ENABLED
          Label for the attribute.
static String FETCH_INFO
          Label for the attribute.
static String GROUP_FROM_INDEX
          Label for the attribute; Specifies a FromIndex from the snapshor query that will be used to group results for paging.
static String LIMIT_MODE_ENABLED
          Label for the attribute.
static int OFFSET_BIND_INDEX
           
static String PAGE_THRESHOLD
          Label for the attribute; Specifies threshold at which a paging session will be established.
static String PAGING_RULE_HINT_ENABLED
          Label for the attribute.
static String PAGING_SNAPSHOT_QUERY_LIMIT
          Label for the attribute; Specifies the limit for the number of paging snapshot query result.
static String PRIMARY_STATEMENT
          Label for the attribute.
static int RANGE_BIND_INDEX
           
static int SESSION_ID_BIND_INDEX
           
static String SNAPSHOT_SPEC
          Label for the attribute; StatementSpec instance used to retrieve the intial "snapshot" of the entire results for a paging session.
 
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
 
Method Summary
 Object getFetchInfo()
          Gets the value of the attribute: FETCH_INFO.
 int getGroupFromIndex()
          Gets the value of the attribute: GROUP_FROM_INDEX.
 int getPageThreshold()
          Gets the value of the attribute: PAGE_THRESHOLD.
 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: PAGING_SNAPSHOT_QUERY_LIMIT.
 StatementSpec getPrimaryStatement()
          Gets the object for the association that plays role: PRIMARY_STATEMENT.
 StatementSpec getSnapshotSpec()
          Gets the value of the attribute: SNAPSHOT_SPEC.
 boolean isBackgroundThreadEnabled()
          Gets the value of the attribute: BACKGROUND_THREAD_ENABLED.
 boolean isLimitModeEnabled()
          Gets the value of the attribute: LIMIT_MODE_ENABLED.
 boolean isPagingRuleHintEnabled()
          Gets the value of the attribute: PAGING_RULE_HINT_ENABLED.
 void setBackgroundThreadEnabled(boolean a_BackgroundThreadEnabled)
          Sets the value of the attribute: BACKGROUND_THREAD_ENABLED.
 void setFetchInfo(Object a_FetchInfo)
          Sets the value of the attribute: FETCH_INFO.
 void setGroupFromIndex(int a_GroupFromIndex)
          Sets the value of the attribute: GROUP_FROM_INDEX.
 void setLimitModeEnabled(boolean a_LimitModeEnabled)
          Sets the value of the attribute: LIMIT_MODE_ENABLED.
 void setPageThreshold(int a_PageThreshold)
          Sets the value of the attribute: PAGE_THRESHOLD.
 void setPagingRuleHintEnabled(boolean a_PagingRuleHintEnabled)
          Sets the value of the attribute: PAGING_RULE_HINT_ENABLED.
 void setPagingSnapshotQueryLimit(int a_PagingSnapshotQueryLimit)
          Sets the value of the attribute: PAGING_SNAPSHOT_QUERY_LIMIT.
 void setPrimaryStatement(StatementSpec a_PrimaryStatement)
          Sets the object for the association that plays role: PRIMARY_STATEMENT.
 
Methods inherited from interface wt.pds.StatementSpec
getBindParameterCount, getCorrelatedClassAttributes, getFetchSize, getPrimaryClass, getQueryLimit, getResultBuilder, getResultCursor, getStatementBuilder, isAdvancedQuery, isAdvancedQueryEnabled, isAggregateSelect, isSingleResultCompatible, isUseBind, setAdvancedQueryEnabled, setBindParameterAt, setFetchSize, setLocale, setUseBind
 

Field Detail

SNAPSHOT_SPEC

public static final String SNAPSHOT_SPEC
Label for the attribute; StatementSpec instance used to retrieve the intial "snapshot" of the entire results for a paging session.

Supported API: false

See Also:
Constant Field Values

GROUP_FROM_INDEX

public static final String GROUP_FROM_INDEX
Label for the attribute; Specifies a FromIndex from the snapshor query that will be used to group results for paging.

Supported API: true

See Also:
Constant Field Values

PAGE_THRESHOLD

public static final String PAGE_THRESHOLD
Label for the attribute; Specifies threshold at which a paging session will be established. If the snapshot query contains fewer items than this threshold, then those items will be returned and no paging session will be established. The default value for this attribute is obtained from the system property "wt.pom.paging.threshold".

Supported API: true

See Also:
Constant Field Values

PAGING_SNAPSHOT_QUERY_LIMIT

public static final String PAGING_SNAPSHOT_QUERY_LIMIT
Label for the attribute; Specifies the limit for the number of paging snapshot query result. If the snapshot query reach the limit , a PersistenceException will be thrown with proper message. The default value for this attribute is obtained from the system property "wt.pom.paging.snapshotQueryLimit".

Supported API: false

See Also:
Constant Field Values

LIMIT_MODE_ENABLED

public static final String LIMIT_MODE_ENABLED
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

FETCH_INFO

public static final String FETCH_INFO
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

BACKGROUND_THREAD_ENABLED

public static final String BACKGROUND_THREAD_ENABLED
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

PAGING_RULE_HINT_ENABLED

public static final String PAGING_RULE_HINT_ENABLED
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

PRIMARY_STATEMENT

public static final String PRIMARY_STATEMENT
Label for the attribute.

Supported API: true

See Also:
Constant Field Values

SESSION_ID_BIND_INDEX

public static final int SESSION_ID_BIND_INDEX
See Also:
Constant Field Values

OFFSET_BIND_INDEX

public static final int OFFSET_BIND_INDEX
See Also:
Constant Field Values

RANGE_BIND_INDEX

public static final int RANGE_BIND_INDEX
See Also:
Constant Field Values
Method Detail

getSnapshotSpec

public StatementSpec getSnapshotSpec()
                              throws WTException
Gets the value of the attribute: SNAPSHOT_SPEC. StatementSpec instance used to retrieve the intial "snapshot" of the entire results for a paging session.

Supported API: false

Returns:
StatementSpec
Throws:
WTException

getGroupFromIndex

public int getGroupFromIndex()
Gets the value of the attribute: GROUP_FROM_INDEX. Specifies a FromIndex from the snapshor query that will be used to group results for paging.

Supported API: true

Returns:
int

setGroupFromIndex

public void setGroupFromIndex(int a_GroupFromIndex)
                       throws WTPropertyVetoException
Sets the value of the attribute: GROUP_FROM_INDEX. Specifies a FromIndex from the snapshor query that will be used to group results for paging.

Supported API: true

Parameters:
a_GroupFromIndex -
Throws:
WTPropertyVetoException

getPageThreshold

public int getPageThreshold()
Gets the value of the attribute: PAGE_THRESHOLD. Specifies threshold at which a paging session will be established. If the snapshot query contains fewer items than this threshold, then those items will be returned and no paging session will be established. The default value for this attribute is obtained from the system property "wt.pom.paging.threshold".

Supported API: true

Returns:
int

setPageThreshold

public void setPageThreshold(int a_PageThreshold)
                      throws WTPropertyVetoException
Sets the value of the attribute: PAGE_THRESHOLD. Specifies threshold at which a paging session will be established. If the snapshot query contains fewer items than this threshold, then those items will be returned and no paging session will be established. The default value for this attribute is obtained from the system property "wt.pom.paging.threshold".

Supported API: true

Parameters:
a_PageThreshold -
Throws:
WTPropertyVetoException

getPagingSnapshotQueryLimit

public int getPagingSnapshotQueryLimit()
Gets the value of the attribute: PAGING_SNAPSHOT_QUERY_LIMIT. Specifies the limit for the number of paging snapshot query result. If the snapshot query reach the limit , a PersistenceException will be thrown with proper message. The default value for this attribute is obtained from the system property "wt.pom.paging.snapshotQueryLimit".

Supported API: false

Returns:
int

setPagingSnapshotQueryLimit

public void setPagingSnapshotQueryLimit(int a_PagingSnapshotQueryLimit)
                                 throws WTPropertyVetoException
Sets the value of the attribute: PAGING_SNAPSHOT_QUERY_LIMIT. Specifies the limit for the number of paging snapshot query result. If the snapshot query reach the limit , a PersistenceException will be thrown with proper message. The default value for this attribute is obtained from the system property "wt.pom.paging.snapshotQueryLimit".

Supported API: false

Parameters:
a_PagingSnapshotQueryLimit -
Throws:
WTPropertyVetoException

isLimitModeEnabled

public boolean isLimitModeEnabled()
Gets the value of the attribute: LIMIT_MODE_ENABLED.

Supported API: false

Returns:
boolean

setLimitModeEnabled

public void setLimitModeEnabled(boolean a_LimitModeEnabled)
Sets the value of the attribute: LIMIT_MODE_ENABLED.

Supported API: false

Parameters:
a_LimitModeEnabled -

getFetchInfo

public Object getFetchInfo()
Gets the value of the attribute: FETCH_INFO.

Supported API: false

Returns:
Object

setFetchInfo

public void setFetchInfo(Object a_FetchInfo)
Sets the value of the attribute: FETCH_INFO.

Supported API: false

Parameters:
a_FetchInfo -

isBackgroundThreadEnabled

public boolean isBackgroundThreadEnabled()
Gets the value of the attribute: BACKGROUND_THREAD_ENABLED.

Supported API: false

Returns:
boolean

setBackgroundThreadEnabled

public void setBackgroundThreadEnabled(boolean a_BackgroundThreadEnabled)
Sets the value of the attribute: BACKGROUND_THREAD_ENABLED.

Supported API: false

Parameters:
a_BackgroundThreadEnabled -

isPagingRuleHintEnabled

public boolean isPagingRuleHintEnabled()
Gets the value of the attribute: PAGING_RULE_HINT_ENABLED.

Supported API: false

Returns:
boolean

setPagingRuleHintEnabled

public void setPagingRuleHintEnabled(boolean a_PagingRuleHintEnabled)
Sets the value of the attribute: PAGING_RULE_HINT_ENABLED.

Supported API: false

Parameters:
a_PagingRuleHintEnabled -

getPrimaryStatement

public StatementSpec getPrimaryStatement()
Gets the object for the association that plays role: PRIMARY_STATEMENT.

Supported API: true

Returns:
StatementSpec

setPrimaryStatement

public void setPrimaryStatement(StatementSpec a_PrimaryStatement)
                         throws WTPropertyVetoException
Sets the object for the association that plays role: PRIMARY_STATEMENT.

Supported API: true

Parameters:
a_PrimaryStatement -
Throws:
WTPropertyVetoException

getPagingSessionSpec

public PagingSessionSpec getPagingSessionSpec(long a_sessionId,
                                              int a_totalSize,
                                              List a_objArray,
                                              int a_groupFromIndex)
                                       throws WTException
This method returns a PagingSessionSpec that can be used to fetch subsequent pages for the established session.

Supported API: false

Parameters:
a_sessionId - uniquely idnentifies the paging session
a_totalSize - specifies the total number of results that can be paged through
a_objArray -
a_groupFromIndex -
Returns:
PagingSessionSpec
Throws:
WTException

getPagingSessionSpec

public PagingSessionSpec getPagingSessionSpec(long a_sessionId,
                                              int a_totalSize)
                                       throws WTException
This method returns a PagingSessionSpec that can be used to fetch subsequent pages for the established session.

Supported API: false

Parameters:
a_sessionId - uniquely idnentifies the paging session
a_totalSize - specifies the total number of results that can be paged through
Returns:
PagingSessionSpec
Throws:
WTException