Class AssertionNode
- java.lang.Object
-
- org.apache.directory.api.ldap.model.filter.AbstractExprNode
-
- org.apache.directory.api.ldap.model.filter.AssertionNode
-
public abstract class AssertionNode extends AbstractExprNode
Node used for the application of arbitrary predicates on return candidates. Applies dynamic and programatic criteria for the selection of candidates for return. Nodes of this type may be introduced into the filter expression to provided the opportunity to constrain the search further without altering the search algorithm.- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description AssertionNode(Assertion assertion)
Creates an AssertionNode using an arbitrary candidate assertion.AssertionNode(Assertion assertion, String desc)
Creates an AssertionNode using an arbitrary candidate assertion with a descriptions used for filter AST walker dumps.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
accept(FilterVisitor visitor)
Element/node accept method for visitor pattern.boolean
equals(Object obj)
Assertion
getAssertion()
Gets the Assertion used by this assertion node.int
hashCode()
boolean
isLeaf()
Always returns true since an AssertionNode has no children.boolean
isSchemaAware()
Tells if this Node is Schema aware.StringBuilder
printRefinementToBuffer(StringBuilder buf)
Default implementation for this method : just throw an exception.String
toString()
-
Methods inherited from class org.apache.directory.api.ldap.model.filter.AbstractExprNode
clone, get, getAssertionType, set
-
-
-
-
Constructor Detail
-
AssertionNode
public AssertionNode(Assertion assertion)
Creates an AssertionNode using an arbitrary candidate assertion.- Parameters:
assertion
- the arbitrary selection logic.
-
AssertionNode
public AssertionNode(Assertion assertion, String desc)
Creates an AssertionNode using an arbitrary candidate assertion with a descriptions used for filter AST walker dumps.- Parameters:
assertion
- the arbitrary selection logic.desc
- the printout representation for filter prints.
-
-
Method Detail
-
getAssertion
public Assertion getAssertion()
Gets the Assertion used by this assertion node.- Returns:
- the assertion used by this node
-
isLeaf
public boolean isLeaf()
Always returns true since an AssertionNode has no children.- Returns:
- true if the node is a leaf,false otherwise
- See Also:
ExprNode.isLeaf()
-
printRefinementToBuffer
public StringBuilder printRefinementToBuffer(StringBuilder buf)
Description copied from class:AbstractExprNode
Default implementation for this method : just throw an exception.- Specified by:
printRefinementToBuffer
in interfaceExprNode
- Overrides:
printRefinementToBuffer
in classAbstractExprNode
- Parameters:
buf
- the buffer to append to.- Returns:
- The buffer in which the refinement has been appended
- See Also:
ExprNode.printRefinementToBuffer(StringBuilder)
-
isSchemaAware
public boolean isSchemaAware()
Tells if this Node is Schema aware.- Returns:
- true if the Node is SchemaAware
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classAbstractExprNode
- Returns:
true
if both objects are equal- See Also:
Object.equals(Object)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractExprNode
- Returns:
- the instance's hash code
- See Also:
Object.hashCode()
-
accept
public Object accept(FilterVisitor visitor)
Description copied from interface:ExprNode
Element/node accept method for visitor pattern.- Parameters:
visitor
- the filter expression tree structure visitor- Returns:
- the modified element
- See Also:
ExprNode.accept( FilterVisitor)
-
toString
public String toString()
- Overrides:
toString
in classAbstractExprNode
- Returns:
- A string representing the AndNode
- See Also:
Object.toString()
-
-