Class MockQuery
- java.lang.Object
-
- org.apache.sling.testing.mock.jcr.MockQuery
-
- All Implemented Interfaces:
javax.jcr.query.Query
@ConsumerType public final class MockQuery extends Object implements javax.jcr.query.Query
Mock implementation ofQuery.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbindValue(String varName, javax.jcr.Value value)javax.jcr.query.QueryResultexecute()String[]getBindVariableNames()Map<String,javax.jcr.Value>getBindVariables()StringgetLanguage()longgetLimit()longgetOffset()StringgetStatement()StringgetStoredQueryPath()voidsetLimit(long limit)voidsetOffset(long offset)javax.jcr.NodestoreAsNode(String absPath)
-
-
-
Method Detail
-
execute
public javax.jcr.query.QueryResult execute() throws javax.jcr.RepositoryException- Specified by:
executein interfacejavax.jcr.query.Query- Throws:
javax.jcr.RepositoryException
-
setLimit
public void setLimit(long limit)
- Specified by:
setLimitin interfacejavax.jcr.query.Query
-
getLimit
public long getLimit() throws javax.jcr.RepositoryException- Throws:
javax.jcr.RepositoryException
-
setOffset
public void setOffset(long offset)
- Specified by:
setOffsetin interfacejavax.jcr.query.Query
-
getOffset
public long getOffset() throws javax.jcr.RepositoryException- Throws:
javax.jcr.RepositoryException
-
getStatement
public String getStatement()
- Specified by:
getStatementin interfacejavax.jcr.query.Query
-
getLanguage
public String getLanguage()
- Specified by:
getLanguagein interfacejavax.jcr.query.Query
-
bindValue
public void bindValue(String varName, javax.jcr.Value value) throws javax.jcr.RepositoryException
- Specified by:
bindValuein interfacejavax.jcr.query.Query- Throws:
javax.jcr.RepositoryException
-
getBindVariableNames
public String[] getBindVariableNames() throws javax.jcr.RepositoryException
- Specified by:
getBindVariableNamesin interfacejavax.jcr.query.Query- Throws:
javax.jcr.RepositoryException
-
getBindVariables
public Map<String,javax.jcr.Value> getBindVariables() throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
-
getStoredQueryPath
public String getStoredQueryPath() throws javax.jcr.RepositoryException
- Specified by:
getStoredQueryPathin interfacejavax.jcr.query.Query- Throws:
javax.jcr.RepositoryException
-
storeAsNode
public javax.jcr.Node storeAsNode(String absPath) throws javax.jcr.RepositoryException
- Specified by:
storeAsNodein interfacejavax.jcr.query.Query- Throws:
javax.jcr.RepositoryException
-
-