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

public Class CollectionValuedPathExpressionStateObject

extends AbstractPathExpressionStateObject
Class Inheritance
Imports
org.eclipse.persistence.jpa.jpql.parser.CollectionValuedPathExpression, org.eclipse.persistence.jpa.jpql.tools.TypeHelper, org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType, .IMapping, .IType, .ITypeDeclaration

A collection-valued field is designated by the name of an association field in a one-to-many or a many-to-many relationship or by the name of an element collection field. The type of a collection-valued field is a collection of values of the abstract schema type of the related entity or element type.

BNF: collection_valued_path_expression ::= general_identification_variable.{single_valued_object_field.}*collection_valued_field

Author
Pascal Filion
Since
2.4
Version
2.4
See Also
CollectionValuedPathExpression

Field Summary

Inherited from org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractPathExpressionStateObject:
IDENTIFICATION_VARIABLE_PROPERTYPATHS_LIST

Constructor Summary

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

Creates a new CollectionValuedPathExpressionStateObject.

public
CollectionValuedPathExpressionStateObject(StateObject
The parent of this state object, which cannot be null
parent
,
String
The collection-valued path expression
path
)

Creates a new CollectionValuedPathExpressionStateObject.

Method Summary

Modifier and TypeMethod and Description
public void
public CollectionValuedPathExpression
getExpression()

Overrides org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractPathExpressionStateObject.getExpression.

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

Returns the actual parsed object if this StateObject representation of the JPQL query was created by parsing an existing JPQL query.
protected IManagedType
protected IType
resolveType()

Implements abstract org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractPathExpressionStateObject.resolveType.

Resolves the IType of the property handled by this object.
public void
setExpression(CollectionValuedPathExpression
The parsed object representing a collection-valued path expression
expression
)

Keeps a reference of the parsed object object, which should only be done when this object is instantiated during the conversion of a parsed JPQL query into StateObjects.

Inherited from org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractPathExpressionStateObject:
addChildrenaddItemaddItemsaddListChangeListenerappendcanMoveDowncanMoveUpclearResolvedObjectsgetIdentificationVariablegetItemgetManagedTypegetMappinggetMappinggetPathgetTypegetTypeDeclarationhasIdentificationVariablehasItemsinitializeisEquivalentitemsitemsSizemoveDownmoveUpremoveItemremoveItemremoveItemsremoveListChangeListenerresolveMappingsresolveTypeDeclarationsetIdentificationVariablesetIdentificationVariableInternallysetPathsetPathsetPathssetPathssetPathstoTextInternal

Constructor Detail

CollectionValuedPathExpressionStateObjectback to summary
public CollectionValuedPathExpressionStateObject(StateObject parent)

Creates a new CollectionValuedPathExpressionStateObject.

Parameters
parent:StateObject

The parent of this state object, which cannot be null

Exceptions
NullPointerException:
The given parent cannot be null
CollectionValuedPathExpressionStateObjectback to summary
public CollectionValuedPathExpressionStateObject(StateObject parent, String path)

Creates a new CollectionValuedPathExpressionStateObject.

Parameters
parent:StateObject

The parent of this state object, which cannot be null

path:String

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
getExpressionback to summary
public CollectionValuedPathExpression getExpression()

Overrides org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractPathExpressionStateObject.getExpression.

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

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

Returns the actual parsed object if this StateObject representation of the JPQL query was created by parsing an existing JPQL query.

Returns:CollectionValuedPathExpression

The parsed object when a JPQL query is parsed and converted into a StateObject or null when the JPQL query is manually created (i.e. not from a string)

Annotations
@Override
resolveManagedTypeback to summary
protected IManagedType resolveManagedType()

Implements abstract org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractPathExpressionStateObject.resolveManagedType.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractPathExpressionStateObject.resolveManagedType.

Resolves

Annotations
@Override
resolveTypeback to summary
protected IType resolveType()

Implements abstract org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractPathExpressionStateObject.resolveType.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractPathExpressionStateObject.resolveType.

Resolves the IType of the property handled by this object.

Returns:IType

Either the IType that was resolved by this object or the IType for IType#UNRESOLVABLE_TYPE if it could not be resolved

Annotations
@Override
setExpressionback to summary
public void setExpression(CollectionValuedPathExpression expression)

Keeps a reference of the parsed object object, which should only be done when this object is instantiated during the conversion of a parsed JPQL query into StateObjects.

Parameters
expression:CollectionValuedPathExpression

The parsed object representing a collection-valued path expression