Class AbstractEncapsulatedExpressionStateObject
java.lang.Object
org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject
org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractEncapsulatedExpressionStateObject
- All Implemented Interfaces:
StateObject
- Direct Known Subclasses:
AbstractDoubleEncapsulatedExpressionStateObject,AbstractSingleEncapsulatedExpressionStateObject,AbstractTripleEncapsulatedExpressionStateObject,CoalesceExpressionStateObject
This expression handles parsing the identifier followed by an expression encapsulated within
parenthesis.
BNF: expression ::= <identifier>(expression)
- Since:
- 2.4
- Version:
- 2.4
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a newAbstractEncapsulatedExpressionStateObject. -
Method Summary
Modifier and TypeMethodDescriptionReturns the actual parsed object if thisStateObjectrepresentation of the JPQL query was created by parsing an existing JPQL query.abstract StringReturns the JPQL identifier of the expression represented by thisAbstractSingleEncapsulatedExpressionStateObject.protected abstract voidPrints out a string representation of this encapsulated information, which should not be used to define atruestring representation of a JPQL query but should be used for debugging purposes.protected voidtoTextInternal(Appendable writer) Prints out a string representation of thisStateObject, which should not be used to define atruestring representation of a JPQL query but should be used for debugging purposes.Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject
acceptUnknownVisitor, acceptUnknownVisitor, addChildren, addProblems, addPropertyChangeListener, areEquivalent, buildProblem, buildProblem, buildStateObject, buildStateObjects, checkParent, children, decorate, equals, findIdentificationVariable, firePropertyChanged, getChangeSupport, getDeclaration, getDecorator, getGrammar, getManagedTypeProvider, getParent, getQueryBuilder, getRoot, getType, getType, getTypeHelper, getTypeRepository, hashCode, initialize, isDecorated, isEquivalent, parent, parent, parent, removePropertyChangeListener, setExpression, setParent, toString, toString, toStringInternal, toStringItems, toTextMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject
accept
-
Constructor Details
-
AbstractEncapsulatedExpressionStateObject
Creates a newAbstractEncapsulatedExpressionStateObject.- Parameters:
parent- The parent of this state object, which cannot benull- Throws:
NullPointerException- The given parent cannot benull
-
-
Method Details
-
getExpression
Description copied from interface:StateObjectReturns the actual parsed object if thisStateObjectrepresentation of the JPQL query was created by parsing an existing JPQL query.- Specified by:
getExpressionin interfaceStateObject- Overrides:
getExpressionin classAbstractStateObject- Returns:
- The parsed object when a JPQL query is parsed and converted into a
StateObjectornullwhen the JPQL query is manually created (i.e. not from a string)
-
getIdentifier
Returns the JPQL identifier of the expression represented by thisAbstractSingleEncapsulatedExpressionStateObject.- Returns:
- The JPQL identifier that is shown before the left parenthesis
-
toTextEncapsulatedExpression
Prints out a string representation of this encapsulated information, which should not be used to define atruestring representation of a JPQL query but should be used for debugging purposes.- Parameters:
writer- The writer used to print out the string representation of the encapsulated information- Throws:
IOException- This should never happens, only required becauseAppendableis used instead ofStringBuilderfor instance
-
toTextInternal
Description copied from class:AbstractStateObjectPrints out a string representation of thisStateObject, which should not be used to define atruestring representation of a JPQL query but should be used for debugging purposes.- Specified by:
toTextInternalin classAbstractStateObject- Parameters:
writer- The writer used to print out the string representation- Throws:
IOException- This should never happens, it is only required becauseAppendableis used instead of any concrete class
-