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 void
bindValue(String varName, javax.jcr.Value value)
javax.jcr.query.QueryResult
execute()
String[]
getBindVariableNames()
Map<String,javax.jcr.Value>
getBindVariables()
String
getLanguage()
long
getLimit()
long
getOffset()
String
getStatement()
String
getStoredQueryPath()
void
setLimit(long limit)
void
setOffset(long offset)
javax.jcr.Node
storeAsNode(String absPath)
-
-
-
Method Detail
-
execute
public javax.jcr.query.QueryResult execute() throws javax.jcr.RepositoryException
- Specified by:
execute
in interfacejavax.jcr.query.Query
- Throws:
javax.jcr.RepositoryException
-
setLimit
public void setLimit(long limit)
- Specified by:
setLimit
in interfacejavax.jcr.query.Query
-
getLimit
public long getLimit() throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
-
setOffset
public void setOffset(long offset)
- Specified by:
setOffset
in interfacejavax.jcr.query.Query
-
getOffset
public long getOffset() throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
-
getStatement
public String getStatement()
- Specified by:
getStatement
in interfacejavax.jcr.query.Query
-
getLanguage
public String getLanguage()
- Specified by:
getLanguage
in interfacejavax.jcr.query.Query
-
bindValue
public void bindValue(String varName, javax.jcr.Value value) throws javax.jcr.RepositoryException
- Specified by:
bindValue
in interfacejavax.jcr.query.Query
- Throws:
javax.jcr.RepositoryException
-
getBindVariableNames
public String[] getBindVariableNames() throws javax.jcr.RepositoryException
- Specified by:
getBindVariableNames
in 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:
getStoredQueryPath
in interfacejavax.jcr.query.Query
- Throws:
javax.jcr.RepositoryException
-
storeAsNode
public javax.jcr.Node storeAsNode(String absPath) throws javax.jcr.RepositoryException
- Specified by:
storeAsNode
in interfacejavax.jcr.query.Query
- Throws:
javax.jcr.RepositoryException
-
-