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

public Class StateFieldPathExpressionStateObject

extends AbstractPathExpressionStateObject
Class Inheritance
Imports
org.eclipse.persistence.jpa.jpql.parser.StateFieldPathExpression, org.eclipse.persistence.jpa.jpql.tools.TypeHelper, org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType, .IManagedTypeProvider, .IManagedTypeVisitor, .IMapping, .IType, .ITypeDeclaration, org.eclipse.persistence.jpa.jpql.tools.utility.iterable.EmptyIterable

A single-valued association field is designated by the name of an association-field in a one-to-one or many-to-one relationship. The type of a single-valued association field and thus a single-valued association path expression is the abstract schema type of the related entity.

BNF: state_field_path_expression ::= {identification_variable | single_valued_association_path_expression}.state_field

BNF: single_valued_association_path_expression ::= identification_variable.{single_valued_association_field.}*single_valued_association_field

Author
Pascal Filion
Since
2.4
Version
2.5
See Also
StateFieldPathExpression

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class

Field Summary

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

Constructor Summary

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

Creates a new StateFieldPathExpressionStateObject.

public
StateFieldPathExpressionStateObject(StateObject
The parent of this state object, which cannot be null
parent
,
String
The state field path expression
path
)

Creates a new StateFieldPathExpressionStateObject.

Method Summary

Modifier and TypeMethod and Description
public void
public StateFieldPathExpression
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(StateFieldPathExpression
The parsed object representing a state field 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

StateFieldPathExpressionStateObjectback to summary
public StateFieldPathExpressionStateObject(StateObject parent)

Creates a new StateFieldPathExpressionStateObject.

Parameters
parent:StateObject

The parent of this state object, which cannot be null

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

Creates a new StateFieldPathExpressionStateObject.

Parameters
parent:StateObject

The parent of this state object, which cannot be null

path:String

The state field 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 StateFieldPathExpression 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:StateFieldPathExpression

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(StateFieldPathExpression 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:StateFieldPathExpression

The parsed object representing a state field path expression

org.eclipse.persistence.jpa.jpql.tools.model.query back to summary

protected Class StateFieldPathExpressionStateObject.MapManagedType

extends Object
implements IManagedType
Class Inheritance
  • java.lang.Object
  • org.eclipse.persistence.jpa.jpql.tools.model.query.StateFieldPathExpressionStateObject.MapManagedType
All Implemented Interfaces
org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType, java.lang.Comparable, org.eclipse.persistence.jpa.jpql.tools.spi.IExternalForm

Field Summary

Modifier and TypeField and Description
protected final IType
protected final IManagedTypeProvider

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public void
accept(IManagedTypeVisitor
The visitor to visit this managed type object
visitor
)

Implements org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.accept.

Visits this managed type with the given visitor.
public int
compareTo(IManagedType
the object to be compared.
managedType
)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.
public IMapping
getMappingNamed(String
The name of the mapping to retrieve
name
)

Implements org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.getMappingNamed.

Returns the IMapping with the given name.
public IManagedTypeProvider
getProvider()

Implements org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.getProvider.

Retrieves the owner of this managed type.
public IType
getType()

Implements org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.getType.

Returns the external representation of the class used by this managed type.
public Iterable<IMapping>
mappings()

Implements org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.mappings.

Returns the collection of mappings defined in this managed type.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

mapTypeback to summary
protected final IType mapType
providerback to summary
protected final IManagedTypeProvider provider

Constructor Detail

MapManagedTypeback to summary
protected MapManagedType(IManagedTypeProvider provider, IType mapType)

Method Detail

acceptback to summary
public void accept(IManagedTypeVisitor visitor)

Implements org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.accept.

Doc from org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.accept.

Visits this managed type with the given visitor.

Parameters
visitor:IManagedTypeVisitor

The visitor to visit this managed type object

Annotations
@Override
compareToback to summary
public int compareTo(IManagedType managedType)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure signum(x.compareTo(y)) == -signum(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception if and only if y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that signum(x.compareTo(z)) == signum(y.compareTo(z)), for all z.

Parameters
managedType:IManagedType

the object to be compared.

Returns:int

a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Annotations
@Override
getMappingNamedback to summary
public IMapping getMappingNamed(String name)

Implements org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.getMappingNamed.

Doc from org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.getMappingNamed.

Returns the IMapping with the given name.

Parameters
name:String

The name of the mapping to retrieve

Returns:IMapping

Either the IMapping or null if it could not be found

Annotations
@Override
getProviderback to summary
public IManagedTypeProvider getProvider()

Implements org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.getProvider.

Doc from org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.getProvider.

Retrieves the owner of this managed type.

Returns:IManagedTypeProvider

The external form holding onto the JPA managed types

Annotations
@Override
getTypeback to summary
public IType getType()

Implements org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.getType.

Doc from org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.getType.

Returns the external representation of the class used by this managed type.

Returns:IType

The external representation of the class used by this managed type

Annotations
@Override
mappingsback to summary
public Iterable<IMapping> mappings()

Implements org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.mappings.

Doc from org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType.mappings.

Returns the collection of mappings defined in this managed type.

Returns:Iterable<IMapping>

The collection of persistent fields and properties of this managed type

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override