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

public Interface DeclarationStateObject

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

This defines the declaration portion of a query, which is the FROM clause of a query.
Author
Pascal Filion
Since
2.4
Version
2.5
See Also
FromClauseStateObject, SimpleFromClauseStateObject, DeleteClauseStateObject, UpdateClauseStateObject

Method Summary

Modifier and TypeMethod and Description
public ListIterable<? extends VariableDeclarationStateObject>

Returns:

The list of VariableDeclarationStateObject that define the domain of the query
declarations
()

Returns the list of declarations declared in the declaration clause of the current query.

public IManagedType

Returns:

The IManagedType representing the domain object declared by the given identification variable
findManagedType
(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 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.

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

Method Detail

declarationsback to summary
public ListIterable<? extends VariableDeclarationStateObject> declarations()

Returns the list of declarations declared in the declaration clause of the current query.

Returns:ListIterable<? extends VariableDeclarationStateObject>

The list of VariableDeclarationStateObject that define the domain of the query

findManagedTypeback to summary
public IManagedType findManagedType(StateObject stateObject)

Returns the IManagedType 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.

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

See Also
getManagedType(StateObject)
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

See Also
findManagedType(StateObject)