org.alfresco.repo.search.impl.querymodel
Class QueryOptions

java.lang.Object
  extended by org.alfresco.repo.search.impl.querymodel.QueryOptions
Direct Known Subclasses:
CMISQueryOptions

public class QueryOptions
extends java.lang.Object

The options for a query


Nested Class Summary
static class QueryOptions.Connective
           
 
Constructor Summary
QueryOptions(java.lang.String query, StoreRef storeRef)
          Create a CMISQueryOptions instance with the default options other than the query and store ref.
QueryOptions(java.lang.String query, StoreRef storeRef, java.util.Locale locale)
          Create a CMISQueryOptions instance with the default options other than the query, store ref and locale.
 
Method Summary
static QueryOptions create(SearchParameters searchParameters)
           
 java.lang.String getDefaultFieldName()
           
 QueryOptions.Connective getDefaultFTSConnective()
          Get the default connective used when OR and AND are not specified for the FTS contains() function.
 QueryOptions.Connective getDefaultFTSFieldConnective()
          As getDefaultFTSConnective() but for field groups
 java.util.List getLocales()
          Get the list of locales to use for the query
 int getMaxItems()
          Get the max number of rows for the result set 0 or less is unlimited
 int getMaxPermissionChecks()
           
 long getMaxPermissionCheckTimeMillis()
           
 MLAnalysisMode getMlAnalaysisMode()
          Get the mode for multi-lingual text analaysis
 java.lang.String getQuery()
          Get the query string
 java.util.List getQueryParameterDefinitions()
          Get the query parameters
 int getSkipCount()
          Get the skip count - the number of rows to skip at the start of the query.
 java.util.List getStores()
          Get the list of stores in which to run the query.
 boolean isIncludeInTransactionData()
          Does the search include any changes made in the current transaction?
 void setDefaultFieldName(java.lang.String defaultFieldName)
           
 void setDefaultFTSConnective(QueryOptions.Connective defaultFTSConnective)
          Set the default connective used when OR and AND are not specified for the FTS contains() function.
 void setDefaultFTSFieldConnective(QueryOptions.Connective defaultFTSFieldConnective)
          As setDefaultFTSConnective() but for field groups
 void setIncludeInTransactionData(boolean includeInTransactionData)
          Set to true if the search include any changes made in the current transaction.
 void setLocales(java.util.List locales)
          sSet the list of locales to use for the query
 void setMaxItems(int maxItems)
          Set the max number of rows for the result set 0 or less is unlimited
 void setMaxPermissionChecks(int maxPermissionChecks)
           
 void setMaxPermissionCheckTimeMillis(long maxPermissionCheckTimeMillis)
           
 void setMlAnalaysisMode(MLAnalysisMode mlAnalaysisMode)
          Set the mode for multi-lingual text analaysis
 void setQuery(java.lang.String query)
          Set the query string
 void setQueryParameterDefinitions(java.util.List queryParameterDefinitions)
          Set the query parameters
 void setSkipCount(int skipCount)
          Set the skip count - the number of rows to skip at the start of the query.
 void setStores(java.util.List stores)
          Set the stores against which to run the query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryOptions

public QueryOptions(java.lang.String query,
                    StoreRef storeRef)
Create a CMISQueryOptions instance with the default options other than the query and store ref. The query will be run using the locale returned by I18NUtil.getLocale()

Parameters:
query - - the query to run
storeRef - - the store against which to run the query

QueryOptions

public QueryOptions(java.lang.String query,
                    StoreRef storeRef,
                    java.util.Locale locale)
Create a CMISQueryOptions instance with the default options other than the query, store ref and locale.

Parameters:
query - - the query to run
storeRef - - the store against which to run the query
Method Detail

create

public static QueryOptions create(SearchParameters searchParameters)

getQuery

public java.lang.String getQuery()
Get the query string

Returns:
the query

setQuery

public void setQuery(java.lang.String query)
Set the query string

Parameters:
query - the query to set

getStores

public java.util.List getStores()
Get the list of stores in which to run the query. Only one store is supported at the momentOnly one store is supported at the moment

Returns:
the stores

setStores

public void setStores(java.util.List stores)
Set the stores against which to run the query. Only one store is supported at the moment.

Parameters:
stores - the stores to set

getMaxItems

public int getMaxItems()
Get the max number of rows for the result set 0 or less is unlimited

Returns:
the maxItems

setMaxItems

public void setMaxItems(int maxItems)
Set the max number of rows for the result set 0 or less is unlimited

Parameters:
maxItems - the maxItems to set

getSkipCount

public int getSkipCount()
Get the skip count - the number of rows to skip at the start of the query.

Returns:
the skipCount

setSkipCount

public void setSkipCount(int skipCount)
Set the skip count - the number of rows to skip at the start of the query.

Parameters:
skipCount - the skipCount to set

getDefaultFTSConnective

public QueryOptions.Connective getDefaultFTSConnective()
Get the default connective used when OR and AND are not specified for the FTS contains() function.

Returns:
the defaultFTSConnective

setDefaultFTSConnective

public void setDefaultFTSConnective(QueryOptions.Connective defaultFTSConnective)
Set the default connective used when OR and AND are not specified for the FTS contains() function.

Parameters:
defaultFTSConnective - the defaultFTSConnective to set

getDefaultFTSFieldConnective

public QueryOptions.Connective getDefaultFTSFieldConnective()
As getDefaultFTSConnective() but for field groups

Returns:
the defaultFTSFieldConnective

setDefaultFTSFieldConnective

public void setDefaultFTSFieldConnective(QueryOptions.Connective defaultFTSFieldConnective)
As setDefaultFTSConnective() but for field groups

Parameters:
defaultFTSFieldConnective - the defaultFTSFieldConnective to set

getLocales

public java.util.List getLocales()
Get the list of locales to use for the query

Returns:
the locales

setLocales

public void setLocales(java.util.List locales)
sSet the list of locales to use for the query

Parameters:
locales - the locales to set

getMlAnalaysisMode

public MLAnalysisMode getMlAnalaysisMode()
Get the mode for multi-lingual text analaysis

Returns:
the mlAnalaysisMode

setMlAnalaysisMode

public void setMlAnalaysisMode(MLAnalysisMode mlAnalaysisMode)
Set the mode for multi-lingual text analaysis

Parameters:
mlAnalaysisMode - the mlAnalaysisMode to set

getQueryParameterDefinitions

public java.util.List getQueryParameterDefinitions()
Get the query parameters

Returns:
the queryParameterDefinitions

setQueryParameterDefinitions

public void setQueryParameterDefinitions(java.util.List queryParameterDefinitions)
Set the query parameters

Parameters:
queryParameterDefinitions - the queryParameterDefinitions to set

isIncludeInTransactionData

public boolean isIncludeInTransactionData()
Does the search include any changes made in the current transaction?

Returns:
the includeInTransactionData

setIncludeInTransactionData

public void setIncludeInTransactionData(boolean includeInTransactionData)
Set to true if the search include any changes made in the current transaction.

Parameters:
includeInTransactionData - the includeInTransactionData to set

getMaxPermissionCheckTimeMillis

public long getMaxPermissionCheckTimeMillis()
Returns:
the timeout in millis for permission checks

setMaxPermissionCheckTimeMillis

public void setMaxPermissionCheckTimeMillis(long maxPermissionCheckTimeMillis)
Parameters:
maxPermissionCheckTimeMillis - - the timeout in millis for permission checks

getMaxPermissionChecks

public int getMaxPermissionChecks()
Returns:
the max number of permission checks to carry out

setMaxPermissionChecks

public void setMaxPermissionChecks(int maxPermissionChecks)
Parameters:
maxPermissionChecks - - the max number of permission checks to carry out

getDefaultFieldName

public java.lang.String getDefaultFieldName()
Returns:
the default field name

setDefaultFieldName

public void setDefaultFieldName(java.lang.String defaultFieldName)
Parameters:
defaultFieldName - - the default field name to use


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.