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
public abstract class SimpleNode extends Object implements Node, Serializable, EJBQLExpression
A base node for the EJBQL concrete nodes that satisfies JJTree requirements.
- Since:
- 3.0
- See Also:
- Serialized Form
- 
Constructor SummaryConstructors Constructor Description SimpleNode(int id)
- 
Method SummaryModifier and Type Method Description EJBQLExpressiongetChild(int index)Returns a child expression node at the specified index.intgetChildrenCount()Returns a number of child operands of this expression node.StringgetName()StringgetText()Returns a text property of the node.booleanisNegated()Returns an optional boolean flag that negates the value of the expression.voidjjtAddChild(Node n, int i)This method tells the node to add its argument to the node's list of children.voidjjtClose()This method is called after all the child nodes have been added.NodejjtGetChild(int i)This method returns a child node.intjjtGetNumChildren()Return the number of children the node has.NodejjtGetParent()voidjjtOpen()This method is called after the node has been made the current node.voidjjtSetParent(Node parent)This pair of methods are used to inform the node of its parent.voidsetText(String text)StringtoString()voidvisit(EJBQLExpressionVisitor visitor)A recursive visit method that passes a visitor to this node and all its children, depth first.protected booleanvisitChild(EJBQLExpressionVisitor visitor, int childIndex)Recursively visits a child at the specified index.protected booleanvisitNode(EJBQLExpressionVisitor visitor)Visits this node without recursion.
- 
Constructor Details- 
SimpleNodepublic SimpleNode(int id)
 
- 
- 
Method Details- 
getTextDescription copied from interface:EJBQLExpressionReturns a text property of the node.- Specified by:
- getTextin interface- EJBQLExpression
 
- 
isNegatedpublic boolean isNegated()Description copied from interface:EJBQLExpressionReturns an optional boolean flag that negates the value of the expression.- Specified by:
- isNegatedin interface- EJBQLExpression
 
- 
visitA recursive visit method that passes a visitor to this node and all its children, depth first.- Specified by:
- visitin interface- EJBQLExpression
 
- 
visitNodeVisits this node without recursion. Default implementation simply returns true. Subclasses override this method to call an appropriate visitor method.
- 
visitChildRecursively visits a child at the specified index. Subclasses override this method if they desire to implement callbacks after visiting each child.
- 
getChildDescription copied from interface:EJBQLExpressionReturns a child expression node at the specified index.- Specified by:
- getChildin interface- EJBQLExpression
 
- 
getChildrenCountpublic int getChildrenCount()Description copied from interface:EJBQLExpressionReturns a number of child operands of this expression node.- Specified by:
- getChildrenCountin interface- EJBQLExpression
 
- 
getName
- 
jjtOpenpublic void jjtOpen()Description copied from interface:NodeThis method is called after the node has been made the current node. It indicates that child nodes can now be added to it.
- 
jjtClosepublic void jjtClose()Description copied from interface:NodeThis method is called after all the child nodes have been added.
- 
jjtSetParentDescription copied from interface:NodeThis pair of methods are used to inform the node of its parent.- Specified by:
- jjtSetParentin interface- Node
 
- 
jjtGetParent- Specified by:
- jjtGetParentin interface- Node
 
- 
jjtAddChildDescription copied from interface:NodeThis method tells the node to add its argument to the node's list of children.- Specified by:
- jjtAddChildin interface- Node
 
- 
jjtGetChildDescription copied from interface:NodeThis method returns a child node. The children are numbered from zero, left to right.- Specified by:
- jjtGetChildin interface- Node
 
- 
jjtGetNumChildrenpublic int jjtGetNumChildren()Description copied from interface:NodeReturn the number of children the node has.- Specified by:
- jjtGetNumChildrenin interface- Node
 
- 
setText
- 
toString
 
-