Class DerivedPathIdentificationVariableDeclarationStateObject
java.lang.Object
org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject
org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractListHolderStateObject<JoinStateObject>
org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractIdentificationVariableDeclarationStateObject
org.eclipse.persistence.jpa.jpql.tools.model.query.DerivedPathIdentificationVariableDeclarationStateObject
- All Implemented Interfaces:
ListHolderStateObject<JoinStateObject>,StateObject,VariableDeclarationStateObject
public class DerivedPathIdentificationVariableDeclarationStateObject
extends AbstractIdentificationVariableDeclarationStateObject
- Since:
- 2.4
- Version:
- 2.5
-
Field Summary
Fields inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractIdentificationVariableDeclarationStateObject
JOINS_LIST -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newIdentificationVariableDeclarationStateObject.DerivedPathIdentificationVariableDeclarationStateObject(SimpleFromClauseStateObject parent, String path, String identificationVariable) Creates a newIdentificationVariableDeclarationStateObject. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(StateObjectVisitor visitor) Visits thisStateObjectby the givenvisitor.CreatesgetManagedType(StateObject stateObject) Returns theIManagedTypefor the given identification variable.Returns the parent of thisStateObject.getPath()Returns the string representation of the path expression, which is either a singled-valued object field or a collection-valued path expression.Returns theStateObjectrepresenting the range variable declaration portion.Returns theStateObjectrepresenting the "root" for objects which may not be reachable by navigation.items()Returns anListIterableover the children.Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractIdentificationVariableDeclarationStateObject
addChildren, addInnerJoin, addJoin, addJoin, addJoin, addJoin, addLeftJoin, addLeftOuterJoin, getExpression, getIdentificationVariable, getIdentificationVariableStateObject, getRootPath, identificationVariables, initialize, isEquivalent, listName, parseJoin, setExpression, setIdentificationVariable, setRootPath, toTextInternalMethods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractListHolderStateObject
addItem, addItems, addListChangeListener, areChildrenEquivalent, canMoveDown, canMoveUp, getItem, hasItems, 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, 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, getQueryBuilder, getRoot, isDecorated, removePropertyChangeListener, setParent, toString, toText
-
Constructor Details
-
DerivedPathIdentificationVariableDeclarationStateObject
Creates a newIdentificationVariableDeclarationStateObject.- Parameters:
parent- The parent of this state object, which cannot benull- Throws:
NullPointerException- The given parent cannot benull
-
DerivedPathIdentificationVariableDeclarationStateObject
public DerivedPathIdentificationVariableDeclarationStateObject(SimpleFromClauseStateObject parent, String path, String identificationVariable) Creates a newIdentificationVariableDeclarationStateObject.- Parameters:
parent- The parent of this state object, which cannot benullpath- Either the derived singled-valued object field or the collection-valued path expressionidentificationVariable- The identification variable defining the given path- Throws:
NullPointerException- The given parent cannot benull
-
-
Method Details
-
accept
Description copied from interface:StateObjectVisits thisStateObjectby the givenvisitor.- Parameters:
visitor- Thevisitorto visit this object
-
buildRangeVariableDeclarationStateObject
Description copied from class:AbstractIdentificationVariableDeclarationStateObjectCreates- Specified by:
buildRangeVariableDeclarationStateObjectin classAbstractIdentificationVariableDeclarationStateObject
-
getManagedType
Description copied from interface:VariableDeclarationStateObjectReturns theIManagedTypefor the given identification variable. The search does not traverse up the query hierarchy if this declaration is for a subquery.
In the above query, the managed type associated with the identification variable:SELECT e FROM Department d JOIN KEY(d.employees).addresses a- d is "Department"
- a is "Address"
- Parameters:
stateObject- TheStateObjectthat should be an simple identification variable or an encapsulated identification variable with the identifierKEYorVALUE- Returns:
- The
IManagedTyperepresenting the domain object declared by the given identification variable
-
getParent
Description copied from interface:StateObjectReturns the parent of thisStateObject.- Specified by:
getParentin interfaceStateObject- Overrides:
getParentin classAbstractIdentificationVariableDeclarationStateObject- Returns:
- Returns the parent of this
StateObject, which isnullonly when this is the root of the hierarchy
-
getPath
Returns the string representation of the path expression, which is either a singled-valued object field or a collection-valued path expression.- Returns:
- The path expression, which is never
null
-
getRangeVariableDeclaration
Description copied from class:AbstractIdentificationVariableDeclarationStateObjectReturns theStateObjectrepresenting the range variable declaration portion.- Overrides:
getRangeVariableDeclarationin classAbstractIdentificationVariableDeclarationStateObject- Returns:
- The concrete instance
-
getRootStateObject
Description copied from class:AbstractIdentificationVariableDeclarationStateObjectReturns theStateObjectrepresenting the "root" for objects which may not be reachable by navigation.- Overrides:
getRootStateObjectin classAbstractIdentificationVariableDeclarationStateObject- Returns:
- The
StateObjectrepresenting one of the possible valid "root"
-
items
Description copied from interface:ListHolderStateObjectReturns anListIterableover the children.- Specified by:
itemsin interfaceListHolderStateObject<JoinStateObject>- Overrides:
itemsin classAbstractListHolderStateObject<JoinStateObject>- Returns:
- An
ListIterablethat is iterating over the children
-