com.bigdata.relation.rule
Class QueryOptions

java.lang.Object
  extended by com.bigdata.relation.rule.QueryOptions
All Implemented Interfaces:
IQueryOptions, Serializable

public class QueryOptions
extends Object
implements IQueryOptions

Version:
$Id: QueryOptions.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson
See Also:
Serialized Form

Field Summary
static IQueryOptions DISTINCT
          An instance specifying distinct := true but none of the other IQueryOptions.
static IQueryOptions NONE
          An instance specifying NONE of the constraints declared by IQueryOptions.
 
Constructor Summary
QueryOptions(boolean distinct, boolean stable, ISortOrder[] orderBy, ISlice slice)
           
 
Method Summary
 ISortOrder[] getOrderBy()
          An optional array of ISortOrders describing the sort order that will be imposed on the generated solutions when the rule is evaluated as a query.
 ISlice getSlice()
          An optional ISlice describing a constraint on the first solution and the maximum #of solutions to be materialized by a query.
 boolean isDistinct()
          true if a DistinctFilter should be applied when the query is evaluated.
 boolean isStable()
          Return true iff query evaluation must be stable.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

public static final transient IQueryOptions NONE
An instance specifying NONE of the constraints declared by IQueryOptions.


DISTINCT

public static final transient IQueryOptions DISTINCT
An instance specifying distinct := true but none of the other IQueryOptions.

Constructor Detail

QueryOptions

public QueryOptions(boolean distinct,
                    boolean stable,
                    ISortOrder[] orderBy,
                    ISlice slice)
Parameters:
distinct -
stable -
orderBy -
slice -
Throws:
IllegalArgumentException - if a stable is false and a slice is specified with a non-zero offset and/or a non-Long.MAX_VALUE limit
Method Detail

isDistinct

public final boolean isDistinct()
Description copied from interface: IQueryOptions
true if a DistinctFilter should be applied when the query is evaluated.

Specified by:
isDistinct in interface IQueryOptions

isStable

public final boolean isStable()
Description copied from interface: IQueryOptions
Return true iff query evaluation must be stable. Stable query evaluation requires that the same query executed against the same commit point will produce the same solutions in the same order. This constraint requires that (a) query execution does not use any parallelism; and (b) all IStepTask are determinate. Stable queries may be useful when using an ISlice to page through a solution set.

Specified by:
isStable in interface IQueryOptions
Returns:
true if query evaluation must be stable.

getOrderBy

public final ISortOrder[] getOrderBy()
Description copied from interface: IQueryOptions
An optional array of ISortOrders describing the sort order that will be imposed on the generated solutions when the rule is evaluated as a query.

Specified by:
getOrderBy in interface IQueryOptions
Returns:
An array of ISortOrders -or- null iff there is no "order by" constraint.

getSlice

public final ISlice getSlice()
Description copied from interface: IQueryOptions
An optional ISlice describing a constraint on the first solution and the maximum #of solutions to be materialized by a query.

Note: Using an ISlice requires that the solutions are stable for queries against the same commit point of the database.

Specified by:
getSlice in interface IQueryOptions
Returns:
The ISlice -or- null if there is no constraint on the solutions that will be visited.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.