public class Query extends BaseManager implements Item
RecordQueriesList
,
CategoryQueriesList
BaseManager.PackEntryChangeListener, BaseManager.RegistryEntry
Modifier and Type | Field and Description |
---|---|
static int |
QUERY_COMBINE_OPTION_BROADEN |
static int |
QUERY_COMBINE_OPTION_NARROW |
static int |
QUERY_COMBINE_OPTION_NEW |
TYPE_EJP, TYPE_NATIVE
Modifier and Type | Method and Description |
---|---|
JPack |
exportSet()
Exports this query into a
JPack . |
java.lang.String |
getAsComplexQuery()
Returns this query as a complex query by converting a simple query into complex format.
|
int |
getCombine()
Returns the mode for combining the found records with the existing collection.
|
java.lang.String |
getDescription(int languageID)
Returns the description for the given language id.
|
java.lang.String |
getDisplayName(int languageID,
boolean fallbackToDefaultName)
Returns the display name for the given language id.
|
java.lang.String |
getID()
Returns the UID of the item in the items namespace.
|
java.lang.String |
getName()
Returns the name of this query.
|
java.lang.String |
getQuery()
Returns the query string of this query.
|
QueryConditionList |
getQueryConditionList()
Returns the list of query conditions for this query.
|
RestrictionsList |
getRestrictionsList()
Returns the list of roles and users that are allowed to view this query.
|
boolean |
isComplexQuery()
Returns whether this is a complex query.
|
boolean |
isDefault()
Returns whether this item is the default item.
|
boolean |
isQueryWithConditionList()
Returns whether this is a query using a condition list or a classic query.
|
boolean |
isSharingRestricted()
Returns whether the query visibility is restricted to a group of users or roles.
|
boolean |
resultsInNewCollection()
Returns true if the search result should be shown in a new collection.
|
void |
setCombine(int value)
Sets the mode for combining the found records with the existing collection.
|
void |
setComplexQuery(boolean value)
Configures whether this is a complex query.
|
void |
setDescription(int languageID,
java.lang.String description)
Sets the description for the given language.
|
void |
setDisplayName(int languageID,
java.lang.String displayName)
Sets the display name for the given language.
|
void |
setQuery(java.lang.String value)
Sets the query string of this query.
|
void |
setResultsInNewCollection(boolean value)
Configures whether the search result should be shown in a new collection.
|
void |
setSharingRestricted(boolean value)
Sets whether the query visibility is restricted to a group of users or roles.
|
addChangeListener, addChangeListener, addGlobalChangeListener, addPackListener, forgetPush, getPack, isShared, popPack, pushPack, removeChangeListener, removeChangeListener, removeGlobalChangeListener, removePackListener, save, save, toString, writeAsXML
public static final int QUERY_COMBINE_OPTION_NEW
public static final int QUERY_COMBINE_OPTION_NARROW
public static final int QUERY_COMBINE_OPTION_BROADEN
public java.lang.String getName()
public java.lang.String getQuery()
public void setQuery(java.lang.String value)
value
- new query stringpublic boolean isComplexQuery()
public java.lang.String getAsComplexQuery()
public void setComplexQuery(boolean value)
value
- set to true if this is a complex querypublic boolean resultsInNewCollection()
public void setResultsInNewCollection(boolean value)
value
- set to true if the search result should be shown in a new collectionpublic int getCombine()
QUERY_COMBINE_OPTION_NEW
, QUERY_COMBINE_OPTION_NARROW
and QUERY_COMBINE_OPTION_BROADEN
. Defaults to QUERY_COMBINE_OPTION_NEW
.public void setCombine(int value)
QUERY_COMBINE_OPTION_NEW
, QUERY_COMBINE_OPTION_NARROW
and QUERY_COMBINE_OPTION_BROADEN
.value
- set return mode for combining the found records with the existing collectionpublic QueryConditionList getQueryConditionList()
public boolean isQueryWithConditionList()
public java.lang.String getID()
public boolean isDefault()
public java.lang.String getDescription(int languageID)
getDescription
in interface Item
languageID
- specifying the language for the descriptionpublic void setDescription(int languageID, java.lang.String description)
setDescription
in interface Item
languageID
- the language to set the description fordescription
- the new descriptionpublic java.lang.String getDisplayName(int languageID, boolean fallbackToDefaultName)
getDisplayName
in interface Item
languageID
- specifying the language for the display namefallbackToDefaultName
- when set to true this method returns the default name when now localized display name is available otherwise nullpublic void setDisplayName(int languageID, java.lang.String displayName)
setDisplayName
in interface Item
languageID
- the language to set the display name fordisplayName
- the new display namepublic boolean isSharingRestricted()
isSharingRestricted
in interface Item
public void setSharingRestricted(boolean value)
setSharingRestricted
in interface Item
value
- set to true if the query visibility should be restricted to a group of users or rolespublic RestrictionsList getRestrictionsList()
isSharingRestricted()
returns
true.getRestrictionsList
in interface Item
www.canto.com
Canto, the Canto logo, the Cumulus logo, and Cumulus are registered trademarks of Canto GmbH, registered in the U.S. and other countries.