Package org.apache.cayenne.ejbql.parser
Class SimpleNode
java.lang.Object
org.apache.cayenne.ejbql.parser.SimpleNode
- All Implemented Interfaces:
Serializable
,EJBQLExpression
,Node
- Direct Known Subclasses:
AggregateConditionNode
,EJBQLAbs
,EJBQLAbstractSchemaName
,EJBQLAdd
,EJBQLAggregate
,EJBQLAggregateColumn
,EJBQLAll
,EJBQLAny
,EJBQLAscending
,EJBQLBetween
,EJBQLBooleanLiteral
,EJBQLClassName
,EJBQLConcat
,EJBQLConstructor
,EJBQLConstructorParameter
,EJBQLConstructorParameters
,EJBQLCurrentDate
,EJBQLCurrentTime
,EJBQLCurrentTimestamp
,EJBQLDecimalLiteral
,EJBQLDelete
,EJBQLDescending
,EJBQLDistinct
,EJBQLDivide
,EJBQLEquals
,EJBQLEscapeCharacter
,EJBQLExists
,EJBQLFrom
,EJBQLFromItem
,EJBQLGreaterOrEqual
,EJBQLGreaterThan
,EJBQLGroupBy
,EJBQLHaving
,EJBQLIdentificationVariable
,EJBQLIdentifier
,EJBQLIn
,EJBQLIntegerLiteral
,EJBQLIsEmpty
,EJBQLIsNull
,EJBQLJoin
,EJBQLLength
,EJBQLLessOrEqual
,EJBQLLessThan
,EJBQLLike
,EJBQLLocate
,EJBQLLower
,EJBQLMemberOf
,EJBQLMod
,EJBQLMultiply
,EJBQLNamedInputParameter
,EJBQLNegative
,EJBQLNotEquals
,EJBQLOrderBy
,EJBQLOrderByItem
,EJBQLPath
,EJBQLPatternValue
,EJBQLPositionalInputParameter
,EJBQLSelect
,EJBQLSelectClause
,EJBQLSelectExpression
,EJBQLSelectExpressions
,EJBQLSize
,EJBQLSqrt
,EJBQLStringLiteral
,EJBQLSubselect
,EJBQLSubstring
,EJBQLSubtract
,EJBQLTok
,EJBQLTrim
,EJBQLTrimCharacter
,EJBQLTrimSpecification
,EJBQLUpdate
,EJBQLUpdateField
,EJBQLUpdateItem
,EJBQLUpdateValue
,EJBQLUpper
,EJBQLWhere
A base node for the EJBQL concrete nodes that satisfies JJTree requirements.
- Since:
- 3.0
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetChild
(int index) Returns a child expression node at the specified index.int
Returns a number of child operands of this expression node.getName()
getText()
Returns a text property of the node.boolean
Returns an optional boolean flag that negates the value of the expression.void
jjtAddChild
(Node n, int i) This method tells the node to add its argument to the node's list of children.void
jjtClose()
This method is called after all the child nodes have been added.jjtGetChild
(int i) This method returns a child node.int
Return the number of children the node has.void
jjtOpen()
This method is called after the node has been made the current node.void
jjtSetParent
(Node parent) This pair of methods are used to inform the node of its parent.void
toString()
void
visit
(EJBQLExpressionVisitor visitor) A recursive visit method that passes a visitor to this node and all its children, depth first.protected boolean
visitChild
(EJBQLExpressionVisitor visitor, int childIndex) Recursively visits a child at the specified index.protected boolean
visitNode
(EJBQLExpressionVisitor visitor) Visits this node without recursion.
-
Constructor Details
-
SimpleNode
public SimpleNode(int id)
-
-
Method Details
-
getText
Description copied from interface:EJBQLExpression
Returns a text property of the node.- Specified by:
getText
in interfaceEJBQLExpression
-
isNegated
public boolean isNegated()Description copied from interface:EJBQLExpression
Returns an optional boolean flag that negates the value of the expression.- Specified by:
isNegated
in interfaceEJBQLExpression
-
visit
A recursive visit method that passes a visitor to this node and all its children, depth first.- Specified by:
visit
in interfaceEJBQLExpression
-
visitNode
Visits this node without recursion. Default implementation simply returns true. Subclasses override this method to call an appropriate visitor method. -
visitChild
Recursively visits a child at the specified index. Subclasses override this method if they desire to implement callbacks after visiting each child. -
getChild
Description copied from interface:EJBQLExpression
Returns a child expression node at the specified index.- Specified by:
getChild
in interfaceEJBQLExpression
-
getChildrenCount
public int getChildrenCount()Description copied from interface:EJBQLExpression
Returns a number of child operands of this expression node.- Specified by:
getChildrenCount
in interfaceEJBQLExpression
-
getName
-
jjtOpen
public void jjtOpen()Description copied from interface:Node
This method is called after the node has been made the current node. It indicates that child nodes can now be added to it. -
jjtClose
public void jjtClose()Description copied from interface:Node
This method is called after all the child nodes have been added. -
jjtSetParent
Description copied from interface:Node
This pair of methods are used to inform the node of its parent.- Specified by:
jjtSetParent
in interfaceNode
-
jjtGetParent
- Specified by:
jjtGetParent
in interfaceNode
-
jjtAddChild
Description copied from interface:Node
This method tells the node to add its argument to the node's list of children.- Specified by:
jjtAddChild
in interfaceNode
-
jjtGetChild
Description copied from interface:Node
This method returns a child node. The children are numbered from zero, left to right.- Specified by:
jjtGetChild
in interfaceNode
-
jjtGetNumChildren
public int jjtGetNumChildren()Description copied from interface:Node
Return the number of children the node has.- Specified by:
jjtGetNumChildren
in interfaceNode
-
setText
-
toString
-