| javax.jcr.query.QueryManager
QueryManager | public interface QueryManager (Code) | | This interface encapsulates methods for the management of search queries.
Provides methods for the creation and retrieval of search queries.
|
createPreparedQuery | public PreparedQuery createPreparedQuery(String statement, String language) throws InvalidQueryException, RepositoryException(Code) | | Creates a new prepared query by specifying the query statement
itself and the language in which the query is stated. If the
query statement is syntactically invalid, given the language specified, an
InvalidQueryException is thrown. The language parameter must be a string
from among those returned by QueryManager.getSupportedQueryLanguages() ;
if it is not, then an InvalidQueryException is thrown.
Parameters: statement - a String Parameters: language - a String a PreparedQuery object throws: InvalidQueryException - if the query statement is syntactically invalidor the specified language is not supported throws: RepositoryException - if another error occurs since: JCR 2.0 |
createQuery | public Query createQuery(String statement, String language) throws InvalidQueryException, RepositoryException(Code) | | Creates a new query by specifying the query statement itself and the
language in which the query is stated. If the query statement is
syntactically invalid, given the language specified, an
InvalidQueryException is thrown. The language must
be a string from among those returned by QueryManager.getSupportedQueryLanguages();
if it is not, then an InvalidQueryException is thrown.
Parameters: statement - a String Parameters: language - a String a Query object throws: InvalidQueryException - if the query statement is syntactically invalidor the specified language is not supported throws: RepositoryException - if another error occurs |
getQOMFactory | public QueryObjectModelFactory getQOMFactory()(Code) | | Returns a QueryObjectModelFactory with which a JCR-JQOM query
can be built programmatically.
a QueryObjectModelFactory object since: JCR 2.0 |
getQuery | public Query getQuery(Node node) throws InvalidQueryException, RepositoryException(Code) | | Retrieves an existing persistent query. If node
is not a valid persisted query (that is, a node of type
nt:query ), an InvalidQueryException
is thrown.
Persistent queries are created by first using QueryManager.createQuery
to create a Query object and then calling Query.save to
persist the query to a location in the workspace.
Parameters: node - a persisted query (that is, a node of type nt:query ). throws: InvalidQueryException - If node is not a valid persisted query(that is, a node of type nt:query ). throws: RepositoryException - if another error occurs a Query object. |
getSupportedQueryLanguages | public String[] getSupportedQueryLanguages() throws RepositoryException(Code) | | Returns an array of strings representing all query languages supported by this repository.
In level 1 this set must include the strings represented by the constants
Query.JCR_SQL2 and
Query.JCR_JQOM }. An implementation of
either level may also support other languages, including the deprecated
languages of JCR 1.0:
Query.XPATH and
Query.SQL .
A string array. throws: RepositoryException - if an error occurs. |
|
|