public class QueryImpl extends Object implements Query
Constructor and Description |
---|
QueryImpl(Session session,
ManagerProvider mgrProvider,
ItemManager itemMgr,
WorkspaceManager wspManager,
String statement,
String language,
Node node)
Creates a new query.
|
Modifier and Type | Method and Description |
---|---|
void |
bindValue(String varName,
Value value) |
QueryResult |
execute() |
String[] |
getBindVariableNames() |
String |
getLanguage() |
String |
getStatement() |
String |
getStoredQueryPath() |
void |
setLimit(long limit) |
void |
setOffset(long offset) |
Node |
storeAsNode(String absPath) |
public QueryImpl(Session session, ManagerProvider mgrProvider, ItemManager itemMgr, WorkspaceManager wspManager, String statement, String language, Node node) throws InvalidQueryException, RepositoryException
session
- the session that created this query.mgrProvider
- the manager provider.itemMgr
- the item manager of that session.wspManager
- the workspace manager that belongs to the session.statement
- the query statement.language
- the language of the query statement.node
- the node from where the query was read or
null
if this query is not a stored
query.InvalidQueryException
- if the query is invalid.RepositoryException
public QueryResult execute() throws RepositoryException
execute
in interface Query
RepositoryException
Query.execute()
public String getStatement()
getStatement
in interface Query
Query.getStatement()
public String getLanguage()
getLanguage
in interface Query
Query.getLanguage()
public String getStoredQueryPath() throws ItemNotFoundException, RepositoryException
getStoredQueryPath
in interface Query
ItemNotFoundException
RepositoryException
Query.getStoredQueryPath()
public Node storeAsNode(String absPath) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, UnsupportedRepositoryOperationException, RepositoryException
storeAsNode
in interface Query
ItemExistsException
PathNotFoundException
VersionException
ConstraintViolationException
LockException
UnsupportedRepositoryOperationException
RepositoryException
Query.storeAsNode(String)
public String[] getBindVariableNames() throws RepositoryException
getBindVariableNames
in interface Query
RepositoryException
Query.getBindVariableNames()
public void bindValue(String varName, Value value) throws RepositoryException
bindValue
in interface Query
RepositoryException
Query.bindValue(String, Value)
public void setLimit(long limit)
setLimit
in interface Query
Query.setLimit(long)
public void setOffset(long offset)
setOffset
in interface Query
Query.setOffset(long)
Copyright © 2004–2020 The Apache Software Foundation. All rights reserved.