Package com.day.cq.search.eval
Interface EvaluationContext
- 
public interface EvaluationContextEvaluationContextis a helper class that provides access to various elements required forPredicateEvaluatorsduring the query evaluation process.- Since:
 - 5.2
 
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Objectget(java.lang.String key)Retrieves an object that is temporarily stored during the current evaluation.javax.jcr.NodegetNode(javax.jcr.query.Row row)Helper method for implementations that returns theNodebehind aRow.java.lang.StringgetPath(javax.jcr.query.Row row)Helper method for returning the path behind a row.PredicateEvaluatorgetPredicateEvaluator(java.lang.String type)Retrieves aPredicateEvaluatorfor the given type.ResourcegetResource(javax.jcr.query.Row row)Helper method that returns the resource for the given row.ResourceResolvergetResourceResolver()Returns a (jcr) resource resolver based on the current session.javax.jcr.SessiongetSession()Returns the session under which theQueryruns.voidput(java.lang.String key, java.lang.Object value)Allows to store any object temporarily for the current evaluation. 
 - 
 
- 
- 
Method Detail
- 
getPredicateEvaluator
PredicateEvaluator getPredicateEvaluator(java.lang.String type)
Retrieves aPredicateEvaluatorfor the given type. 
- 
getSession
javax.jcr.Session getSession()
Returns the session under which theQueryruns. 
- 
getResourceResolver
ResourceResolver getResourceResolver()
Returns a (jcr) resource resolver based on the current session. 
- 
getNode
javax.jcr.Node getNode(javax.jcr.query.Row row)
Helper method for implementations that returns theNodebehind aRow. This method will be obsolete with JCR 2.0, where the newRow.getNode()method will be available.- See Also:
 getPath(Row),getResource(Row)
 
- 
getPath
java.lang.String getPath(javax.jcr.query.Row row)
Helper method for returning the path behind a row. If an error occurs,nullwill be returned.- See Also:
 getNode(Row),getResource(Row)
 
- 
getResource
Resource getResource(javax.jcr.query.Row row)
Helper method that returns the resource for the given row.- See Also:
 getPath(Row),getNode(Row)
 
- 
put
void put(java.lang.String key, java.lang.Object value)Allows to store any object temporarily for the current evaluation. This is useful as the predicate evaluators can be used by multiple executions (in different threads) at the same time and thus need a safe storage - object fields are not usable.- Parameters:
 key- unique key for the valuevalue- any object ornullto remove the entry under key- Since:
 - 5.3
 - See Also:
 get(String)
 
- 
get
java.lang.Object get(java.lang.String key)
Retrieves an object that is temporarily stored during the current evaluation.- Parameters:
 key- unique key for the value- Returns:
 - the value object or 
nullif there is no value stored under the given key - Since:
 - 5.3
 - See Also:
 put(String, Object)
 
 - 
 
 -