Class AbstractActualJPQLQueryFormatter
- java.lang.Object
- 
- org.eclipse.persistence.jpa.jpql.tools.model.BaseJPQLQueryFormatter
- 
- org.eclipse.persistence.jpa.jpql.tools.model.AbstractActualJPQLQueryFormatter
 
 
- 
- All Implemented Interfaces:
- IJPQLQueryFormatter,- StateObjectVisitor
 - Direct Known Subclasses:
- DefaultActualJPQLQueryFormatter,- EclipseLinkActualJPQLQueryFormatter
 
 public abstract class AbstractActualJPQLQueryFormatter extends BaseJPQLQueryFormatter ThisIJPQLQueryFormatteris used to generate a string representation of aStateObjectbased on how it was parsed, which means this formatter can only be used when theStateObjectwas created by parsing a JPQL query because it needs to retrieve parsing information from the correspondingExpression.It is possible to partially match the JPQL query that was parsed, the value of exactMatch will determine whether the string representation of any given StateObjectshould reflect the exact string that was parsed.truewill use every bit of information contained in the correspondingExpressionto perfectly match what was parsed (case of JPQL identifiers and the presence of whitespace);falsewill only match the case sensitivity of the JPQL identifiers.- Version:
- 2.5
- Author:
- Pascal Filion
- Since:
- 2.4
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.eclipse.persistence.jpa.jpql.tools.model.IJPQLQueryFormatterIJPQLQueryFormatter.IdentifierStyle
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected booleanexactMatchDetermines whether the string representation of any givenStateObjectshould reflect the exact string that was parsed:truewill use every bit of information contained in the correspondingExpressionto perfectly match what was parsed;falsewill only match the case sensitivity of the JPQL identifiers.- 
Fields inherited from class org.eclipse.persistence.jpa.jpql.tools.model.BaseJPQLQueryFormatterCOMMA, COMMA_SPACE, LEFT_PARENTHESIS, RIGHT_PARENTHESIS, SPACE, style, writer
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedAbstractActualJPQLQueryFormatter(boolean exactMatch)Creates a newAbstractActualJPQLQueryFormatter.protectedAbstractActualJPQLQueryFormatter(boolean exactMatch, IJPQLQueryFormatter.IdentifierStyle style)Creates a newAbstractActualJPQLQueryFormatter.
 - 
Method Summary- 
Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.BaseJPQLQueryFormatterformatIdentifier, getIdentifierStyle, toString, toString, toText
 
- 
 
- 
- 
- 
Field Detail- 
exactMatchprotected final boolean exactMatch Determines whether the string representation of any givenStateObjectshould reflect the exact string that was parsed:truewill use every bit of information contained in the correspondingExpressionto perfectly match what was parsed;falsewill only match the case sensitivity of the JPQL identifiers.
 
- 
 - 
Constructor Detail- 
AbstractActualJPQLQueryFormatterprotected AbstractActualJPQLQueryFormatter(boolean exactMatch) Creates a newAbstractActualJPQLQueryFormatter.- Parameters:
- exactMatch- Determines whether the string representation of any given- StateObjectshould reflect the exact string that was parsed:- truewill use every bit of information contained in the corresponding- Expressionto perfectly match what was parsed (case of JPQL identifiers and the presence of whitespace);- falsewill only match the case sensitivity of the JPQL identifiers
 
 - 
AbstractActualJPQLQueryFormatterprotected AbstractActualJPQLQueryFormatter(boolean exactMatch, IJPQLQueryFormatter.IdentifierStyle style)Creates a newAbstractActualJPQLQueryFormatter.- Parameters:
- exactMatch- Determines whether the string representation of any given- StateObjectshould reflect the exact string that was parsed:- truewill use every bit of information contained in the corresponding- Expressionto perfectly match what was parsed (case of JPQL identifiers and the presence of whitespace);- falsewill only match the case sensitivity of the JPQL identifiers
- style- Determines how the JPQL identifiers are written out, which is used if the- StateObjectwas modified after its creation
- Throws:
- java.lang.NullPointerException- The IdentifierStyle cannot be- null
 
 
- 
 - 
Method Detail- 
appendIdentifierprotected void appendIdentifier(java.lang.String actualIdentifier, java.lang.String identifier)Appends the given actual identifier if it's not an empty string, otherwise the second identifier will be appended.- Parameters:
- actualIdentifier- The actual JPQL identifier to append to the writer if it's not an empty string
- identifier- The uppercase constant of the JPQL identifier to append if the actual one is an empty string
 
 - 
isUsingExactMatchpublic boolean isUsingExactMatch() Determines whether the string representation of any givenStateObjectshould reflect the exact string that was parsed.- Returns:
- truewill use every bit of information contained in the corresponding- Expressionto perfectly match what was parsed;- falsewill only match the case sensitivity of the JPQL identifiers
 
 - 
shouldOutputprotected boolean shouldOutput(Expression expression) 
 - 
toStringAggregateFunctionprotected void toStringAggregateFunction(AggregateFunctionStateObject stateObject) 
 - 
toStringChildrenprotected void toStringChildren(ListHolderStateObject<? extends StateObject> stateObject, boolean comma) 
 - 
toStringCompoundprotected void toStringCompound(CompoundExpressionStateObject stateObject, java.lang.String identifier) 
 - 
toStringDoubleEncapsulatedprotected void toStringDoubleEncapsulated(AbstractDoubleEncapsulatedExpressionStateObject stateObject) 
 - 
toStringEncapsulatedIdentificationVariableprotected void toStringEncapsulatedIdentificationVariable(EncapsulatedIdentificationVariableExpressionStateObject stateObject) 
 - 
toStringFromClauseprotected void toStringFromClause(AbstractFromClauseStateObject stateObject) 
 - 
toStringIdentificationVariableDeclarationprotected void toStringIdentificationVariableDeclaration(AbstractIdentificationVariableDeclarationStateObject stateObject) 
 - 
toStringModifyStatementprotected void toStringModifyStatement(AbstractModifyStatementStateObject stateObject) 
 - 
toStringPathExpressionprotected void toStringPathExpression(AbstractPathExpressionStateObject stateObject) 
 - 
toStringRangeVariableDeclarationprotected void toStringRangeVariableDeclaration(AbstractRangeVariableDeclarationStateObject stateObject) 
 - 
toStringSelectStatementprotected boolean toStringSelectStatement(AbstractSelectStatementStateObject stateObject) 
 - 
toStringSimpleStateObjectprotected void toStringSimpleStateObject(SimpleStateObject stateObject) 
 - 
toStringSingleEncapsulatedprotected void toStringSingleEncapsulated(AbstractSingleEncapsulatedExpressionStateObject stateObject) 
 - 
toStringTripleEncapsulatedprotected void toStringTripleEncapsulated(AbstractTripleEncapsulatedExpressionStateObject stateObject) 
 - 
visitpublic void visit(AbsExpressionStateObject stateObject) Visits the givenAbsExpressionStateObject.- Parameters:
- stateObject- The- AbsExpressionStateObjectto visit
 
 - 
visitpublic void visit(AbstractSchemaNameStateObject stateObject) Visits the givenAbstractSchemaNameStateObject.- Parameters:
- stateObject- The- AbstractSchemaNameStateObjectto visit
 
 - 
visitpublic void visit(AdditionExpressionStateObject stateObject) Visits the givenAdditionExpressionStateObject.- Parameters:
- stateObject- The- AdditionExpressionStateObjectto visit
 
 - 
visitpublic void visit(AllOrAnyExpressionStateObject stateObject) Visits the givenAllOrAnyExpressionStateObject.- Parameters:
- stateObject- The- AllOrAnyExpressionStateObjectto visit
 
 - 
visitpublic void visit(AndExpressionStateObject stateObject) Visits the givenAndExpressionStateObject.- Parameters:
- stateObject- The- AndExpressionStateObjectto visit
 
 - 
visitpublic void visit(ArithmeticFactorStateObject stateObject) Visits the givenArithmeticFactorStateObject.- Parameters:
- stateObject- The- ArithmeticFactorStateObjectto visit
 
 - 
visitpublic void visit(AvgFunctionStateObject stateObject) Visits the givenAvgFunctionStateObject.- Parameters:
- stateObject- The- AvgFunctionStateObjectto visit
 
 - 
visitpublic void visit(BadExpressionStateObject stateObject) Visits the givenBadExpressionStateObject.- Parameters:
- stateObject- The- BadExpressionStateObjectto visit
 
 - 
visitpublic void visit(BetweenExpressionStateObject stateObject) Visits the givenBetweenExpressionStateObject.- Parameters:
- stateObject- The- BetweenExpressionStateObjectto visit
 
 - 
visitpublic void visit(CaseExpressionStateObject stateObject) Visits the givenCaseExpressionStateObject.- Parameters:
- stateObject- The- CaseExpressionStateObjectto visit
 
 - 
visitpublic void visit(CoalesceExpressionStateObject stateObject) Visits the givenCoalesceExpressionStateObject.- Parameters:
- stateObject- The- CoalesceExpressionStateObjectto visit
 
 - 
visitpublic void visit(CollectionMemberDeclarationStateObject stateObject) Visits the givenCollectionMemberDeclarationStateObject.- Parameters:
- stateObject- The- CollectionMemberDeclarationStateObjectto visit
 
 - 
visitpublic void visit(CollectionMemberExpressionStateObject stateObject) Visits the givenCollectionMemberExpressionStateObject.- Parameters:
- stateObject- The- CollectionMemberExpressionStateObjectto visit
 
 - 
visitpublic void visit(CollectionValuedPathExpressionStateObject stateObject) Visits the givenCollectionValuedPathExpressionStateObject.- Parameters:
- stateObject- The- CollectionValuedPathExpressionStateObjectto visit
 
 - 
visitpublic void visit(ComparisonExpressionStateObject stateObject) Visits the givenComparisonExpressionStateObject.- Parameters:
- stateObject- The- ComparisonExpressionStateObjectto visit
 
 - 
visitpublic void visit(ConcatExpressionStateObject stateObject) Visits the givenConcatExpressionStateObject.- Parameters:
- stateObject- The- ConcatExpressionStateObjectto visit
 
 - 
visitpublic void visit(ConstructorExpressionStateObject stateObject) Visits the givenConstructorExpressionStateObject.- Parameters:
- stateObject- The- ConstructorExpressionStateObjectto visit
 
 - 
visitpublic void visit(CountFunctionStateObject stateObject) Visits the givenCountFunctionStateObject.- Parameters:
- stateObject- The- CountFunctionStateObjectto visit
 
 - 
visitpublic void visit(DateTimeStateObject stateObject) Visits the givenDateTimeStateObject.- Parameters:
- stateObject- The- DateTimeStateObjectto visit
 
 - 
visitpublic void visit(DeleteClauseStateObject stateObject) Visits the givenDeleteClauseStateObject.- Parameters:
- stateObject- The- DeleteClauseStateObjectto visit
 
 - 
visitpublic void visit(DeleteStatementStateObject stateObject) Visits the givenDeleteStatementStateObject.- Parameters:
- stateObject- The- DeleteStatementStateObjectto visit
 
 - 
visitpublic void visit(DerivedPathIdentificationVariableDeclarationStateObject stateObject) Visits the givenDerivedPathIdentificationVariableDeclarationStateObject.- Parameters:
- stateObject- The- DerivedPathIdentificationVariableDeclarationStateObjectto visit
 
 - 
visitpublic void visit(DerivedPathVariableDeclarationStateObject stateObject) Visits the givenDerivedPathVariableDeclarationStateObject.- Parameters:
- stateObject- The- DerivedPathVariableDeclarationStateObjectto visit
 
 - 
visitpublic void visit(DivisionExpressionStateObject stateObject) Visits the givenDivisionExpressionStateObject.- Parameters:
- stateObject- The- DivisionExpressionStateObjectto visit
 
 - 
visitpublic void visit(EmptyCollectionComparisonExpressionStateObject stateObject) Visits the givenEmptyCollectionComparisonExpressionStateObject.- Parameters:
- stateObject- The- EmptyCollectionComparisonExpressionStateObjectto visit
 
 - 
visitpublic void visit(EntityTypeLiteralStateObject stateObject) Visits the givenEntityTypeLiteralStateObject.- Parameters:
- stateObject- The- EntityTypeLiteralStateObjectto visit
 
 - 
visitpublic void visit(EntryExpressionStateObject stateObject) Visits the givenEntryExpressionStateObject.- Parameters:
- stateObject- The- EntryExpressionStateObjectto visit
 
 - 
visitpublic void visit(EnumTypeStateObject stateObject) Visits the givenEnumTypeStateObject.- Parameters:
- stateObject- The- EnumTypeStateObjectto visit
 
 - 
visitpublic void visit(ExistsExpressionStateObject stateObject) Visits the givenExistsExpressionStateObject.- Parameters:
- stateObject- The- ExistsExpressionStateObjectto visit
 
 - 
visitpublic void visit(FromClauseStateObject stateObject) Visits the givenFromClauseStateObject.- Parameters:
- stateObject- The- FromClauseStateObjectto visit
 
 - 
visitpublic void visit(FunctionExpressionStateObject stateObject) Visits the givenFunctionExpressionStateObject.- Parameters:
- stateObject- The- FunctionExpressionStateObjectto visit
 
 - 
visitpublic void visit(GroupByClauseStateObject stateObject) Visits the givenGroupByClauseStateObject.- Parameters:
- stateObject- The- GroupByClauseStateObjectto visit
 
 - 
visitpublic void visit(HavingClauseStateObject stateObject) Visits the givenHavingClauseStateObject.- Parameters:
- stateObject- The- HavingClauseStateObjectto visit
 
 - 
visitpublic void visit(IdentificationVariableDeclarationStateObject stateObject) Visits the givenIdentificationVariableDeclarationStateObject.- Parameters:
- stateObject- The- IdentificationVariableDeclarationStateObjectto visit
 
 - 
visitpublic void visit(IdentificationVariableStateObject stateObject) Visits the givenIdentificationVariableStateObject.- Parameters:
- stateObject- The- IdentificationVariableStateObjectto visit
 
 - 
visitpublic void visit(IndexExpressionStateObject stateObject) Visits the givenIndexExpressionStateObject.- Parameters:
- stateObject- The- IndexExpressionStateObjectto visit
 
 - 
visitpublic void visit(InExpressionStateObject stateObject) Visits the givenInExpressionStateObject.- Parameters:
- stateObject- The- InExpressionStateObjectto visit
 
 - 
visitpublic void visit(InputParameterStateObject stateObject) Visits the givenInputParameterStateObject.- Parameters:
- stateObject- The- InputParameterStateObjectto visit
 
 - 
visitpublic void visit(JoinStateObject stateObject) Visits the givenJoinStateObject.- Parameters:
- stateObject- The- JPQLQueryStateObjectto visit
 
 - 
visitpublic void visit(JPQLQueryStateObject stateObject) Visits the givenJPQLQueryStateObject.- Parameters:
- stateObject- The- JPQLQueryStateObjectto visit
 
 - 
visitpublic void visit(KeyExpressionStateObject stateObject) Visits the givenKeyExpressionStateObject.- Parameters:
- stateObject- The- KeyExpressionStateObjectto visit
 
 - 
visitpublic void visit(KeywordExpressionStateObject stateObject) Visits the givenKeywordExpressionStateObject.- Parameters:
- stateObject- The- KeywordExpressionStateObjectto visit
 
 - 
visitpublic void visit(LengthExpressionStateObject stateObject) Visits the givenLengthExpressionStateObject.- Parameters:
- stateObject- The- LengthExpressionStateObjectto visit
 
 - 
visitpublic void visit(LikeExpressionStateObject stateObject) Visits the givenLikeExpressionStateObject.- Parameters:
- stateObject- The- LikeExpressionStateObjectto visit
 
 - 
visitpublic void visit(LocateExpressionStateObject stateObject) Visits the givenLocateExpressionStateObject.- Parameters:
- stateObject- The- LocateExpressionStateObjectto visit
 
 - 
visitpublic void visit(LowerExpressionStateObject stateObject) Visits the givenLowerExpressionStateObject.- Parameters:
- stateObject- The- LowerExpressionStateObjectto visit
 
 - 
visitpublic void visit(MaxFunctionStateObject stateObject) Visits the givenMaxFunctionStateObject.- Parameters:
- stateObject- The- MaxFunctionStateObjectto visit
 
 - 
visitpublic void visit(MinFunctionStateObject stateObject) Visits the givenWhereClauseStateObject.- Parameters:
- stateObject- The- WhereClauseStateObjectto visit
 
 - 
visitpublic void visit(ModExpressionStateObject stateObject) Visits the givenModExpressionStateObject.- Parameters:
- stateObject- The- ModExpressionStateObjectto visit
 
 - 
visitpublic void visit(MultiplicationExpressionStateObject stateObject) Visits the givenMultiplicationExpressionStateObject.- Parameters:
- stateObject- The- MultiplicationExpressionStateObjectto visit
 
 - 
visitpublic void visit(NotExpressionStateObject stateObject) Visits the givenNotExpressionStateObject.- Parameters:
- stateObject- The- NotExpressionStateObjectto visit
 
 - 
visitpublic void visit(NullComparisonExpressionStateObject stateObject) Visits the givenNullComparisonExpressionStateObject.- Parameters:
- stateObject- The- NullComparisonExpressionStateObjectto visit
 
 - 
visitpublic void visit(NullIfExpressionStateObject stateObject) Visits the givenNullIfExpressionStateObject.- Parameters:
- stateObject- The- NullIfExpressionStateObjectto visit
 
 - 
visitpublic void visit(NumericLiteralStateObject stateObject) Visits the givenNumericLiteralStateObject.- Parameters:
- stateObject- The- NumericLiteralStateObjectto visit
 
 - 
visitpublic void visit(ObjectExpressionStateObject stateObject) Visits the givenObjectExpressionStateObject.- Parameters:
- stateObject- The- ObjectExpressionStateObjectto visit
 
 - 
visitpublic void visit(OrderByClauseStateObject stateObject) Visits the givenOrderByClauseStateObject.- Parameters:
- stateObject- The- OrderByClauseStateObjectto visit
 
 - 
visitpublic void visit(OrderByItemStateObject stateObject) Visits the givenOrderByItemStateObject.- Parameters:
- stateObject- The- OrderByItemStateObjectto visit
 
 - 
visitpublic void visit(OrExpressionStateObject stateObject) Visits the givenOrExpressionStateObject.- Parameters:
- stateObject- The- OrExpressionStateObjectto visit
 
 - 
visitpublic void visit(RangeVariableDeclarationStateObject stateObject) Visits the givenRangeVariableDeclarationStateObject.- Parameters:
- stateObject- The- RangeVariableDeclarationStateObjectto visit
 
 - 
visitpublic void visit(ResultVariableStateObject stateObject) Visits the givenResultVariableStateObject.- Parameters:
- stateObject- The- ResultVariableStateObjectto visit
 
 - 
visitpublic void visit(SelectClauseStateObject stateObject) Visits the givenSelectClauseStateObject.- Parameters:
- stateObject- The- SelectClauseStateObjectto visit
 
 - 
visitpublic void visit(SelectStatementStateObject stateObject) Visits the givenSelectStatementStateObject.- Parameters:
- stateObject- The- SelectStatementStateObjectto visit
 
 - 
visitpublic void visit(SimpleFromClauseStateObject stateObject) Visits the givenSimpleFromClauseStateObject.- Parameters:
- stateObject- The- SimpleFromClauseStateObjectto visit
 
 - 
visitpublic void visit(SimpleSelectClauseStateObject stateObject) Visits the givenSimpleSelectClauseStateObject.- Parameters:
- stateObject- The- SimpleSelectClauseStateObjectto visit
 
 - 
visitpublic void visit(SimpleSelectStatementStateObject stateObject) Visits the givenSimpleSelectStatementStateObject.- Parameters:
- stateObject- The- SimpleSelectStatementStateObjectto visit
 
 - 
visitpublic void visit(SizeExpressionStateObject stateObject) Visits the givenSizeExpressionStateObject.- Parameters:
- stateObject- The- SizeExpressionStateObjectto visit
 
 - 
visitpublic void visit(SqrtExpressionStateObject stateObject) Visits the givenSqrtExpressionStateObject.- Parameters:
- stateObject- The- SqrtExpressionStateObjectto visit
 
 - 
visitpublic void visit(StateFieldPathExpressionStateObject stateObject) Visits the givenStateFieldPathExpressionStateObject.- Parameters:
- stateObject- The- StateFieldPathExpressionStateObjectto visit
 
 - 
visitpublic void visit(StringLiteralStateObject stateObject) Visits the givenStringLiteralStateObject.- Parameters:
- stateObject- The- StringLiteralStateObjectto visit
 
 - 
visitpublic void visit(SubExpressionStateObject stateObject) Visits the givenSubExpressionStateObject.- Parameters:
- stateObject- The- SubExpressionStateObjectto visit
 
 - 
visitpublic void visit(SubstringExpressionStateObject stateObject) Visits the givenSubstringExpressionStateObject.- Parameters:
- stateObject- The- SubstringExpressionStateObjectto visit
 
 - 
visitpublic void visit(SubtractionExpressionStateObject stateObject) Visits the givenSubtractionExpressionStateObject.- Parameters:
- stateObject- The- SubtractionExpressionStateObjectto visit
 
 - 
visitpublic void visit(SumFunctionStateObject stateObject) Visits the givenSumFunctionStateObject.- Parameters:
- stateObject- The- SumFunctionStateObjectto visit
 
 - 
visitpublic void visit(TreatExpressionStateObject stateObject) Visits the givenTreatExpressionStateObject.- Parameters:
- stateObject- The- TreatExpressionStateObjectto visit
 
 - 
visitpublic void visit(TrimExpressionStateObject stateObject) Visits the givenTrimExpressionStateObject.- Parameters:
- stateObject- The- TrimExpressionStateObjectto visit
 
 - 
visitpublic void visit(TypeExpressionStateObject stateObject) Visits the givenTypeExpressionStateObject.- Parameters:
- stateObject- The- TypeExpressionStateObjectto visit
 
 - 
visitpublic void visit(UnknownExpressionStateObject stateObject) Visits the givenUnknownExpressionStateObject.- Parameters:
- stateObject- The- UnknownExpressionStateObjectto visit
 
 - 
visitpublic void visit(UpdateClauseStateObject stateObject) Visits the givenUpdateClauseStateObject.- Parameters:
- stateObject- The- UpdateClauseStateObjectto visit
 
 - 
visitpublic void visit(UpdateItemStateObject stateObject) Visits the givenUpdateItemStateObject.- Parameters:
- stateObject- The- UpdateItemStateObjectto visit
 
 - 
visitpublic void visit(UpdateStatementStateObject stateObject) Visits the givenUpdateStatementStateObject.- Parameters:
- stateObject- The- UpdateStatementStateObjectto visit
 
 - 
visitpublic void visit(UpperExpressionStateObject stateObject) Visits the givenUpperExpressionStateObject.- Parameters:
- stateObject- The- UpperExpressionStateObjectto visit
 
 - 
visitpublic void visit(ValueExpressionStateObject stateObject) Visits the givenValueExpressionStateObject.- Parameters:
- stateObject- The- ValueExpressionStateObjectto visit
 
 - 
visitpublic void visit(WhenClauseStateObject stateObject) Visits the givenWhenClauseStateObject.- Parameters:
- stateObject- The- WhenClauseStateObjectto visit
 
 - 
visitpublic void visit(WhereClauseStateObject stateObject) Visits the givenWhereClauseStateObject.- Parameters:
- stateObject- The- WhereClauseStateObjectto visit
 
 
- 
 
-