Top Description Methods
org.eclipse.persistence.jpa.jpql.tools.model.query

public Interface VariableDeclarationStateObject

extends StateObject
Known Direct Implementers
org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractIdentificationVariableDeclarationStateObject, org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractRangeVariableDeclarationStateObject, org.eclipse.persistence.jpa.jpql.tools.model.query.CollectionMemberDeclarationStateObject
Imports
org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType, org.eclipse.persistence.jpa.jpql.utility.iterable.ListIterable

This defines a variable declaration, which has a "root" object and an identification variable.
Author
Pascal Filion
Since
2.4
Version
2.5
See Also
CollectionMemberDeclarationStateObject, DerivedPathIdentificationVariableDeclarationStateObject, DerivedPathVariableDeclarationStateObject, IdentificationVariableDeclarationStateObject, RangeVariableDeclarationStateObject

Method Summary

Modifier and TypeMethod and Description
public IManagedType

Returns:

The IManagedType representing the domain object declared by the given identification variable
getManagedType
(StateObject
The StateObject that should be an simple identification variable or an encapsulated identification variable with the identifier KEY or VALUE
stateObject
)

Returns the IManagedType for the given identification variable.

public ListIterable<IdentificationVariableStateObject>
identificationVariables()

Returns the IdentificationVariableStateObject that are used by this state object.

Inherited from org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject:
acceptaddPropertyChangeListenerchildrendecoratefindIdentificationVariablegetDeclarationgetDecoratorgetExpressiongetGrammargetManagedTypeProvidergetParentgetQueryBuildergetRootisDecoratedisEquivalentremovePropertyChangeListenersetParenttoStringtoText

Method Detail

getManagedTypeback to summary
public IManagedType getManagedType(StateObject stateObject)

Returns the IManagedType for the given identification variable. The search does not traverse up the query hierarchy if this declaration is for a subquery.

SELECT e FROM Department d JOIN KEY(d.employees).addresses a
In the above query, the managed type associated with the identification variable:
  • d is "Department"
  • a is "Address"
Parameters
stateObject:StateObject

The StateObject that should be an simple identification variable or an encapsulated identification variable with the identifier KEY or VALUE

Returns:IManagedType

The IManagedType representing the domain object declared by the given identification variable

identificationVariablesback to summary
public ListIterable<IdentificationVariableStateObject> identificationVariables()

Returns the IdentificationVariableStateObject that are used by this state object. It is possible more than one declaration exists, like a range variable declaration has also joins and join fetches.

Returns:ListIterable<IdentificationVariableStateObject>

The list of IdentificationVariableStateObject