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

public Class DerivedPathVariableDeclarationStateObject

extends AbstractRangeVariableDeclarationStateObject
Class Inheritance
Imports
org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType

BNF: subselect_identification_variable_declaration ::= derived_path_expression [AS] identification_variable {join}*

BNF: derived_path_expression ::= superquery_identification_variable.{single_valued_object_field.}*collection_valued_field | superquery_identification_variable.{single_valued_object_field.}*single_valued_object_field

Author
Pascal Filion
Since
2.4
Version
2.4
See Also
RangeVariableDeclaration

Field Summary

Inherited from org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractRangeVariableDeclarationStateObject:
AS_PROPERTYIDENTIFICATION_VARIABLE_PROPERTY

Constructor Summary

AccessConstructor and Description
public
DerivedPathVariableDeclarationStateObject(DerivedPathIdentificationVariableDeclarationStateObject
The parent of this state object, which cannot be null
parent
)

Creates a new DerivedPathVariableDeclarationStateObject.

public
DerivedPathVariableDeclarationStateObject(DerivedPathIdentificationVariableDeclarationStateObject
The parent of this state object, which cannot be null
parent
,
String
Either the derived singled-valued object path expression or the collection-valued path expression
path
)

Creates a new DerivedPathVariableDeclarationStateObject.

Method Summary

Modifier and TypeMethod and Description
public void
protected StateObject
public IManagedType
getManagedType(StateObject
The StateObject that should be an simple identification variable or an encapsulated identification variable with the identifier KEY or VALUE
stateObject
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.query.VariableDeclarationStateObject.getManagedType.

Returns the IManagedType for the given identification variable.
public DerivedPathIdentificationVariableDeclarationStateObject
public String

Returns:

The path expression, which is never null
getPath
()

Returns the string representation of the path expression.

public String
getRootPath()

Implements abstract org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractRangeVariableDeclarationStateObject.getRootPath.

Returns the "root" object for objects which may not be reachable by navigation.
public CollectionValuedPathExpressionStateObject
public void
setRootPath(String
The "root" object
path
)

Implements abstract org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractRangeVariableDeclarationStateObject.setRootPath.

Sets the "root" object for objects which may not be reachable by navigation.
Inherited from org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractRangeVariableDeclarationStateObject:
addAsaddChildrenaddProblemsgetExpressiongetIdentificationVariablegetIdentificationVariableStateObjecthasAshasIdentificationVariableidentificationVariablesinitializeisEquivalentisIdentificationVariableOptionalisIdentificationVariableVirtualsetAssetExpressionsetIdentificationVariablesetIdentificationVariableOptionaltoggleAstoTextInternal

Constructor Detail

DerivedPathVariableDeclarationStateObjectback to summary
public DerivedPathVariableDeclarationStateObject(DerivedPathIdentificationVariableDeclarationStateObject parent)

Creates a new DerivedPathVariableDeclarationStateObject.

Parameters
parent:DerivedPathIdentificationVariableDeclarationStateObject

The parent of this state object, which cannot be null

Exceptions
NullPointerException:
The given parent cannot be null
DerivedPathVariableDeclarationStateObjectback to summary
public DerivedPathVariableDeclarationStateObject(DerivedPathIdentificationVariableDeclarationStateObject parent, String path)

Creates a new DerivedPathVariableDeclarationStateObject.

Parameters
parent:DerivedPathIdentificationVariableDeclarationStateObject

The parent of this state object, which cannot be null

path:String

Either the derived singled-valued object path expression or the collection-valued path expression

Exceptions
NullPointerException:
The given parent cannot be null

Method Detail

acceptback to summary
public void accept(StateObjectVisitor visitor)

Implements org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject.accept.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject.accept.

Visits this StateObject by the given visitor.

Parameters
visitor:StateObjectVisitor

The visitor to visit this object

Annotations
@Override
buildRootStateObjectback to summary
protected StateObject buildRootStateObject()

Implements abstract org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractRangeVariableDeclarationStateObject.buildRootStateObject.

Annotations
@Override
getManagedTypeback to summary
public IManagedType getManagedType(StateObject stateObject)

Implements org.eclipse.persistence.jpa.jpql.tools.model.query.VariableDeclarationStateObject.getManagedType.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.query.VariableDeclarationStateObject.getManagedType.

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

Annotations
@Override
getParentback to summary
public DerivedPathIdentificationVariableDeclarationStateObject getParent()

Overrides org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject.getParent.

Implements org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject.getParent.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject.getParent.

Returns the parent of this StateObject.

Returns:DerivedPathIdentificationVariableDeclarationStateObject

Returns the parent of this StateObject, which is null only when this is the root of the hierarchy

Annotations
@Override
getPathback to summary
public String getPath()

Returns the string representation of the path expression. If the identification variable is virtual, then it is not part of the result.

Returns:String

The path expression, which is never null

getRootPathback to summary
public String getRootPath()

Implements abstract org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractRangeVariableDeclarationStateObject.getRootPath.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractRangeVariableDeclarationStateObject.getRootPath.

Returns the "root" object for objects which may not be reachable by navigation.

Returns:String

The "root" object

Annotations
@Override
getRootStateObjectback to summary
public CollectionValuedPathExpressionStateObject getRootStateObject()

Overrides org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractRangeVariableDeclarationStateObject.getRootStateObject.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractRangeVariableDeclarationStateObject.getRootStateObject.

Returns the StateObject holding onto the abstract schema name.

Returns:CollectionValuedPathExpressionStateObject

The StateObject, which is never null

Annotations
@Override
setRootPathback to summary
public void setRootPath(String path)

Implements abstract org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractRangeVariableDeclarationStateObject.setRootPath.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractRangeVariableDeclarationStateObject.setRootPath.

Sets the "root" object for objects which may not be reachable by navigation.

Parameters
path:String

The "root" object

Annotations
@Override