Class ConcatExpressionStateObject
java.lang.Object
org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject
org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractListHolderStateObject<StateObject>
org.eclipse.persistence.jpa.jpql.tools.model.query.ConcatExpressionStateObject
- All Implemented Interfaces:
ListHolderStateObject<StateObject>,StateObject
The
JPA 2.0
CONCAT function returns a string that is a concatenation of its arguments.
JPA 1.0:
BNF: expression ::= CONCAT(string_primary, string_primary)
BNF: expression ::= CONCAT(string_primary, string_primary {, string_primary}*)
- Since:
- 2.4
- Version:
- 2.4
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringNotifies the content of the list ofStateObjectrepresenting the string primaries has changed. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newConcatExpressionStateObject.ConcatExpressionStateObject(StateObject parent, List<? extends StateObject> stateObjects) Creates a newConcatExpressionStateObject.ConcatExpressionStateObject(StateObject parent, StateObject... stateObjects) Creates a newConcatExpressionStateObject. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(StateObjectVisitor visitor) Visits thisStateObjectby the givenvisitor.Returns the actual parsed object if thisStateObjectrepresentation of the JPQL query was created by parsing an existing JPQL query.booleanisEquivalent(StateObject stateObject) Determines whether the givenStateObjectis equivalent to this one, i.e.protected StringlistName()Returns the name that is uniquely identifying the list.voidsetExpression(ConcatExpression expression) Keeps a reference of theparsed objectobject, which should only be done when this object is instantiated during the conversion of a parsed JPQL query intoStateObjects.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.AbstractListHolderStateObject
addChildren, addItem, addItems, addListChangeListener, areChildrenEquivalent, canMoveDown, canMoveUp, getItem, hasItems, initialize, items, itemsSize, moveDown, moveUp, removeItem, removeItems, removeListChangeListener, toStringItemsMethods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject
acceptUnknownVisitor, acceptUnknownVisitor, 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, isDecorated, 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
addPropertyChangeListener, children, decorate, findIdentificationVariable, getDeclaration, getDecorator, getGrammar, getManagedTypeProvider, getParent, getQueryBuilder, getRoot, isDecorated, removePropertyChangeListener, setParent, toString, toText
-
Field Details
-
STRING_PRIMARY_STATE_OBJECT_LIST
Notifies the content of the list ofStateObjectrepresenting the string primaries has changed.- See Also:
-
-
Constructor Details
-
ConcatExpressionStateObject
Creates a newConcatExpressionStateObject.- Parameters:
parent- The parent of this state object, which cannot benull- Throws:
NullPointerException- The given parent cannot benull
-
ConcatExpressionStateObject
Creates a newConcatExpressionStateObject.- Parameters:
stateObjects- The list ofStateObjectrepresenting the encapsulated expressions
-
ConcatExpressionStateObject
Creates a newConcatExpressionStateObject.- Parameters:
parent- The parent of this state object, which cannot benullstateObjects- The list ofStateObjectrepresenting the encapsulated expressions- Throws:
NullPointerException- The given parent cannot benull
-
-
Method Details
-
accept
Description copied from interface:StateObjectVisits thisStateObjectby the givenvisitor.- Parameters:
visitor- Thevisitorto visit this object
-
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)
-
isEquivalent
Description copied from interface:StateObjectDetermines whether the givenStateObjectis equivalent to this one, i.e. the information of bothStateObjectis the same.- Specified by:
isEquivalentin interfaceStateObject- Overrides:
isEquivalentin classAbstractStateObject- Parameters:
stateObject- TheStateObjectto compare its content to this one- Returns:
trueif both object are equivalent;falseotherwise
-
listName
Description copied from class:AbstractListHolderStateObjectReturns the name that is uniquely identifying the list.- Specified by:
listNamein classAbstractListHolderStateObject<StateObject>- Returns:
- The unique name identifying the list
-
setExpression
Keeps a reference of theparsed objectobject, which should only be done when this object is instantiated during the conversion of a parsed JPQL query intoStateObjects.- Parameters:
expression- Theparsed objectrepresenting aCONCATexpression
-
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
-