Interface DeclarationStateObject
-
- All Superinterfaces:
StateObject
- All Known Implementing Classes:
AbstractFromClauseStateObject
,AbstractModifyClauseStateObject
,DeleteClauseStateObject
,FromClauseStateObject
,SimpleFromClauseStateObject
,UpdateClauseStateObject
public interface DeclarationStateObject extends StateObject
This defines the declaration portion of a query, which is theFROM
clause of a query.- Version:
- 2.5
- See Also:
FromClauseStateObject
,SimpleFromClauseStateObject
,DeleteClauseStateObject
,UpdateClauseStateObject
- Author:
- Pascal Filion
- Since:
- 2.4
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ListIterable<? extends VariableDeclarationStateObject>
declarations()
Returns the list of declarations declared in the declaration clause of the current query.IManagedType
findManagedType(StateObject stateObject)
Returns theIManagedType
for the given identification variable.IManagedType
getManagedType(StateObject stateObject)
Returns theIManagedType
for the given identification variable.-
Methods inherited from interface org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject
accept, addPropertyChangeListener, children, decorate, findIdentificationVariable, getDeclaration, getDecorator, getExpression, getGrammar, getManagedTypeProvider, getParent, getQueryBuilder, getRoot, isDecorated, isEquivalent, removePropertyChangeListener, setParent, toString, toText
-
-
-
-
Method Detail
-
declarations
ListIterable<? extends VariableDeclarationStateObject> declarations()
Returns the list of declarations declared in the declaration clause of the current query.- Returns:
- The list of
VariableDeclarationStateObject
that define the domain of the query
-
findManagedType
IManagedType findManagedType(StateObject stateObject)
Returns theIManagedType
for the given identification variable. If the declaration is for a subquery and there is no managed type associated with the identification then the search will traverse up the query hierarchy.
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
- TheStateObject
that should be an simple identification variable or an encapsulated identification variable with the identifierKEY
orVALUE
- Returns:
- The
IManagedType
representing the domain object declared by the given identification variable - See Also:
getManagedType(StateObject)
-
getManagedType
IManagedType getManagedType(StateObject stateObject)
Returns theIManagedType
for 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
- TheStateObject
that should be an simple identification variable or an encapsulated identification variable with the identifierKEY
orVALUE
- Returns:
- The
IManagedType
representing the domain object declared by the given identification variable - See Also:
findManagedType(StateObject)
-
-