|
EclipseLink 2.5.0, build 'v20130507-3faac2b' API Reference | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject
org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractListHolderStateObject<JoinStateObject>
org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractIdentificationVariableDeclarationStateObject
org.eclipse.persistence.jpa.jpql.tools.model.query.IdentificationVariableDeclarationStateObject
public class IdentificationVariableDeclarationStateObject
An identification variable is a valid identifier declared in the FROM clause
of a query. All identification variables must be declared in the FROM clause.
Identification variables cannot be declared in other clauses. An identification variable must not
be a reserved identifier or have the same name as any entity in the same persistence unit:
Identification variables are case insensitive. An identification variable evaluates to a value of
the type of the expression used in declaring the variable.
identification_variable_declaration ::= range_variable_declaration { join | fetch_join }*
IdentificationVariableDeclaration| Field Summary |
|---|
| Fields inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractIdentificationVariableDeclarationStateObject |
|---|
JOINS_LIST |
| Constructor Summary | |
|---|---|
IdentificationVariableDeclarationStateObject(AbstractFromClauseStateObject parent)
Creates a new IdentificationVariableDeclarationStateObject. |
|
IdentificationVariableDeclarationStateObject(AbstractFromClauseStateObject parent,
IEntity entity,
java.lang.String identificationVariable)
Creates a new IdentificationVariableDeclarationStateObject. |
|
IdentificationVariableDeclarationStateObject(AbstractFromClauseStateObject parent,
java.lang.String entityName,
java.lang.String identificationVariable)
Creates a new IdentificationVariableDeclarationStateObject. |
|
| Method Summary | |
|---|---|
void |
accept(StateObjectVisitor visitor)
Visits this StateObject by the given visitor. |
JoinStateObject |
addInnerJoinFetch(java.lang.String path)
Adds a new INNER JOIN FETCH expression to this declaration. |
JoinStateObject |
addJoinFetch(java.lang.String path)
Adds a new JOIN FETCH expression to this declaration. |
JoinStateObject |
addJoinFetch(java.lang.String joinFetchType,
java.util.ListIterator<java.lang.String> paths)
Adds a new JOIN FETCH expression to this declaration. |
JoinStateObject |
addJoinFetch(java.lang.String joinFetchType,
java.lang.String path)
Adds a new JOIN FETCH expression to this declaration. |
JoinStateObject |
addJoinFetchType(java.lang.String joinFetchType)
Adds a new JOIN FETCH expression to this declaration. |
JoinStateObject |
addLeftJoinFetch(java.lang.String path)
Adds a new LEFT JOIN FETCH expression to this declaration. |
JoinStateObject |
addLeftOuterJoinFetch(java.lang.String path)
Adds a new LEFT OUTER JOIN FETCH expression to this declaration. |
protected AbstractRangeVariableDeclarationStateObject |
buildRangeVariableDeclarationStateObject()
Creates |
IEntity |
getEntity()
Returns the actual external form representing the IEntity. |
java.lang.String |
getEntityName()
Returns the name of the entity for which it is used as the "root" of the declaration. |
IManagedType |
getManagedType(StateObject stateObject)
Returns the IManagedType for the given identification variable. |
RangeVariableDeclarationStateObject |
getRangeVariableDeclaration()
Returns the StateObject representing the range variable declaration portion. |
AbstractSchemaNameStateObject |
getRootStateObject()
Returns the StateObject representing the "root" for objects which may not be
reachable by navigation. |
protected java.lang.String |
listName()
Returns the name that is uniquely identifying the list. |
void |
setEntity(IEntity entity)
Sets the IEntity as the "root". |
void |
setEntityName(java.lang.String entityName)
Sets the name of the abstract schema, which is the name of the entity. |
| Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractIdentificationVariableDeclarationStateObject |
|---|
addChildren, addInnerJoin, addJoin, addJoin, addJoin, addJoin, addLeftJoin, addLeftOuterJoin, getExpression, getIdentificationVariable, getIdentificationVariableStateObject, getParent, getRootPath, identificationVariables, initialize, isEquivalent, parseJoin, setExpression, setIdentificationVariable, setRootPath, toTextInternal |
| Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractListHolderStateObject |
|---|
addItem, addItems, addListChangeListener, areChildrenEquivalent, canMoveDown, canMoveUp, getItem, hasItems, items, itemsSize, moveDown, moveUp, removeItem, removeItems, removeListChangeListener, toStringItems |
| Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.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.tools.model.query.StateObject |
|---|
addPropertyChangeListener, children, decorate, findIdentificationVariable, getDeclaration, getDecorator, getGrammar, getManagedTypeProvider, getQueryBuilder, getRoot, isDecorated, removePropertyChangeListener, setParent, toString, toText |
| Constructor Detail |
|---|
public IdentificationVariableDeclarationStateObject(AbstractFromClauseStateObject parent)
IdentificationVariableDeclarationStateObject.
parent - The parent of this state object, which cannot be null
java.lang.NullPointerException - The given parent cannot be nullpublic IdentificationVariableDeclarationStateObject(AbstractFromClauseStateObject parent, IEntity entity, java.lang.String identificationVariable)
IdentificationVariableDeclarationStateObject.
parent - The parent of this state object, which cannot be nullentity - The external form of the entity to add to the declaration listidentificationVariable - The unique identifier identifying the abstract schema name
java.lang.NullPointerException - The given parent cannot be nullpublic IdentificationVariableDeclarationStateObject(AbstractFromClauseStateObject parent, java.lang.String entityName, java.lang.String identificationVariable)
IdentificationVariableDeclarationStateObject.
parent - The parent of this state object, which cannot be nullentityName - The name of the entity nameidentificationVariable - The new identification variable
java.lang.NullPointerException - The given parent cannot be null| Method Detail |
|---|
public void accept(StateObjectVisitor visitor)
StateObject by the given visitor.
visitor - The visitor to visit this objectpublic JoinStateObject addInnerJoinFetch(java.lang.String path)
INNER JOIN FETCH expression to this declaration.
path - The join association path expression
JoinStateObjectpublic JoinStateObject addJoinFetch(java.lang.String path)
JOIN FETCH expression to this declaration.
path - The join association path expression
JoinStateObjectpublic JoinStateObject addJoinFetch(java.lang.String joinFetchType, java.util.ListIterator<java.lang.String> paths)
JOIN FETCH expression to this declaration.
joinFetchType - One of the joining types: LEFT JOIN FETCH, LEFT
OUTER JOIN FETCH, INNER JOIN FETCH or JOIN FETCHpaths - The join association path expression
JoinStateObjectpublic JoinStateObject addJoinFetch(java.lang.String joinFetchType, java.lang.String path)
JOIN FETCH expression to this declaration.
joinFetchType - One of the joining types: LEFT JOIN FETCH, LEFT
OUTER JOIN FETCH, INNER JOIN FETCH or JOIN FETCHpath - The join association path expression
JoinStateObjectpublic JoinStateObject addJoinFetchType(java.lang.String joinFetchType)
JOIN FETCH expression to this declaration.
joinFetchType - One of the joining types: LEFT JOIN FETCH, LEFT
OUTER JOIN FETCH, INNER JOIN FETCH or JOIN FETCH
JoinStateObjectpublic JoinStateObject addLeftJoinFetch(java.lang.String path)
LEFT JOIN FETCH expression to this declaration.
path - The join association path expression
JoinStateObjectpublic JoinStateObject addLeftOuterJoinFetch(java.lang.String path)
LEFT OUTER JOIN FETCH expression to this declaration.
path - The join association path expression
JoinStateObjectprotected AbstractRangeVariableDeclarationStateObject buildRangeVariableDeclarationStateObject()
buildRangeVariableDeclarationStateObject in class AbstractIdentificationVariableDeclarationStateObjectpublic IEntity getEntity()
IEntity.
IEntity or null if no entity exists with the entity namepublic java.lang.String getEntityName()
public IManagedType getManagedType(StateObject stateObject)
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:
stateObject - The StateObject that should be an simple identification variable or
an encapsulated identification variable with the identifier KEY or
VALUE
IManagedType representing the domain object declared by the given
identification variablepublic RangeVariableDeclarationStateObject getRangeVariableDeclaration()
StateObject representing the range variable declaration portion.
getRangeVariableDeclaration in class AbstractIdentificationVariableDeclarationStateObjectpublic AbstractSchemaNameStateObject getRootStateObject()
StateObject representing the "root" for objects which may not be
reachable by navigation.
getRootStateObject in class AbstractIdentificationVariableDeclarationStateObjectStateObject representing one of the possible valid "root"protected java.lang.String listName()
listName in class AbstractIdentificationVariableDeclarationStateObjectpublic void setEntity(IEntity entity)
public void setEntityName(java.lang.String entityName)
entityName - The name of the entity
|
EclipseLink 2.5.0, build 'v20130507-3faac2b' API Reference | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||