Top Description Fields Constructors Methods
org.eclipse.persistence.internal.jpa.parsing

public Class Node

extends Object
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.internal.jpa.parsing.FunctionalExpressionNode, org.eclipse.persistence.internal.jpa.parsing.NullIfNode, org.eclipse.persistence.internal.jpa.parsing.OrderByItemNode, org.eclipse.persistence.internal.jpa.parsing.ParameterNode, org.eclipse.persistence.internal.jpa.parsing.SimpleConditionalExpressionNode, org.eclipse.persistence.internal.jpa.parsing.SomeNode, org.eclipse.persistence.internal.jpa.parsing.SortDirectionNode, org.eclipse.persistence.internal.jpa.parsing.SubqueryNode, org.eclipse.persistence.internal.jpa.parsing.UnaryMinus, org.eclipse.persistence.internal.jpa.parsing.VariableNode, org.eclipse.persistence.internal.jpa.parsing.WhenThenNode, org.eclipse.persistence.internal.jpa.parsing.AggregateNode, org.eclipse.persistence.internal.jpa.parsing.AllNode, org.eclipse.persistence.internal.jpa.parsing.AnyNode, org.eclipse.persistence.internal.jpa.parsing.AttributeNode, org.eclipse.persistence.internal.jpa.parsing.BinaryOperatorNode, org.eclipse.persistence.internal.jpa.parsing.CaseNode, org.eclipse.persistence.internal.jpa.parsing.ClassForInheritanceNode, org.eclipse.persistence.internal.jpa.parsing.CoalesceNode, org.eclipse.persistence.internal.jpa.parsing.ConstructorNode, org.eclipse.persistence.internal.jpa.parsing.ExistsNode, org.eclipse.persistence.internal.jpa.parsing.FetchJoinNode, org.eclipse.persistence.internal.jpa.parsing.IdentificationVariableDeclNode, org.eclipse.persistence.internal.jpa.parsing.IndexNode, org.eclipse.persistence.internal.jpa.parsing.LiteralNode, org.eclipse.persistence.internal.jpa.parsing.LogicalOperatorNode, org.eclipse.persistence.internal.jpa.parsing.MajorNode, org.eclipse.persistence.internal.jpa.parsing.MapEntryNode, org.eclipse.persistence.internal.jpa.parsing.MapKeyNode
Imports
org.eclipse.persistence.expressions.*, org.eclipse.persistence.mappings.DatabaseMapping, org.eclipse.persistence.queries.ObjectLevelReadQuery

INTERNAL

Purpose: This is the superclass for all Nodes.

Responsibilities:

Author
Jon Driscoll and Joel Lucuik
Since
TopLink 4.0

Field Summary

Modifier and TypeField and Description
protected String
private int
protected Node
private int
protected Node
public boolean
private Object

Constructor Summary

AccessConstructor and Description
public
Node()

Return a new Node.

Method Summary

Modifier and TypeMethod and Description
public Expression
addToExpression(Expression parentExpression, GenerationContext context)

INTERNAL Add my expression semantics to the parentExpression.

public Expression
appendExpression(Expression left, Expression right)

INTERNAL Returns left.and(right) if both are defined.

public void
applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context)

INTERNAL Apply this node to the passed query

public Expression
generateExpression(GenerationContext context)

INTERNAL Generate an expression for the node.

public String
public String
getAsString()

INTERNAL Get the string representation of this node.

public int
public Node
getLeft()

INTERNAL Return the left node

public int
public Node
getRight()

INTERNAL Return the right node

public Object
getType()

INTERNAL Return the type of this node.

public boolean
hasLeft()

INTERNAL Does this node have a left

public boolean
hasRight()

INTERNAL Does this node have a right

public boolean
isAggregateNode()

INTERNAL Is this node an Aggregate node

public boolean
public boolean
isAttributeNode()

INTERNAL Is this node an AttributeNode

public boolean
isConstructorNode()

INTERNAL Is this node a ConstructorNode

public boolean
isCountNode()

INTERNAL Is this node a CountNode

public boolean
isDivideNode()

INTERNAL Is this node a Divide node

public boolean
isDotNode()

INTERNAL Is this node a Dot node

public boolean
isEscape()

INTERNAL Is this an escape node

public boolean
isLiteralNode()

INTERNAL Is this a literal node

public boolean
isMapKeyNode()

INTERNAL Is this node a MapKey node

public boolean
isMinusNode()

INTERNAL Is this node a Minus node

public boolean
isMultiplyNode()

INTERNAL Is this node a Multiply node

public boolean
isNotNode()

INTERNAL Is this node a Not node

public boolean
isParameterNode()

INTERNAL Is this a Parameter node

public boolean
isPlusNode()

INTERNAL Is this node a Plus node

public boolean
isSubqueryNode()

INTERNAL Is this node a SubqueryNode

public boolean
isVariableNode()

INTERNAL Is this node a VariableNode

public Node
qualifyAttributeAccess(ParseTreeContext context)

INTERNAL Check the child node for an unqualified field access and if so, replace it by a qualified field access.

public String
resolveAttribute()

resolveAttribute(): Answer the name of the attribute which is represented by the receiver.

public Class<?>
resolveClass(GenerationContext context)

resolveClass: Answer the class associated with the content of this node.

public Class<?>
resolveClass(GenerationContext context, Class<?> ownerClass)

resolveClass: Answer the class associated with the content of this node.

public DatabaseMapping
resolveMapping(GenerationContext context)

resolveMapping: Answer the mapping associated with the contained nodes.

public DatabaseMapping
resolveMapping(GenerationContext context, Class<?> ownerClass)

resolveMapping: Answer the mapping associated with the contained nodes.

public void
public void
setColumn(int column)

public void
setLeft(Node newLeft)

INTERNAL Set the left node to the passed value

public void
setLine(int line)

public void
setRight(Node newRight)

INTERNAL Set the right for this node

public void
setType(Object type)

INTERNAL Set this node's type.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public String
toString(int indent)

public String
public void
toStringIndent(int indent, StringBuilder buffer)

public void
validate(ParseTreeContext context)

INTERNAL Validate node and calculate its type.

public void
validateParameter(ParseTreeContext context, Object contextType)

INTERNAL

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

aliasback to summary
protected String alias
columnback to summary
private int column
leftback to summary
protected Node left
lineback to summary
private int line
shouldGenerateExpressionback to summary
public boolean shouldGenerateExpression
typeback to summary
private Object type

Constructor Detail

Nodeback to summary
public Node()

Return a new Node.

Method Detail

addToExpressionback to summary
public Expression addToExpression(Expression parentExpression, GenerationContext context)

INTERNAL Add my expression semantics to the parentExpression. Each subclass will add a different expression and thus will need to override this method

appendExpressionback to summary
public Expression appendExpression(Expression left, Expression right)

INTERNAL Returns left.and(right) if both are defined.

applyToQueryback to summary
public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context)

INTERNAL Apply this node to the passed query

generateExpressionback to summary
public Expression generateExpression(GenerationContext context)

INTERNAL Generate an expression for the node. Each subclass will generate a different expression and thus will need to override this method

getAliasback to summary
public String getAlias()
getAsStringback to summary
public String getAsString()

INTERNAL Get the string representation of this node. By default return toString()

getColumnback to summary
public int getColumn()
getLeftback to summary
public Node getLeft()

INTERNAL Return the left node

getLineback to summary
public int getLine()
getRightback to summary
public Node getRight()

INTERNAL Return the right node

getTypeback to summary
public Object getType()

INTERNAL Return the type of this node.

hasLeftback to summary
public boolean hasLeft()

INTERNAL Does this node have a left

hasRightback to summary
public boolean hasRight()

INTERNAL Does this node have a right

isAggregateNodeback to summary
public boolean isAggregateNode()

INTERNAL Is this node an Aggregate node

isAliasableNodeback to summary
public boolean isAliasableNode()
isAttributeNodeback to summary
public boolean isAttributeNode()

INTERNAL Is this node an AttributeNode

isConstructorNodeback to summary
public boolean isConstructorNode()

INTERNAL Is this node a ConstructorNode

isCountNodeback to summary
public boolean isCountNode()

INTERNAL Is this node a CountNode

isDivideNodeback to summary
public boolean isDivideNode()

INTERNAL Is this node a Divide node

isDotNodeback to summary
public boolean isDotNode()

INTERNAL Is this node a Dot node

isEscapeback to summary
public boolean isEscape()

INTERNAL Is this an escape node

isLiteralNodeback to summary
public boolean isLiteralNode()

INTERNAL Is this a literal node

isMapKeyNodeback to summary
public boolean isMapKeyNode()

INTERNAL Is this node a MapKey node

isMinusNodeback to summary
public boolean isMinusNode()

INTERNAL Is this node a Minus node

isMultiplyNodeback to summary
public boolean isMultiplyNode()

INTERNAL Is this node a Multiply node

isNotNodeback to summary
public boolean isNotNode()

INTERNAL Is this node a Not node

isParameterNodeback to summary
public boolean isParameterNode()

INTERNAL Is this a Parameter node

isPlusNodeback to summary
public boolean isPlusNode()

INTERNAL Is this node a Plus node

isSubqueryNodeback to summary
public boolean isSubqueryNode()

INTERNAL Is this node a SubqueryNode

isVariableNodeback to summary
public boolean isVariableNode()

INTERNAL Is this node a VariableNode

qualifyAttributeAccessback to summary
public Node qualifyAttributeAccess(ParseTreeContext context)

INTERNAL Check the child node for an unqualified field access and if so, replace it by a qualified field access.

resolveAttributeback to summary
public String resolveAttribute()

resolveAttribute(): Answer the name of the attribute which is represented by the receiver. Subclasses should override this.

resolveClassback to summary
public Class<?> resolveClass(GenerationContext context)

resolveClass: Answer the class associated with the content of this node. Default is to return null. Subclasses should override this.

resolveClassback to summary
public Class<?> resolveClass(GenerationContext context, Class<?> ownerClass)

resolveClass: Answer the class associated with the content of this node. Default is to return null. Subclasses should override this.

resolveMappingback to summary
public DatabaseMapping resolveMapping(GenerationContext context)

resolveMapping: Answer the mapping associated with the contained nodes. Subclasses should override this.

resolveMappingback to summary
public DatabaseMapping resolveMapping(GenerationContext context, Class<?> ownerClass)

resolveMapping: Answer the mapping associated with the contained nodes. Use the provided class as the context. Subclasses should override this.

setAliasback to summary
public void setAlias(String alias)
setColumnback to summary
public void setColumn(int column)
setLeftback to summary
public void setLeft(Node newLeft)

INTERNAL Set the left node to the passed value

setLineback to summary
public void setLine(int line)
setRightback to summary
public void setRight(Node newRight)

INTERNAL Set the right for this node

setTypeback to summary
public void setType(Object type)

INTERNAL Set this node's type.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
toStringback to summary
public String toString(int indent)
toStringDisplayNameback to summary
public String toStringDisplayName()
toStringIndentback to summary
public void toStringIndent(int indent, StringBuilder buffer)
validateback to summary
public void validate(ParseTreeContext context)

INTERNAL Validate node and calculate its type.

validateParameterback to summary
public void validateParameter(ParseTreeContext context, Object contextType)

INTERNAL