public interface CentraSiteBusinessQuery
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONTEXT_OBJECT
Context object variable string used inside the business query.
|
static java.lang.String |
FIND_QUALIFIER_OBJECT_CACHE_EAGER
Eager object cache population.
|
static java.lang.String |
FIND_QUALIFIER_OBJECT_CACHE_LAZY
Lazy object cache population.
|
Modifier and Type | Method and Description |
---|---|
void |
addClassifications(java.util.Collection<Classification> classifications)
Adds the collection of classification objects.
|
void |
addComparison(java.lang.String path,
java.lang.Boolean value)
Add a value comparison to this query's predicate conjunction.
|
void |
addComparison(java.lang.String path,
java.util.List<java.lang.String> values)
Add a value comparison to this query's predicate conjunction.
|
void |
addComparison(java.lang.String path,
java.lang.String value)
Add a value comparison to this query's predicate conjunction.
|
void |
addComparisonCaseInsensitive(java.lang.String path,
java.lang.String value)
Add a case-insensitive value comparison to this query's predicate conjunction.
|
void |
addContains(java.lang.String path,
java.lang.String value)
Add a contains to this query's predicate conjunction.
|
void |
addKeywordSearch(java.lang.String path,
java.lang.String searchString)
Add keyword search string for a specific path.
|
void |
addOrderBy(java.lang.String path,
boolean descending)
Add an order by clause.
|
void |
addOrderByRelevance(java.util.Collection keywords,
boolean descending)
Add an order by clause specifically for sorting by relevance w.r.t. a certain set of keywords
|
void |
addPredicate(java.lang.String predicate)
Add a free style predicate.
|
void |
addPrologExtension(java.lang.String p)
Appends to query specific entry for the XQuery prolog.
|
void |
addQueryBodyPrefix(java.lang.String p)
Appends to query specific prefix for the query body.
|
void |
addStartsWith(java.lang.String path,
java.lang.String value)
Adds a starts-with to this query's predicate conjunction.
|
void |
addStartsWithCaseInsensitive(java.lang.String path,
java.lang.String value)
Adds a case-insensitive starts-with to this query's predicate conjunction.
|
void |
enableEmptyPredicate()
Turn on full doctype retrieval.
|
void |
excludeClassifiedObjects(java.util.Collection<java.lang.String> conceptKeys)
Restricts the search result not to contain any objects that are
classified with any concept that is identified by a collection of
concept key ids.
|
BulkResponse |
execute()
Executes this query.
|
javax.xml.namespace.QName |
getDoctypeQName(java.lang.String objectType)
Returns doctype QName for object type.
|
java.lang.String |
getPrefixForNamespaceUri(java.lang.String uri,
boolean importRequired)
Gets a prefix for given namespace URI.
|
java.lang.String |
getPrologExtension()
Gets query specific entry for the XQuery prolog.
|
java.lang.String |
getQueryBodyPrefix()
Gets query specific prefix for the query body.
|
java.lang.String |
getQueryString()
Obtains the query string needed for executing this BusinessQuery.
|
void |
includeClassifiedObjects(java.util.Collection<java.lang.String> conceptKeys)
Restricts the search result to contain only objects that are classified
with any concept that is identified by a collection of concept key ids.
|
void |
setKeywordSearch(java.util.Collection keywords)
Passes a group of words or phrases for keyword search.
|
void |
setKeywordSearch(java.lang.String searchString)
Sets asset search keyword string for this BusinessQuery.
|
void |
setPrologExtension(java.lang.String p)
Sets query specific entry for the XQuery prolog.
|
void |
setQueryBodyPrefix(java.lang.String p)
Sets query specific prefix for the query body.
|
void |
setUseLogicalOperatorOR(boolean useOR)
Sets logical operator for combining predicates.
|
void |
translatePatterns(java.lang.String name,
java.util.Collection patterns)
Translates namePatterns argument of findXXX methods to its XQuery representation.
|
static final java.lang.String FIND_QUALIFIER_OBJECT_CACHE_EAGER
static final java.lang.String FIND_QUALIFIER_OBJECT_CACHE_LAZY
static final java.lang.String CONTEXT_OBJECT
void addComparison(java.lang.String path, java.lang.String value)
path
- the path expressionvalue
- the comparison valuevoid addComparisonCaseInsensitive(java.lang.String path, java.lang.String value)
path
- the path expressionvalue
- the comparison valuevoid addComparison(java.lang.String path, java.util.List<java.lang.String> values) throws JAXRException
path
- the path expressionvalues
- the collection of values which this comparison can have.JAXRException
- if an internal error occursvoid addComparison(java.lang.String path, java.lang.Boolean value) throws JAXRException
path
- the path expressionvalue
- the comparison valueJAXRException
- if an internal error occursvoid addClassifications(java.util.Collection<Classification> classifications) throws JAXRException
classifications
- the collection of classification objects.JAXRException
- if an internal error occursvoid addStartsWith(java.lang.String path, java.lang.String value)
path
- the path expressionvalue
- the comparison valuevoid addStartsWithCaseInsensitive(java.lang.String path, java.lang.String value)
path
- the path expressionvalue
- the comparison valuevoid addContains(java.lang.String path, java.lang.String value)
path
- the path expressionvalue
- the comparison valuevoid addKeywordSearch(java.lang.String path, java.lang.String searchString) throws JAXRException
path
- the path specifying the nodes to be searchedsearchString
- a string containing a blank separated list of
search words and quoted phrasesJAXRException
- if an internal error occurs on keyword searchvoid addOrderByRelevance(java.util.Collection keywords, boolean descending)
keywords
- The keywordsdescending
- If true
sorting will be descending.void addOrderBy(java.lang.String path, boolean descending)
path
- The path expression used for the sorting - should refer to CONTEXT_OBJECTdescending
- If true
sorting will be descending.void addPredicate(java.lang.String predicate)
predicate
- the predicate stringvoid enableEmptyPredicate()
BulkResponse execute() throws JAXRException
JAXRException
- if an internal error occursjava.lang.String getPrefixForNamespaceUri(java.lang.String uri, boolean importRequired)
uri
- the namespace URI.importRequired
- true
if the import is required.java.lang.String getQueryString() throws JAXRException
JAXRException
- if an internal error occurs on retrieving the query stringvoid setKeywordSearch(java.util.Collection keywords) throws JAXRException
keywords
- a group words or phrasesJAXRException
- if an internal error occurs on keyword searchsetKeywordSearch(String)
void setKeywordSearch(java.lang.String searchString) throws JAXRException
This method will add predicates to the query that effectively make it search for keywords in these paths:
The search will all also match a $ro when it is related to an externalLink $el that matches the keywords in:
The search string consists of blank-separated words and phrases. A phrase consists of blank-separated words enclosed in quotes, it will match objects that contain all of these words in sequence, e.g. "\"light blue\"" will match objects that contain "light" and "blue" in this order, adjacent to each other.
The words and phrases in one search string are in a logical OR connection, i.e. searching for "red \"light blue\"" will match objects that match "red" as well as those matching "\"light blue\"".
Multiple calls of setKeywordSearch create multiple groups of
search keywords. At query execution time, these groups are in a locical
AND connection, unless setUseLogicalOperatorOR(boolean)
is used to
override. With an AND connection, an object matches the search if it
matches all of the groups, whereas with an OR connection, it matches
the search when it matches any of the groups.
searchString
- a string containing a blank separated list of
search words and quoted phrasesJAXRException
- if an internal error occurs on keyword searchvoid includeClassifiedObjects(java.util.Collection<java.lang.String> conceptKeys)
conceptKeys
- the collection of concept key ids.void excludeClassifiedObjects(java.util.Collection<java.lang.String> conceptKeys)
conceptKeys
- the collection of concept key ids.java.lang.String getPrologExtension()
void setPrologExtension(java.lang.String p)
p
- the string to add to the XQuery prologvoid addPrologExtension(java.lang.String p)
p
- the string to add to the XQuery prologjava.lang.String getQueryBodyPrefix()
void setQueryBodyPrefix(java.lang.String p)
p
- the string to add in front of the query bodyvoid addQueryBodyPrefix(java.lang.String p)
p
- a string to add in front of the query bodyvoid setUseLogicalOperatorOR(boolean useOR)
useOR
- if true, predicates will be combined by a logical OR,
otherwise they will be combined by a logical AND (which also is the
default behaviour).void translatePatterns(java.lang.String name, java.util.Collection patterns) throws JAXRException
name
- @see javax.xml.registry.BusinessQueryManager#findOrganizations(java.util.Collection, java.util.Collection, java.util.Collection, java.util.Collection, java.util.Collection, java.util.Collection)patterns
- the collection of patterns.JAXRException
- if an internal error occurs.javax.xml.namespace.QName getDoctypeQName(java.lang.String objectType)
objectType
- the object type (as in LifeCycleManager constants)