EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

org.eclipse.persistence.jpa.jpql.model.query
Class DerivedPathIdentificationVariableDeclarationStateObject

java.lang.Object
  extended by org.eclipse.persistence.jpa.jpql.model.query.AbstractStateObject
      extended by org.eclipse.persistence.jpa.jpql.model.query.AbstractListHolderStateObject<JoinStateObject>
          extended by org.eclipse.persistence.jpa.jpql.model.query.AbstractIdentificationVariableDeclarationStateObject
              extended by org.eclipse.persistence.jpa.jpql.model.query.DerivedPathIdentificationVariableDeclarationStateObject
All Implemented Interfaces:
ListHolderStateObject<JoinStateObject>, StateObject, VariableDeclarationStateObject

public class DerivedPathIdentificationVariableDeclarationStateObject
extends AbstractIdentificationVariableDeclarationStateObject

Version:
2.4
Author:
Pascal Filion
Since:
2.4

Field Summary
 
Fields inherited from class org.eclipse.persistence.jpa.jpql.model.query.AbstractIdentificationVariableDeclarationStateObject
JOINS_LIST
 
Constructor Summary
DerivedPathIdentificationVariableDeclarationStateObject(SimpleFromClauseStateObject parent)
          Creates a new IdentificationVariableDeclarationStateObject.
DerivedPathIdentificationVariableDeclarationStateObject(SimpleFromClauseStateObject parent, java.lang.String path, java.lang.String identificationVariable)
          Creates a new IdentificationVariableDeclarationStateObject.
 
Method Summary
 void accept(StateObjectVisitor visitor)
          Visits this StateObject by the given visitor.
protected  AbstractRangeVariableDeclarationStateObject buildRangeVariableDeclarationStateObject()
          Creates
 IManagedType getManagedType(StateObject stateObject)
          Returns the IManagedType for the given identification variable.
 SimpleFromClauseStateObject getParent()
          Returns the parent of this StateObject.
 java.lang.String getPath()
          Returns the string representation of the path expression, which is either a singled-valued object field or a collection-valued path expression.
 DerivedPathVariableDeclarationStateObject getRangeVariableDeclaration()
          Returns the StateObject representing the range variable declaration portion.
 CollectionValuedPathExpressionStateObject getRootStateObject()
          Returns the StateObject representing the "root" for objects which may not be reachable by navigation.
 IterableListIterator<JoinStateObject> items()
          Returns an IterableListIterator over the children.
 
Methods inherited from class org.eclipse.persistence.jpa.jpql.model.query.AbstractIdentificationVariableDeclarationStateObject
addChildren, addInnerJoin, addJoin, addJoin, addJoin, addJoin, addLeftJoin, addLeftOuterJoin, getExpression, getIdentificationVariable, getIdentificationVariableStateObject, getRootPath, identificationVariables, initialize, isEquivalent, listName, parseJoin, setExpression, setIdentificationVariable, setRootPath, toTextInternal
 
Methods inherited from class org.eclipse.persistence.jpa.jpql.model.query.AbstractListHolderStateObject
addItem, addItems, addListChangeListener, areChildrenEquivalent, canMoveDown, canMoveUp, getItem, hasItems, itemsSize, moveDown, moveUp, removeItem, removeItems, removeListChangeListener, toStringItems
 
Methods inherited from class org.eclipse.persistence.jpa.jpql.model.query.AbstractStateObject
acceptUnknownVisitor, acceptUnknownVisitor, addProblems, addPropertyChangeListener, areEquivalent, buildProblem, buildProblem, buildStateObject, buildStateObjects, checkParent, children, decorate, equals, findIdentificationVariable, firePropertyChanged, getChangeSupport, getDeclaration, getDecorator, getGrammar, getManagedTypeProvider, getQueryBuilder, getRoot, getType, getType, getTypeHelper, getTypeRepository, hashCode, isDecorated, parent, parent, parent, removePropertyChangeListener, setExpression, setParent, toString, toString, toStringInternal, toStringItems, toText
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.persistence.jpa.jpql.model.query.StateObject
addPropertyChangeListener, children, decorate, findIdentificationVariable, getDeclaration, getDecorator, getGrammar, getManagedTypeProvider, getQueryBuilder, getRoot, isDecorated, removePropertyChangeListener, setParent, toString, toText
 

Constructor Detail

DerivedPathIdentificationVariableDeclarationStateObject

public DerivedPathIdentificationVariableDeclarationStateObject(SimpleFromClauseStateObject parent)
Creates a new IdentificationVariableDeclarationStateObject.

Parameters:
parent - The parent of this state object, which cannot be null
Throws:
java.lang.NullPointerException - The given parent cannot be null

DerivedPathIdentificationVariableDeclarationStateObject

public DerivedPathIdentificationVariableDeclarationStateObject(SimpleFromClauseStateObject parent,
                                                               java.lang.String path,
                                                               java.lang.String identificationVariable)
Creates a new IdentificationVariableDeclarationStateObject.

Parameters:
parent - The parent of this state object, which cannot be null
path - Either the derived singled-valued object field or the collection-valued path expression
identificationVariable - The identification variable defining the given path
Throws:
java.lang.NullPointerException - The given parent cannot be null
Method Detail

accept

public void accept(StateObjectVisitor visitor)
Visits this StateObject by the given visitor.

Parameters:
visitor - The visitor to visit this object

buildRangeVariableDeclarationStateObject

protected AbstractRangeVariableDeclarationStateObject buildRangeVariableDeclarationStateObject()
Creates

Specified by:
buildRangeVariableDeclarationStateObject in class AbstractIdentificationVariableDeclarationStateObject
Returns:

getManagedType

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:

Parameters:
stateObject - The StateObject that should be an simple identification variable or an encapsulated identification variable with the identifier KEY or VALUE
Returns:
The IManagedType representing the domain object declared by the given identification variable

getParent

public SimpleFromClauseStateObject getParent()
Returns the parent of this StateObject.

Specified by:
getParent in interface StateObject
Overrides:
getParent in class AbstractIdentificationVariableDeclarationStateObject
Returns:
Returns the parent of this StateObject, which is null only when this is the root of the hierarchy

getPath

public java.lang.String getPath()
Returns the string representation of the path expression, which is either a singled-valued object field or a collection-valued path expression.

Returns:
The path expression, which is never null

getRangeVariableDeclaration

public DerivedPathVariableDeclarationStateObject getRangeVariableDeclaration()
Returns the StateObject representing the range variable declaration portion.

Overrides:
getRangeVariableDeclaration in class AbstractIdentificationVariableDeclarationStateObject
Returns:
The concrete instance

getRootStateObject

public CollectionValuedPathExpressionStateObject getRootStateObject()
Returns the StateObject representing the "root" for objects which may not be reachable by navigation.

Overrides:
getRootStateObject in class AbstractIdentificationVariableDeclarationStateObject
Returns:
The StateObject representing one of the possible valid "root"

items

public IterableListIterator<JoinStateObject> items()
Returns an IterableListIterator over the children.

Specified by:
items in interface ListHolderStateObject<JoinStateObject>
Overrides:
items in class AbstractListHolderStateObject<JoinStateObject>
Returns:
An IterableListIterator that is iterating over the children

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference