Package org.hippoecm.repository.api
Interface HippoQuery
- All Superinterfaces:
Query
The HippoQuery is an extension to javax.jcr.query.Query to implement parameterized queries.
Its interface is compliant with the upcoming standard of JCR2 (JSR-283) which leveraged the most important extension implemented; parameterized (stored) queries.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
This query language is not yet available as public API, but reserved for future use. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Convenience method to bind all arguments of a query using a single map and immediately execute the query.int
This addition has no counterpart in JSR-283, JSR-283 only compliant applications have no means to query which parameters should be bound before a query can be executed.String[]
Obtains the session in which this query can be executed.storeAsNode
(String absPath, String type) Methods inherited from interface javax.jcr.query.Query
execute, getBindVariableNames, getLanguage, getStatement, getStoredQueryPath, setLimit, setOffset, storeAsNode
-
Field Details
-
HIPPOQL
This query language is not yet available as public API, but reserved for future use.- See Also:
-
-
Method Details
-
getSession
Obtains the session in which this query can be executed.- Returns:
- the javax.jcr.Session associated with this Query instance
- Throws:
RepositoryException
- if a generic repossitory error occurs
-
storeAsNode
Node storeAsNode(String absPath, String type) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, UnsupportedRepositoryOperationException, RepositoryException - Parameters:
absPath
-type
-- Throws:
ItemExistsException
PathNotFoundException
VersionException
ConstraintViolationException
LockException
UnsupportedRepositoryOperationException
RepositoryException
-
getArguments
- Throws:
RepositoryException
-
getArgumentCount
This addition has no counterpart in JSR-283, JSR-283 only compliant applications have no means to query which parameters should be bound before a query can be executed. The extension of the HippoQuery class makes this possible.- Returns:
- the number of bindable parameters in the stored query
- Throws:
RepositoryException
- in case of an internal or connection error
-
execute
Convenience method to bind all arguments of a query using a single map and immediately execute the query. A JSR-283 only compliant application should use individual bindValue calls to bind each argument and then perform a no-argument execute call.- Parameters:
arguments
- a map of string keys of the free varia- Returns:
- the query result
- Throws:
RepositoryException
- in case of an internal or connection error
-
bindValue
- Specified by:
bindValue
in interfaceQuery
- Parameters:
varName
-value
-- Throws:
IllegalArgumentException
RepositoryException
-