Class RowPredicate
- java.lang.Object
-
- org.apache.jackrabbit.commons.predicate.RowPredicate
-
- All Implemented Interfaces:
Predicate
public class RowPredicate extends Object implements Predicate
Predicate for checking whether a given object is aRow
and optionally whether it contains a given selector. Subclasses can extend this class to provide more complex checking of the row or the selected node.- Since:
- Apache Jackrabbit 2.2
-
-
Constructor Summary
Constructors Constructor Description RowPredicate()
Creates a row predicate.RowPredicate(String selectorName)
Creates a row predicate that checks the existence of the given selector (if given).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
evaluate(Object object)
Checks whether the given object is aRow
and calls the protectedevaluate(Row)
method to evaluate the row.protected boolean
evaluate(Node node)
Evaluates the given node.protected boolean
evaluate(Row row)
Evaluates the given row.
-
-
-
Constructor Detail
-
RowPredicate
public RowPredicate(String selectorName)
Creates a row predicate that checks the existence of the given selector (if given).- Parameters:
selectorName
- selector name, ornull
-
RowPredicate
public RowPredicate()
Creates a row predicate.
-
-
Method Detail
-
evaluate
public boolean evaluate(Object object)
Checks whether the given object is aRow
and calls the protectedevaluate(Row)
method to evaluate the row.
-
evaluate
protected boolean evaluate(Row row) throws RepositoryException
Evaluates the given row. If a selector name is specified, then the corresponding node in this row is evaluated by calling the protectedevaluate(Node)
method.- Throws:
RepositoryException
-
evaluate
protected boolean evaluate(Node node) throws RepositoryException
Evaluates the given node. The default implementation always returnstrue
.- Throws:
RepositoryException
-
-