Class LiteralNode
- java.lang.Object
-
- org.eclipse.persistence.internal.jpa.parsing.Node
-
- org.eclipse.persistence.internal.jpa.parsing.LiteralNode
-
- All Implemented Interfaces:
AliasableNode
- Direct Known Subclasses:
BooleanLiteralNode
,DoubleLiteralNode
,FloatLiteralNode
,IntegerLiteralNode
,LongLiteralNode
,StringLiteralNode
,TemporalLiteralNode
public class LiteralNode extends Node implements AliasableNode
INTERNALPurpose: Superclass for literals (String, Integer, Float, Character, ...)
Responsibilities:
- Maintain the literal being represented
- Print to a string
- Answer if the node is completely built
- Since:
- TopLink 4.0
- Author:
- Jon Driscoll and Joel Lucuik
-
-
Constructor Summary
Constructors Constructor Description LiteralNode()
Return a new LiteralNode.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context)
INTERNAL Apply this node to the passed queryExpression
generateExpression(GenerationContext context)
INTERNAL Generate the a new EclipseLink ConstantExpression for this node.String
getAsString()
INTERNAL Return the literalObject
getLiteral()
Insert the method's description here.boolean
isAliasableNode()
boolean
isLiteralNode()
INTERNAL Is this a literal nodevoid
setLiteral(Object newLiteral)
Insert the method's description here.String
toString(int indent)
-
Methods inherited from class org.eclipse.persistence.internal.jpa.parsing.Node
addToExpression, appendExpression, getAlias, getColumn, getLeft, getLine, getRight, getType, hasLeft, hasRight, isAggregateNode, isAttributeNode, isConstructorNode, isCountNode, isDivideNode, isDotNode, isEscape, isMapKeyNode, isMinusNode, isMultiplyNode, isNotNode, isParameterNode, isPlusNode, isSubqueryNode, isVariableNode, qualifyAttributeAccess, resolveAttribute, resolveClass, resolveClass, resolveMapping, resolveMapping, setAlias, setColumn, setLeft, setLine, setRight, setType, toString, toStringDisplayName, toStringIndent, validate, validateParameter
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.persistence.internal.jpa.parsing.AliasableNode
getAlias, setAlias
-
-
-
-
Field Detail
-
literal
public Object literal
-
-
Method Detail
-
applyToQuery
public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context)
INTERNAL Apply this node to the passed query- Overrides:
applyToQuery
in classNode
-
generateExpression
public Expression generateExpression(GenerationContext context)
INTERNAL Generate the a new EclipseLink ConstantExpression for this node.- Overrides:
generateExpression
in classNode
-
getAsString
public String getAsString()
INTERNAL Return the literal- Overrides:
getAsString
in classNode
-
getLiteral
public Object getLiteral()
Insert the method's description here. Creation date: (12/21/00 10:51:48 AM)- Returns:
- java.lang.Object
-
isLiteralNode
public boolean isLiteralNode()
INTERNAL Is this a literal node- Overrides:
isLiteralNode
in classNode
-
setLiteral
public void setLiteral(Object newLiteral)
Insert the method's description here. Creation date: (12/21/00 10:51:48 AM)- Parameters:
newLiteral
- java.lang.Object
-
isAliasableNode
public boolean isAliasableNode()
- Overrides:
isAliasableNode
in classNode
-
-