atg.repository
Class QueryOptions

java.lang.Object
  extended by atg.repository.QueryOptions
All Implemented Interfaces:
java.lang.Cloneable

public class QueryOptions
extends java.lang.Object
implements java.lang.Cloneable

A bean class to holding properties that specify ways that a query may be modified:

See Also:
atg.targeting.SortDirectives

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
QueryOptions(int pStartingIndex, int pEndingIndex, SortDirectives pSortDirectives, java.lang.String[] pPrecachedPropertyNames)
           
 
Method Summary
 java.lang.Object clone()
          Cloneable by all...
 boolean getDoNotCacheQuery()
           
 int getEndingIndex()
          Returns property EndingIndex
 java.lang.String[] getPrecachedPropertyNames()
          Returns property PrecachedPropertyNames
 SortDirectives getSortDirectives()
          Returns property SortDirectives
 int getStartingIndex()
          Returns property StartingIndex.
 boolean getUncachedItems()
           
 boolean isUncachedItemsSet()
          Returns true if the UncachedItems was explicitly set on this QueryOptions.
 void setDoNotCacheQuery(boolean pDoNotCacheQuery)
          Sets the property DoNotCacheQuery.
 void setEndingIndex(int pEndingIndex)
          Sets property EndingIndex.
 void setPrecachedPropertyNames(java.lang.String[] pPrecachedPropertyNames)
          Sets property PrecachedPropertyNames.
 void setSortDirectives(SortDirectives pSortDirectives)
          Sets property SortDirectives
 void setStartingIndex(int pStartingIndex)
          Sets property StartingIndex
 void setUncachedItems(boolean pUncachedItems)
          Sets the property UncachedItems.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

QueryOptions

public QueryOptions(int pStartingIndex,
                    int pEndingIndex,
                    SortDirectives pSortDirectives,
                    java.lang.String[] pPrecachedPropertyNames)
Method Detail

setStartingIndex

public void setStartingIndex(int pStartingIndex)
Sets property StartingIndex


getStartingIndex

public int getStartingIndex()
Returns property StartingIndex. This specifies the first value in the list of items returned by the query that should be returned. A value of 0 corresponds to the first item in the list.


setEndingIndex

public void setEndingIndex(int pEndingIndex)
Sets property EndingIndex. By setting this property, you control the maximum number of elements to return in the query. A value of -1 indicates that there is no limit to the number of items returned.

The item at the endingIndex element of the array is not returned. In other words, the total number of items returned is endingIndex - startIndex.


getEndingIndex

public int getEndingIndex()
Returns property EndingIndex


setSortDirectives

public void setSortDirectives(SortDirectives pSortDirectives)
Sets property SortDirectives


getSortDirectives

public SortDirectives getSortDirectives()
Returns property SortDirectives


setPrecachedPropertyNames

public void setPrecachedPropertyNames(java.lang.String[] pPrecachedPropertyNames)
Sets property PrecachedPropertyNames. This is a set of hints as to which properties you need from the requested items. Some repository implementations will be able to load these values at the same time that they perform the query thus improving performance.


getPrecachedPropertyNames

public java.lang.String[] getPrecachedPropertyNames()
Returns property PrecachedPropertyNames


setUncachedItems

public void setUncachedItems(boolean pUncachedItems)
Sets the property UncachedItems. If this is true, the query should be performed optimized for the case when items are not likely to be cached.

Parameters:
pUncachedItems - new value to set

getUncachedItems

public boolean getUncachedItems()
Returns:
The value of the property UncachedItems.

isUncachedItemsSet

public boolean isUncachedItemsSet()
Returns true if the UncachedItems was explicitly set on this QueryOptions. The default value for uncached items can be set on the item-descriptor to affect all queries on that item descriptor but that default can be overriden to either true or false based on the setting of this attribute.


setDoNotCacheQuery

public void setDoNotCacheQuery(boolean pDoNotCacheQuery)
Sets the property DoNotCacheQuery. If this is set to true, we do override the query cache for this particular query.

Parameters:
pDoNotCacheQuery - new value to set

getDoNotCacheQuery

public boolean getDoNotCacheQuery()
Returns:
The value of the property DoNotCacheQuery.

clone

public java.lang.Object clone()
Cloneable by all...

Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object