com.crystaldecisions.sdk.uri
Class PagingQueryOptions

java.lang.Object
  extended by com.crystaldecisions.sdk.uri.PagingQueryOptions
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class PagingQueryOptions
extends java.lang.Object
implements java.io.Externalizable

This object represents the options available when paging a URI-based query. A page size less than 1 specifies no paging. Please see the IInfoStore class for details on where this is used.

See Also:
IInfoStore.getPagingQuery(String, PagingQueryOptions), IPageResult, Serialized Form

Field Summary
static int EXCLUDE_TEMP_STORAGE
          An int representing the option to exclude objects in temporary storage from query results.
static int INCLUDE_SECURITY
          An int representing the option to automatically append security paramaters to any queries returned.
static int SKIP_QUERY_URI_DECODE
          Deprecated. Query URI will automatically avoid decoding inside the query section of the URI
 
Constructor Summary
PagingQueryOptions()
          Default constructor initializing the page size to the default specified in the configuration properties file, and setting all options off
PagingQueryOptions(int pageSize)
          Constructor allowing page size to be specified.
PagingQueryOptions(int pageSize, boolean isIncremental)
          Constructor allowing page size and the incremental option to be specified.
PagingQueryOptions(int pageSize, int optionVals)
          Constructor allowing page size and a set of options to be specified.
PagingQueryOptions(int pageSize, int optionVals, boolean isIncremental)
          Constructor allowing page size and a set of options to be specified.
PagingQueryOptions(int pageSize, int optionVals, boolean isIncremental, boolean uriIsUnique)
          Deprecated. Incremental and Unique options are now invalid
 
Method Summary
 int getPageSize()
          Returns the current page size specified for this set of paging options.
 boolean isIncremental()
          Returns false if paging queries for all pages are done at first request.
 boolean isMaintainTopN()
           
 boolean isOptionSet(int option)
          Tests if the option specified by the parameter "option" has been turned on for this object.
 boolean isUriIsUnique()
          Deprecated. Option does nothing
 void readExternal(java.io.ObjectInput in)
          For internal use only.
 void removeOption(int option)
          Removes a given option from this object.
 void setIsIncremental(boolean isIncremental)
          Set to false if paging queries for all pages are done at first request.
 void setIsMaintainTopN(boolean maintainTopN)
           
 void setOption(int option)
          Sets whether the specified option is enabled for this object.
 void setPageSize(int pageSize)
          Sets the page size determining how many objects are allowed in each page of objects later returned.
 void setUriIsUnique(boolean uriIsUnique)
          Deprecated. Option does nothing
 void writeExternal(java.io.ObjectOutput out)
          For internal use only.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INCLUDE_SECURITY

public static int INCLUDE_SECURITY
An int representing the option to automatically append security paramaters to any queries returned.

See Also:
PagingQueryOptions.setOption(int)

EXCLUDE_TEMP_STORAGE

public static int EXCLUDE_TEMP_STORAGE
An int representing the option to exclude objects in temporary storage from query results.

See Also:
PagingQueryOptions.setOption(int)

SKIP_QUERY_URI_DECODE

@Deprecated
public static int SKIP_QUERY_URI_DECODE
Deprecated. Query URI will automatically avoid decoding inside the query section of the URI

An int representing the option to disable URI query string decoding. This can be used with SQL-like queries (beginning with query: //) when the query contains characters that have special meaning in URLs.

For example, if the query contains SI_NAME LIKE '%SMITH%', the default behaviour is to parse the % as the hexadecimal value prefix. If this option is enabled, the % is treated the same as any other character.

See Also:
PagingQueryOptions.setOption(int)
Constructor Detail

PagingQueryOptions

public PagingQueryOptions()
Default constructor initializing the page size to the default specified in the configuration properties file, and setting all options off


PagingQueryOptions

public PagingQueryOptions(int pageSize)
Constructor allowing page size to be specified. This will determine how many objects are allowed in each page of objects later returned. This value will reflect the number of objects at the time of the initial "index" query.

Parameters:
pageSize - the number of objects allowed in each page.
See Also:
PagingQueryOptions.setPageSize(int), PagingQueryOptions.setOption(int)

PagingQueryOptions

public PagingQueryOptions(int pageSize,
                          boolean isIncremental)

Constructor allowing page size and the incremental option to be specified. The page size will determine how many objects are allowed in each page of objects later returned. This value will reflect the number of objects at the time of the initial "index" query.

The options parameter represents a bit flag in which various options can be AND'ed together.

Parameters:
pageSize - the number of objects allowed in each page.
isIncremental - incrementally retrieving the page queries if set to true. Retrieve all pages at once if set to false.
See Also:
PagingQueryOptions.setPageSize(int), PagingQueryOptions.isIncremental()

PagingQueryOptions

public PagingQueryOptions(int pageSize,
                          int optionVals)
Constructor allowing page size and a set of options to be specified. The page size will determine how many objects are allowed in each page of objects later returned. This value will reflect the number of objects at the time of the initial "index" query. The options parameter represents a bit flag in which various options can be AND'ed together.

Parameters:
pageSize - the number of objects allowed in each page.
optionVals - the options to enable
See Also:
PagingQueryOptions.setPageSize(int), PagingQueryOptions.setOption(int)

PagingQueryOptions

public PagingQueryOptions(int pageSize,
                          int optionVals,
                          boolean isIncremental)

Constructor allowing page size and a set of options to be specified. The page size will determine how many objects are allowed in each page of objects later returned. This value will reflect the number of objects at the time of the initial "index" query.

The options parameter represents a bit flag in which various options can be AND'ed together.

Parameters:
pageSize - the number of objects allowed in each page.
optionVals - the options to enable.
isIncremental - incrementally retrieving the page queries if set to true. Retrieve all pages at once if set to false.
See Also:
PagingQueryOptions.setPageSize(int), PagingQueryOptions.setOption(int), PagingQueryOptions.isIncremental()

PagingQueryOptions

@Deprecated
public PagingQueryOptions(int pageSize,
                                     int optionVals,
                                     boolean isIncremental,
                                     boolean uriIsUnique)
Deprecated. Incremental and Unique options are now invalid

Constructor allowing the page size, options, the isIncremental flag, and the uriIsUnique flag to be specified.

Parameters:
pageSize - the number of objects allowed in each page. If less than 1, only one page containing all objects is returned when the query is performed.
optionVals - the options to enable.
isIncremental - incrementally retrieving the page queries if set to true. Retrieve all pages at once if set to false.
uriIsUnique - set to true if the URI query sorts on unique values only.
See Also:
PagingQueryOptions.setPageSize(int), PagingQueryOptions.setOption(int), PagingQueryOptions.isIncremental(), PagingQueryOptions.setUriIsUnique(boolean)
Method Detail

setUriIsUnique

@Deprecated
public void setUriIsUnique(boolean uriIsUnique)
Deprecated. Option does nothing

Set uriIsUnique to true if you know the uri's ORDER BY is unique. Eg. they are ordered by SI_NAME under same parentID. Once this is set to true, URI will not attach the SI_ID at the end of the ORDER BY clause. This will enhance performance under large data set.

Don't set it to true if:
a) your ORDER BY doesn't have unique values for the listing or
b) your last parameter in ORDER BY is a custom ordering.

Parameters:
uriIsUnique - set to true if the URI query sorts on unique values only.

isUriIsUnique

@Deprecated
public boolean isUriIsUnique()
Deprecated. Option does nothing

Returns false if paging queries for all pages are done at first request. Return true if paging queries are done incrementally.

Returns:
whether paging quries are retrieved once at first request, or incrementally.
See Also:
PagingQueryOptions.setUriIsUnique(boolean)

setIsIncremental

public void setIsIncremental(boolean isIncremental)
Set to false if paging queries for all pages are done at first request.
Set to true if paging queries are done incrementally.

See Also:
PagingQueryOptions.isIncremental()

isIncremental

public boolean isIncremental()
Returns false if paging queries for all pages are done at first request. Return true if paging queries are done incrementally.

Returns:
whether paging quries are retrieved once at first request, or incrementally.
See Also:
PagingQueryOptions.setIsIncremental(boolean)

setPageSize

public void setPageSize(int pageSize)
Sets the page size determining how many objects are allowed in each page of objects later returned. This value will reflect the number of objects at the time of the initial "index" query. If objects are added or removed, the number of objects actually returned may be slightly more or less than the page size specified.

A page size less than 1 specifies no paging.

Parameters:
pageSize - the number of objects allowed in each page.

getPageSize

public int getPageSize()
Returns the current page size specified for this set of paging options. This will determine how many objects are allowed in each page of objects later returned. This value will reflect the number of objects at the time of the initial "index" query. If objects are added or removed, the number of objects actually returned may be slightly more or less than the page size specified.

A page size less than 1 specifies no paging.

Returns:
the number of objects allowed in each page.

setIsMaintainTopN

public void setIsMaintainTopN(boolean maintainTopN)

isMaintainTopN

public boolean isMaintainTopN()

isOptionSet

public boolean isOptionSet(int option)
Tests if the option specified by the parameter "option" has been turned on for this object. Possible values are:

Parameters:
option - the option to be checked
Returns:
true if the option specfied as been set
See Also:
PagingQueryOptions.setOption(int), PagingQueryOptions.removeOption(int)

setOption

public void setOption(int option)
Sets whether the specified option is enabled for this object. Possible values are:

Parameters:
option - the option to be added
See Also:
PagingQueryOptions.removeOption(int), PagingQueryOptions.isOptionSet(int)

removeOption

public void removeOption(int option)
Removes a given option from this object.

Parameters:
option - the option to be removed
See Also:
PagingQueryOptions.setOption(int), PagingQueryOptions.isOptionSet(int)

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
For internal use only.

Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException
For internal use only.

Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException