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

public Class AttributeNode

extends Node
Class Inheritance
Imports
org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.exceptions.JPQLException, org.eclipse.persistence.expressions.*, org.eclipse.persistence.mappings.DatabaseMapping, org.eclipse.persistence.mappings.querykeys.QueryKey

INTERNAL

Purpose: Represent a attribute.

Responsibilities:

Field Summary

Modifier and TypeField and Description
private QueryKey
private String
private DatabaseMapping
private String
name

The attribute name.

private boolean
outerJoin

Flag indicating outer join

private boolean
Inherited from org.eclipse.persistence.internal.jpa.parsing.Node:
aliasleftrightshouldGenerateExpression

Constructor Summary

AccessConstructor and Description
public
AttributeNode()

Create a new AttributeNode

public
AttributeNode(String
the attribute name
name
)

Create a new AttributeNode with the passed name

Method Summary

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

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

INTERNAL Add my expression semantics to the parentExpression.
public Expression
public void
checkForQueryKey(Object ownerType, TypeHelper typeHelper)

public Object
computeActualType(Object initialType, TypeHelper typeHelper)

public String
getAsString()

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

INTERNAL Get the string representation of this node.
public String
public String
public DatabaseMapping
public boolean
public boolean
public boolean
public Node
qualifyAttributeAccess(ParseTreeContext context)

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

INTERNAL If called this AttributeNode represents an unqualified field access.
public boolean
public Class<?>
resolveClass(GenerationContext context, Class<?> ownerClass)

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

resolveClass: Answer the class for the mapping associated with the my variableName in the ownerClass.
public DatabaseMapping
resolveMapping(GenerationContext context, Class<?> ownerClass)

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

resolveMapping: Answer the mapping which corresponds to my variableName.
public void
public void
setCastClassName(String castClassName)

public void
public void
setOuterJoin(boolean outerJoin)

public void
setRequiresCollectionAttribute(boolean requiresCollectionAttribute)

public String
public void
validate(ParseTreeContext context)

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

INTERNAL Validate the current node and calculates its type.
Inherited from org.eclipse.persistence.internal.jpa.parsing.Node:
appendExpressionapplyToQuerygenerateExpressiongetAliasgetColumngetLeftgetLinegetRightgetTypehasLefthasRightisAggregateNodeisAliasableNodeisConstructorNodeisCountNodeisDivideNodeisDotNodeisEscapeisLiteralNodeisMapKeyNodeisMinusNodeisMultiplyNodeisNotNodeisParameterNodeisPlusNodeisSubqueryNodeisVariableNoderesolveAttributeresolveClassresolveMappingsetAliassetColumnsetLeftsetLinesetRightsetTypetoStringtoStringDisplayNametoStringIndentvalidateParameter

Field Detail

attributeQueryKeyback to summary
private QueryKey attributeQueryKey
castClassNameback to summary
private String castClassName
mappingback to summary
private DatabaseMapping mapping
nameback to summary
private String name

The attribute name.

outerJoinback to summary
private boolean outerJoin

Flag indicating outer join

requiresCollectionAttributeback to summary
private boolean requiresCollectionAttribute

Constructor Detail

AttributeNodeback to summary
public AttributeNode()

Create a new AttributeNode

AttributeNodeback to summary
public AttributeNode(String name)

Create a new AttributeNode with the passed name

Parameters
name:String

the attribute name

Method Detail

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

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

Doc from org.eclipse.persistence.internal.jpa.parsing.Node.addToExpression.

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

Annotations
@Override
appendCastback to summary
public Expression appendCast(Expression exp, GenerationContext context)
checkForQueryKeyback to summary
public void checkForQueryKey(Object ownerType, TypeHelper typeHelper)
computeActualTypeback to summary
public Object computeActualType(Object initialType, TypeHelper typeHelper)
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
getAttributeNameback to summary
public String getAttributeName()
getCastClassNameback to summary
public String getCastClassName()
getMappingback to summary
public DatabaseMapping getMapping()
isAttributeNodeback to summary
public boolean isAttributeNode()

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

INTERNAL Is this node an AttributeNode

Annotations
@Override
isCollectionAttributeback to summary
public boolean isCollectionAttribute()
isOuterJoinback to summary
public boolean isOuterJoin()
qualifyAttributeAccessback to summary
public Node qualifyAttributeAccess(ParseTreeContext context)

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

INTERNAL If called this AttributeNode represents an unqualified field access. The method returns a DotNode representing a qualified field access with the base variable as left child node and the attribute as right child node.

Annotations
@Override
requiresCollectionAttributeback to summary
public boolean requiresCollectionAttribute()
resolveClassback to summary
public Class<?> resolveClass(GenerationContext context, Class<?> ownerClass)

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

resolveClass: Answer the class for the mapping associated with the my variableName in the ownerClass. Answer null if the node represents a mapping that doesn't exist

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

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

resolveMapping: Answer the mapping which corresponds to my variableName.

Annotations
@Override
setAttributeNameback to summary
public void setAttributeName(String name)
setCastClassNameback to summary
public void setCastClassName(String castClassName)
setMappingback to summary
public void setMapping(DatabaseMapping mapping)
setOuterJoinback to summary
public void setOuterJoin(boolean outerJoin)
setRequiresCollectionAttributeback to summary
public void setRequiresCollectionAttribute(boolean requiresCollectionAttribute)
toStringback to summary
public String toString(int indent)

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

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

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

INTERNAL Validate the current node and calculates its type.

Annotations
@Override