com.flexive.shared.search
Class FxSQLSearchParams

java.lang.Object
  extended by com.flexive.shared.search.FxSQLSearchParams
All Implemented Interfaces:
java.io.Serializable

public class FxSQLSearchParams
extends java.lang.Object
implements java.io.Serializable

Search parameters

Author:
Gregor Schober (gregor.schober@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)
See Also:
Serialized Form

Nested Class Summary
static class FxSQLSearchParams.BriefcaseCreationData
          Envelope to carry data needed for a briefcase creation.
static class FxSQLSearchParams.CacheMode
          The cache modes of the search.
 
Constructor Summary
FxSQLSearchParams()
          Constructor.
 
Method Summary
 FxSQLSearchParams.BriefcaseCreationData getBriefcaseCreationData()
           
 FxSQLSearchParams.CacheMode getCacheMode()
          Returns the cache mode.
 int getQueryTimeout()
          Returns the query timeout in seconds.
 java.util.List<FxLanguage> getResultLanguages()
          Gets the languages that the resultset will contain.
 boolean getWillCreateBriefcase()
          Retuns true if the query will create a briefcase with the found objects.
 FxSQLSearchParams saveResultInBriefcase(java.lang.String name, java.lang.String description, ACL acl)
          Saves the result of the query in a new briefcase.
 FxSQLSearchParams saveResultInBriefcase(java.lang.String name, java.lang.String description, java.lang.Long aclId)
          Saves the result of the query in a new briefcase.
 FxSQLSearchParams setCacheMode(FxSQLSearchParams.CacheMode mode)
          Sets the caching mode for the search.
 FxSQLSearchParams setQueryTimeout(int value)
          Sets the query timeout on the database.
 FxSQLSearchParams setResultLanguages(java.util.List<FxLanguage> languages)
          Sets the languages that the resultset should contain.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FxSQLSearchParams

public FxSQLSearchParams()
Constructor.

Method Detail

setCacheMode

public FxSQLSearchParams setCacheMode(FxSQLSearchParams.CacheMode mode)
Sets the caching mode for the search.

Parameters:
mode - the cache mode to use
CacheMode.ON: read from the cache if possible and write result to the cache
CacheMode.OFF: do not read or write the cache
CacheMode.READ_ONLY: read from the cache, but do not write to it
if null is specified CacheMode.READ_ONLY will be used.
Returns:
this

getCacheMode

public FxSQLSearchParams.CacheMode getCacheMode()
Returns the cache mode.

Returns:
the cache mode.

setResultLanguages

public FxSQLSearchParams setResultLanguages(java.util.List<FxLanguage> languages)
Sets the languages that the resultset should contain.

Parameters:
languages - the languages, if null or a emtpty array is specified the default language of the calling user will be used.
Returns:
this

getResultLanguages

public java.util.List<FxLanguage> getResultLanguages()
Gets the languages that the resultset will contain.

Returns:
the languages

saveResultInBriefcase

public FxSQLSearchParams saveResultInBriefcase(java.lang.String name,
                                               java.lang.String description,
                                               java.lang.Long aclId)
Saves the result of the query in a new briefcase.

Parameters:
name - the name of the briefcase to create
description - the description of the briefcase
aclId - null if the briefcase is not shared, or a ACL to grant permissions to other users
Returns:
this

saveResultInBriefcase

public FxSQLSearchParams saveResultInBriefcase(java.lang.String name,
                                               java.lang.String description,
                                               ACL acl)
Saves the result of the query in a new briefcase.

Parameters:
name - the name of the briefcase to create
description - the description of the briefcase
acl - null if the briefcase is not shared, or a ACL to grant permissions to other users
Returns:
this

getWillCreateBriefcase

public boolean getWillCreateBriefcase()
Retuns true if the query will create a briefcase with the found objects.

Returns:
true if the query will create a briefcase with the found objects.

getBriefcaseCreationData

public FxSQLSearchParams.BriefcaseCreationData getBriefcaseCreationData()

setQueryTimeout

public FxSQLSearchParams setQueryTimeout(int value)
Sets the query timeout on the database.

Parameters:
value - in seconds, zero means unlimited
Returns:
this

getQueryTimeout

public int getQueryTimeout()
Returns the query timeout in seconds.

Returns:
the query timeout