com.adobe.livecycle.contentservices.client
Interface Query

All Superinterfaces:
java.io.Serializable

public interface Query
extends java.io.Serializable

A Query object enables you to define search criteria that is used when searching Content Services ES2. By defining a Query object, you can search for content that contains specific data. For example, you can search for content that contains the title Mortgage. To see an object of this type used in a code example, see the Search Content Services ES2 content using the Java API quick start in Programming with LiveCycle ES4.


Method Summary
 void addStatement(Statement statement)
          Sets a search statement that defines search criteria.
 java.lang.String getQueryString(QueryBuilder queryBuilder)
          Returns the query string that defines search criteria.
 SortField[] getSortFields()
          Returns an array of SortField objects that represent how results are sorted.
 void setQueryString(java.lang.String queryString)
          Sets a query string that defines search criteria.
 void setSortFields(SortField[] sortFields)
          Sets an array of SortField objects that represent how results are sorted.
 

Method Detail

getQueryString

java.lang.String getQueryString(QueryBuilder queryBuilder)
                                throws ContentServicesException
Returns the query string that defines search criteria.

Parameters:
queryBuilder - A QueryBuilder object that contains search criteria.
Returns:
A string value that represents the query string that is used to define search criteria.
Throws:
ContentServicesException

setQueryString

void setQueryString(java.lang.String queryString)
Sets a query string that defines search criteria. You have to specify a lucene query string. A lucene query string is a search standard that lets you search Content Services ES2. For example, to search for a PDF file named MortgageForm.pdf, specify the following lucene query string: @cm\\:name:\"MortgageForm\. For information about creating lucene query strings, see Apache Lucene - Query Parser Syntax located at the following URL: http://lucene.apache.org/java/2_1_0/queryparsersyntax.html.

Instead of using this method, you can define search criteria by invoking the addStatement method.

Parameters:
queryBuilder - A lucene query string that defines search criteria.

getSortFields

SortField[] getSortFields()
Returns an array of SortField objects that represent how results are sorted.

Returns:
An array of SortField objects that represent how results are sorted.

setSortFields

void setSortFields(SortField[] sortFields)
Sets an array of SortField objects that represent how results are sorted. Using the method, you can sort fields in an ascending manner.

Parameters:
sortFields - An array of SortField objects that represent how results are sorted.

addStatement

void addStatement(Statement statement)
Sets a search statement that defines search criteria. Using this method, you can specify one of the following operators to use within the search criteria:

To see this method used in a code example, see the Search Content Services ES2 content using the Java API quick start in Programming with LiveCycle ES4.

Parameters:
statement - A Statement object that defines search criteria.


[an error occurred while processing this directive] [an error occurred while processing this directive]