Top Description Fields Constructors Methods
org.eclipse.persistence.internal.expressions

public Class LiteralExpression

extends Expression
Class Inheritance
Imports
java.io.BufferedWriter, .IOException, java.util.List, .Map, org.eclipse.persistence.expressions.Expression, .ExpressionBuilder, org.eclipse.persistence.internal.helper.DatabaseField, org.eclipse.persistence.internal.sessions.AbstractRecord, .AbstractSession

Used for wrapping literal values.

Field Summary

Modifier and TypeField and Description
protected Expression
protected String
Inherited from org.eclipse.persistence.expressions.Expression:
currentAliashashCodelastTableselectIfOrderedByshouldUseUpperCaseForIgnoreCase

Constructor Summary

AccessConstructor and Description
public
public
LiteralExpression(String newValue, Expression baseExpression)

Method Summary

Modifier and TypeMethod and Description
public int
computeHashCode()

Overrides org.eclipse.persistence.expressions.Expression.computeHashCode.

INTERNAL: Compute a consistent hash-code for the expression.
public String
public boolean
equals(Object
the reference object with which to compare.
object
)

Overrides org.eclipse.persistence.expressions.Expression.equals.

INTERNAL: Return if the expression is equal to the other.
public ExpressionBuilder
getBuilder()

Implements abstract org.eclipse.persistence.expressions.Expression.getBuilder.

Return the expression builder which is the ultimate base of this expression, or null if there isn't one (shouldn't happen if we start from a root)
protected Expression
public String
public boolean
protected void
postCopyIn(Map<K, V> alreadyDone)

Overrides org.eclipse.persistence.expressions.Expression.postCopyIn.

INTERNAL: Used for cloning.
public void
printSQL(ExpressionSQLPrinter printer)

Implements abstract org.eclipse.persistence.expressions.Expression.printSQL.

INTERNAL: Print SQL onto the stream, using the ExpressionPrinter for context
public Expression
rebuildOn(Expression newBase)

Implements abstract org.eclipse.persistence.expressions.Expression.rebuildOn.

INTERNAL: This expression is built on a different base than the one we want.
public void
resetPlaceHolderBuilder(ExpressionBuilder queryBuilder)

Implements abstract org.eclipse.persistence.expressions.Expression.resetPlaceHolderBuilder.

INTERNAL: Search the tree for any expressions (like SubSelectExpressions) that have been built using a builder that is not attached to the query.
public void
setLocalBase(Expression e)

Overrides org.eclipse.persistence.expressions.Expression.setLocalBase.

INTERNAL: Set the local base expression, ie the one on the other side of the operator Most types will ignore this, since they don't need it.
public Expression
twistedForBaseAndContext(Expression newBase, Expression context, Expression oldBase)

Overrides org.eclipse.persistence.expressions.Expression.twistedForBaseAndContext.

INTERNAL: Rebuild myself against the base, with the values of parameters supplied by the context expression.
public Object
valueFromObject(Object object, AbstractSession session, AbstractRecord translationRow, int valueHolderPolicy, boolean
true if object possibly not a clone, but is being conformed against the unit of work cache.
isObjectUnregistered
)

Overrides org.eclipse.persistence.expressions.Expression.valueFromObject.

INTERNAL: Return the value for in memory comparison.
public void
writeDescriptionOn(BufferedWriter writer)

Overrides org.eclipse.persistence.expressions.Expression.writeDescriptionOn.

INTERNAL: Used to print a debug form of the expression tree.
public void
writeFields(ExpressionSQLPrinter printer, List<DatabaseField> newFields, SQLSelectStatement statement)

Overrides org.eclipse.persistence.expressions.Expression.writeFields.

INTERNAL: Append the literal value into the printer, accounting for the first element
Inherited from org.eclipse.persistence.expressions.Expression:
addDateaddDateaddMonthsaddMonthsaliasaliasForTableallallallallallallallallallallallallallOfandanyanyanyanyanyanyanyanyanyanyanyanyanyOfanyOfanyOfAllowingNoneanyOfAllowingNoneasascendingasciiValueasOfassignAliasassignTableAliasesStartingAtaveragebetweenbetweenbetweenbetweenbetweenbetweenbetweenbetweenbetweencaseConditionStatementcaseConditionStatementcaseStatementcaseStatementcastclonecloneUsingcoalescecoalesceconcatcontainsAllKeyWordscontainsAnyKeyWordscontainsSubstringcontainsSubstringcontainsSubstringIgnoringCasecontainsSubstringIgnoringCaseconvertNodeToUseOuterJoinconvertToUseOuterJoincopiedVersionFromcountcreatecreatecreateWithBaseLastcurrentDatecurrentDateDatecurrentTimecurrentTimeStampdateDifferencedateDifferencedateNamedatePartdateToStringdecodedescendingdifferencedistinctdoesConformdoesConformequalequalequalequalequalequalequalequalequalequalequalOuterJoinequalOuterJoinequalsIgnoreCaseequalsIgnoreCaseexceptexceptexceptAllexceptAllexistsexistsNodeextractextractFieldsextractPrimaryKeyValuesextractValueextractValuesextractXmlfromfromConstantfromLiteralgetgetgetAliasgetAllowingNullgetAsOfClausegetAsOfClauseRecursivelygetClonedFieldgetFieldgetFieldgetFieldsgetFieldValuegetFunctiongetFunctiongetFunctiongetFunctiongetFunctionWithArgumentsgetLeafDescriptorgetLeafMappinggetNamegetNumberValgetOperatorgetOperatorgetOwnedTablesgetParametergetParametergetParametergetPropertygetSelectionFieldsgetSelectionFieldsgetSessiongetStringValgetTablegetTablegetTableAliasesgreaterThangreaterThangreaterThangreaterThangreaterThangreaterThangreaterThangreaterThangreaterThangreaterThangreaterThanEqualgreaterThanEqualgreaterThanEqualgreaterThanEqualgreaterThanEqualgreaterThanEqualgreaterThanEqualgreaterThanEqualgreaterThanEqualgreaterThanEqualhasAsOfClausehasBeenAliasedhashCodehexToRawifNullininininininininininininindexindexOfintersectintersectintersectAllintersectAllisClassTypeExpressionisCompoundExpressionisConstantExpressionisDataExpressionisEmptyisExpressionBuilderisFieldExpressionisFragmentisFunctionExpressionisLogicalExpressionisMapEntryExpressionisNullisObjectExpressionisParameterExpressionisQueryKeyExpressionisRelationExpressionisSubSelectExpressionisTableExpressionisTreatExpressionisValueExpressioniterateOnjoinlastDayleftJoinleftPadleftPadleftTrimleftTrimlengthlessThanlessThanlessThanlessThanlessThanlessThanlessThanlessThanlessThanlessThanlessThanEquallessThanEquallessThanEquallessThanEquallessThanEquallessThanEquallessThanEquallessThanEquallessThanEquallessThanEquallikelikelikelikelikeIgnoreCaselikeIgnoreCaseliterallocalDatelocalDateTimelocalTimelocatelocatelocatemapEntrymapKeymaximumminimummonthsBetweennewTimenextDaynoneOfnormalizenotnotBetweennotBetweennotBetweennotBetweennotBetweennotBetweennotBetweennotBetweennotBetweennotEmptynotEqualnotEqualnotEqualnotEqualnotEqualnotEqualnotEqualnotEqualnotEqualnotEqualnotExistsnotInnotInnotInnotInnotInnotInnotInnotInnotInnotInnotInnotInnotLikenotLikenotLikenotLikenotNullnullIfnullsFirstnullsLastoperatororperformOperatorpostfixSQLprefixSQLprintJavarefregexpregexpregisterInreplacereplicatereplicateresetCachereverserightrightrightPadrightPadrightTrimrightTrimroundDateselectIfOrderedBysetSelectIfOrderedByshallowClonesizesizesomesomesomesomesomesomesomesomesomesomesomesomesqlstandardDeviationsubQuerysubstringsubstringsubstringsubstringsumtoChartoChartoCharactertoDatetoLowerCasetoNumbertoStringtoStringtoUpperCasetoUppercaseCasedWordstranslatetreattrimtrimtruncateDatetwisttypeunionunionunionAllunionAllvalidateNodevaluevaluevaluevaluevaluevaluevaluevaluevaluevaluevalueFromObjectvariancewriteAliaswriteFieldwriteSubexpressionsTo

Field Detail

localBaseback to summary
protected Expression localBase
valueback to summary
protected String value

Constructor Detail

LiteralExpressionback to summary
public LiteralExpression()
LiteralExpressionback to summary
public LiteralExpression(String newValue, Expression baseExpression)

Method Detail

computeHashCodeback to summary
public int computeHashCode()

Overrides org.eclipse.persistence.expressions.Expression.computeHashCode.

INTERNAL: Compute a consistent hash-code for the expression. This is used to allow dynamic expression's SQL to be cached.

Annotations
@Override
descriptionOfNodeTypeback to summary
public String descriptionOfNodeType()

Overrides org.eclipse.persistence.expressions.Expression.descriptionOfNodeType.

INTERNAL: Used for debug printing.

Annotations
@Override
equalsback to summary
public boolean equals(Object object)

Overrides org.eclipse.persistence.expressions.Expression.equals.

INTERNAL: Return if the expression is equal to the other. This is used to allow dynamic expression's SQL to be cached.

Parameters
object:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getBuilderback to summary
public ExpressionBuilder getBuilder()

Implements abstract org.eclipse.persistence.expressions.Expression.getBuilder.

Return the expression builder which is the ultimate base of this expression, or null if there isn't one (shouldn't happen if we start from a root)

Annotations
@Override
getLocalBaseback to summary
protected Expression getLocalBase()
getValueback to summary
public String getValue()
isLiteralExpressionback to summary
public boolean isLiteralExpression()

Overrides org.eclipse.persistence.expressions.Expression.isLiteralExpression.

Doc from org.eclipse.persistence.expressions.Expression.isLiteralExpression.

INTERNAL:

Annotations
@Override
postCopyInback to summary
protected void postCopyIn(Map<K, V> alreadyDone)

Overrides org.eclipse.persistence.expressions.Expression.postCopyIn.

INTERNAL: Used for cloning.

Annotations
@Override
printSQLback to summary
public void printSQL(ExpressionSQLPrinter printer)

Implements abstract org.eclipse.persistence.expressions.Expression.printSQL.

INTERNAL: Print SQL onto the stream, using the ExpressionPrinter for context

Annotations
@Override
rebuildOnback to summary
public Expression rebuildOn(Expression newBase)

Implements abstract org.eclipse.persistence.expressions.Expression.rebuildOn.

INTERNAL: This expression is built on a different base than the one we want. Rebuild it and return the root of the new tree

Annotations
@Override
resetPlaceHolderBuilderback to summary
public void resetPlaceHolderBuilder(ExpressionBuilder queryBuilder)

Implements abstract org.eclipse.persistence.expressions.Expression.resetPlaceHolderBuilder.

INTERNAL: Search the tree for any expressions (like SubSelectExpressions) that have been built using a builder that is not attached to the query. This happens in case of an Exists call using a new ExpressionBuilder(). This builder needs to be replaced with one from the query.

Annotations
@Override
setLocalBaseback to summary
public void setLocalBase(Expression e)

Overrides org.eclipse.persistence.expressions.Expression.setLocalBase.

Doc from org.eclipse.persistence.expressions.Expression.setLocalBase.

INTERNAL: Set the local base expression, ie the one on the other side of the operator Most types will ignore this, since they don't need it.

Annotations
@Override
twistedForBaseAndContextback to summary
public Expression twistedForBaseAndContext(Expression newBase, Expression context, Expression oldBase)

Overrides org.eclipse.persistence.expressions.Expression.twistedForBaseAndContext.

INTERNAL: Rebuild myself against the base, with the values of parameters supplied by the context expression. This is used for transforming a standalone expression (e.g. the join criteria of a mapping) into part of some larger expression. You normally would not call this directly, instead calling twist See the comment there for more details"

Annotations
@Override
valueFromObjectback to summary
public Object valueFromObject(Object object, AbstractSession session, AbstractRecord translationRow, int valueHolderPolicy, boolean isObjectUnregistered)

Overrides org.eclipse.persistence.expressions.Expression.valueFromObject.

INTERNAL: Return the value for in memory comparison. This is only valid for valueable expressions.

Parameters
isObjectUnregistered:boolean

Doc from org.eclipse.persistence.expressions.Expression.valueFromObject.

true if object possibly not a clone, but is being conformed against the unit of work cache.

Annotations
@Override
writeDescriptionOnback to summary
public void writeDescriptionOn(BufferedWriter writer) throws IOException

Overrides org.eclipse.persistence.expressions.Expression.writeDescriptionOn.

INTERNAL: Used to print a debug form of the expression tree.

Annotations
@Override
writeFieldsback to summary
public void writeFields(ExpressionSQLPrinter printer, List<DatabaseField> newFields, SQLSelectStatement statement)

Overrides org.eclipse.persistence.expressions.Expression.writeFields.

INTERNAL: Append the literal value into the printer, accounting for the first element

Annotations
@Override