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

public Class DotNode

extends LogicalOperatorNode
implements AliasableNode
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.internal.jpa.parsing.AliasableNode
Imports
org.eclipse.persistence.exceptions.JPQLException, org.eclipse.persistence.expressions.*, org.eclipse.persistence.internal.expressions.*, org.eclipse.persistence.mappings.DatabaseMapping, org.eclipse.persistence.queries.ObjectLevelReadQuery, .ReportQuery

INTERNAL

Purpose: This node represents an 'DOT' (i.e. '.') on the input stream. The left and right will depend on the input stream.

Responsibilities:

Author
Jon Driscoll and Joel Lucuik
Since
TopLink 4.0

Field Summary

Modifier and TypeField and Description
private Object

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context)

Overrides org.eclipse.persistence.internal.jpa.parsing.Node.applyToQuery.

INTERNAL Apply this node to the passed query
private void
checkNavigation(Node node, ParseTreeContext context)

INTERNAL Checks whether the left hand side of this dot node is navigable.

public boolean
endsWithCollectionField(GenerationContext context)

INTERNAL (): Answer true if the node has a left and right, and the right represents a collection mapping.

public boolean
endsWithDirectToField(GenerationContext context)

INTERNAL (): Answer true if the SELECTed node has a left and right, and the right represents a direct-to-field mapping.

public Expression
generateExpression(GenerationContext context)

Overrides org.eclipse.persistence.internal.jpa.parsing.Node.generateExpression.

INTERNAL Return a TopLink expression by getting the required variables using the left and right nodes "emp.address.city" = builder.get("address").get("city")
public String
getAsString()

Overrides org.eclipse.persistence.internal.jpa.parsing.Node.getAsString.

INTERNAL Get the string representation of this node.
public Node
getLeftMostNode()

INTERNAL Return the left most node of a dot expr, so return 'a' for 'a.b.c'.

public Node
getRightMostNode()

INTERNAL Return the right most node of a dot expr, so return 'c' for 'a.b.c'.

public Object
public Class<?>
getTypeOfDirectToField(GenerationContext context)

INTERNAL Returns the attribute type if the right represents a direct-to-field mapping.

public boolean
private boolean
public boolean
isDotNode()

Overrides org.eclipse.persistence.internal.jpa.parsing.Node.isDotNode.

INTERNAL Yes, this is a dot node
public Node
qualifyAttributeAccess(ParseTreeContext context)

Overrides org.eclipse.persistence.internal.jpa.parsing.Node.qualifyAttributeAccess.

INTERNAL Check the left child node for an unqualified field access.
public String
resolveAttribute()

Overrides org.eclipse.persistence.internal.jpa.parsing.Node.resolveAttribute.

INTERNAL Answer the name of the attribute which is represented by the receiver's right node.
public Class<?>
resolveClass(GenerationContext context)

Overrides org.eclipse.persistence.internal.jpa.parsing.Node.resolveClass.

resolveClass: Answer the class which results from traversing the mappings for the receiver's nodes
private Object
resolveEnumTypeName(String name, TypeHelper helper)

INTERNAL Returns the type representation for the specified type name.

public DatabaseMapping
resolveMapping(GenerationContext context)

Overrides org.eclipse.persistence.internal.jpa.parsing.Node.resolveMapping.

INTERNAL Answer the mapping resulting from traversing the receiver's nodes
public void
validate(ParseTreeContext context)

Overrides org.eclipse.persistence.internal.jpa.parsing.LogicalOperatorNode.validate.

INTERNAL Validate node and calculate its type.

Field Detail

enumConstantback to summary
private Object enumConstant

Constructor Detail

DotNodeback to summary
public DotNode()

Method Detail

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

Overrides org.eclipse.persistence.internal.jpa.parsing.Node.applyToQuery.

INTERNAL Apply this node to the passed query

Annotations
@Override
checkNavigationback to summary
private void checkNavigation(Node node, ParseTreeContext context)

INTERNAL Checks whether the left hand side of this dot node is navigable.

endsWithCollectionFieldback to summary
public boolean endsWithCollectionField(GenerationContext context)

INTERNAL (): Answer true if the node has a left and right, and the right represents a collection mapping.

endsWithDirectToFieldback to summary
public boolean endsWithDirectToField(GenerationContext context)

INTERNAL (): Answer true if the SELECTed node has a left and right, and the right represents a direct-to-field mapping.

generateExpressionback to summary
public Expression generateExpression(GenerationContext context)

Overrides org.eclipse.persistence.internal.jpa.parsing.Node.generateExpression.

INTERNAL Return a TopLink expression by getting the required variables using the left and right nodes "emp.address.city" = builder.get("address").get("city")

Annotations
@Override
getAsStringback to summary
public String getAsString()

Overrides org.eclipse.persistence.internal.jpa.parsing.Node.getAsString.

INTERNAL Get the string representation of this node.

Annotations
@Override
getLeftMostNodeback to summary
public Node getLeftMostNode()

INTERNAL Return the left most node of a dot expr, so return 'a' for 'a.b.c'.

getRightMostNodeback to summary
public Node getRightMostNode()

INTERNAL Return the right most node of a dot expr, so return 'c' for 'a.b.c'.

getTypeForMapKeyback to summary
public Object getTypeForMapKey(ParseTreeContext context)
getTypeOfDirectToFieldback to summary
public Class<?> getTypeOfDirectToField(GenerationContext context)

INTERNAL Returns the attribute type if the right represents a direct-to-field mapping.

isAliasableNodeback to summary
public boolean isAliasableNode()

Overrides org.eclipse.persistence.internal.jpa.parsing.Node.isAliasableNode.

Annotations
@Override
isDeclaredVariableback to summary
private boolean isDeclaredVariable(Node node, ParseTreeContext context)
isDotNodeback to summary
public boolean isDotNode()

Overrides org.eclipse.persistence.internal.jpa.parsing.Node.isDotNode.

INTERNAL Yes, this is a dot node

Annotations
@Override
qualifyAttributeAccessback to summary
public Node qualifyAttributeAccess(ParseTreeContext context)

Overrides org.eclipse.persistence.internal.jpa.parsing.Node.qualifyAttributeAccess.

INTERNAL Check the left child node for an unqualified field access. The method delegates to the left most expression of multi-navigation path expression.

Annotations
@Override
resolveAttributeback to summary
public String resolveAttribute()

Overrides org.eclipse.persistence.internal.jpa.parsing.Node.resolveAttribute.

INTERNAL Answer the name of the attribute which is represented by the receiver's right node.

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

Overrides org.eclipse.persistence.internal.jpa.parsing.Node.resolveClass.

resolveClass: Answer the class which results from traversing the mappings for the receiver's nodes

Annotations
@Override
resolveEnumTypeNameback to summary
private Object resolveEnumTypeName(String name, TypeHelper helper)

INTERNAL Returns the type representation for the specified type name. The method looks for inner classes if it cannot resolve the type name.

resolveMappingback to summary
public DatabaseMapping resolveMapping(GenerationContext context)

Overrides org.eclipse.persistence.internal.jpa.parsing.Node.resolveMapping.

INTERNAL Answer the mapping resulting from traversing the receiver's nodes

Annotations
@Override
validateback to summary
public void validate(ParseTreeContext context)

Overrides org.eclipse.persistence.internal.jpa.parsing.LogicalOperatorNode.validate.

INTERNAL Validate node and calculate its type. Check for enum literals.

Annotations
@Override