|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.stardust.engine.api.query.SubsetPolicy
public final class SubsetPolicy
Evaluation Policy for specifying retrieval of only a subset of found data.
Query.setPolicy(org.eclipse.stardust.engine.api.query.EvaluationPolicy),
Serialized Form| Field Summary | |
|---|---|
static SubsetPolicy |
COUNT_ONLY
Predefined policy indicating an counting only subset. |
static SubsetPolicy |
UNRESTRICTED
Predefined policy indicating an unrestricted subset. |
| Constructor Summary | |
|---|---|
SubsetPolicy(int maxSize)
Same as SubsetPolicy(int, boolean) with evaluateTotalCount set
to false. |
|
SubsetPolicy(int maxSize,
boolean evaluateTotalCount)
Same as SubsetPolicy(int, int, boolean) with skippedEntries
set to 0. |
|
SubsetPolicy(int maxSize,
int skippedEntries)
Same as SubsetPolicy(int, int, boolean) with
evaluateTotalCount set to false. |
|
SubsetPolicy(int maxSize,
int skippedEntries,
boolean evaluateTotalCount)
Initializes a new subset policy with the explicit values given. |
|
| Method Summary | |
|---|---|
int |
getMaxSize()
Gets the maximum number of items to be included in a query result. |
int |
getSkippedEntries()
Gets the number of initial items to be skipped before putting items to the query result. |
boolean |
isEvaluatingTotalCount()
Indicates if the query result should additionally contain the total number of items available, disregarding any result set size restriction. |
static SubsetPolicy |
nextChunk(SubsetPolicy subset)
Creates a new subset policy for retrieving the chunk of data following the one specified by the given subset. |
static SubsetPolicy |
previousChunk(SubsetPolicy subset)
Creates a new subset policy for retrieving the chunk of data before the one specified by the given subset. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final SubsetPolicy UNRESTRICTED
public static final SubsetPolicy COUNT_ONLY
| Constructor Detail |
|---|
public SubsetPolicy(int maxSize)
SubsetPolicy(int, boolean) with evaluateTotalCount set
to false.
maxSize - The maximum number of items to be retrieved.
public SubsetPolicy(int maxSize,
boolean evaluateTotalCount)
SubsetPolicy(int, int, boolean) with skippedEntries
set to 0.
maxSize - The maximum number of items to be retrieved.evaluateTotalCount - A flag indicating if the total number of items satisfying
the query is to be evaluated or not.
public SubsetPolicy(int maxSize,
int skippedEntries)
SubsetPolicy(int, int, boolean) with
evaluateTotalCount set to false.
maxSize - The maximum number of items to be retrieved.skippedEntries - The number of initial entries to be skipped before putting
items to the query result. Must not be less than 0.
org.eclipse.stardust.common.error.PublicException - if skippedEntries is less than 0
public SubsetPolicy(int maxSize,
int skippedEntries,
boolean evaluateTotalCount)
maxSize - The maximum number of items to be retrieved.skippedEntries - The number of initial entries to be skipped before putting
items to the query result. Must not be less than 0.evaluateTotalCount - A flag indicating if the total number of items satisfying
the query is to be evaluated or not.
org.eclipse.stardust.common.error.PublicException - if skippedEntries is less than 0| Method Detail |
|---|
public static final SubsetPolicy nextChunk(SubsetPolicy subset)
subset.
This chunk is defined as follows:
maxSize = subset.maxSizeskippedEntries = subset.skippedEntries + subset.maxSizeisEvaluatingTotalCount = subset.isEvaluatingTotalCount
subset - The subset specification to find the next chunk for.
null if the given
subset was null.previousChunk(org.eclipse.stardust.engine.api.query.SubsetPolicy)public static final SubsetPolicy previousChunk(SubsetPolicy subset)
subset.
This chunk is defined as follows:
maxSize = subset.maxSizeskippedEntries = max(0, subset.skippedEntries - subset.maxSize)isEvaluatingTotalCount = subset.isEvaluatingTotalCount
subset - The subset specification to find the previous chunk for.
null if the given
subset was null.nextChunk(org.eclipse.stardust.engine.api.query.SubsetPolicy)public final int getMaxSize()
public final int getSkippedEntries()
public boolean isEvaluatingTotalCount()
true if the total number of items should be evaluated,
false if not.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||