public class IdentificationVariableStateObject extends SimpleStateObject
IdentificationVariable| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFINED_PROPERTY
Notify a change in the defined property.
|
TEXT_PROPERTY| Constructor and Description |
|---|
IdentificationVariableStateObject(StateObject parent)
Creates a new
IdentificationVariableStateObject. |
IdentificationVariableStateObject(StateObject parent,
java.lang.String variable)
Creates a new
IdentificationVariableStateObject. |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(StateObjectVisitor visitor)
Visits this
StateObject by the given visitor. |
IdentificationVariable |
getExpression()
Returns the actual parsed object if this
StateObject representation of the JPQL query
was created by parsing an existing JPQL query. |
IManagedType |
getManagedType()
Returns the
IManagedType associated with the field handled by this object. |
IMapping |
getMapping()
Returns
|
IType |
getType()
Returns the
IType of the field handled by this object. |
ITypeDeclaration |
getTypeDeclaration()
Returns the
ITypeDeclaration of the field handled by this object. |
boolean |
isEquivalent(StateObject stateObject)
Determines whether the given
StateObject is equivalent to this one, i.e. |
boolean |
isVirtual()
Determines whether this identification variable is virtual, meaning it's not part of the query
but is required for proper navigability.
|
void |
setExpression(IdentificationVariable 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. |
void |
setText(java.lang.String text)
Sets the text held by this state object.
|
void |
setVirtual(boolean virtual)
Sets whether this identification variable is virtual, meaning it's not part of the query but
is required for proper navigability.
|
getText, hasTextaddPropertyChangeListener, children, decorate, equals, findIdentificationVariable, getDeclaration, getDecorator, getGrammar, getManagedTypeProvider, getParent, getQueryBuilder, getRoot, getType, getType, getTypeHelper, getTypeRepository, hashCode, isDecorated, removePropertyChangeListener, setExpression, setParent, toString, toString, toTextpublic static final java.lang.String DEFINED_PROPERTY
public IdentificationVariableStateObject(StateObject parent)
IdentificationVariableStateObject.parent - The parent of this state object, which cannot be nulljava.lang.NullPointerException - The given parent cannot be nullpublic IdentificationVariableStateObject(StateObject parent, java.lang.String variable)
IdentificationVariableStateObject.parent - The parent of this state object, which cannot be nullvariable - The name of the identification variablejava.lang.NullPointerException - The given parent cannot be nullpublic void accept(StateObjectVisitor visitor)
StateObject by the given visitor.visitor - The visitor to visit this objectpublic IdentificationVariable getExpression()
StateObject representation of the JPQL query
was created by parsing an existing JPQL query.getExpression in interface StateObjectgetExpression in class AbstractStateObjectStateObject
or null when the JPQL query is manually created (i.e. not from a string)public IManagedType getManagedType()
IManagedType associated with the field handled by this object. If this
object does not handle a field that has a IManagedType, then null should
be returned.
For example: "SELECT e FROM Employee e", the object for e
would be returning the IManagedType for Employee.
IManagedType, if it could be resolved; null otherwisepublic IMapping getMapping()
public IType getType()
IType of the field handled by this object.IType that was resolved by this state object or the IType
for IType.UNRESOLVABLE_TYPE if it could not be resolvedpublic ITypeDeclaration getTypeDeclaration()
ITypeDeclaration of the field handled by this object.ITypeDeclaration that was resolved by this object or the ITypeDeclaration for IType.UNRESOLVABLE_TYPE if it could not be resolvedpublic boolean isEquivalent(StateObject stateObject)
StateObject is equivalent to this one, i.e. the
information of both StateObject is the same.isEquivalent in interface StateObjectisEquivalent in class SimpleStateObjectstateObject - The StateObject to compare its content to this onetrue if both object are equivalent; false otherwisepublic boolean isVirtual()
true if this identification variable was virtually created to fully
qualify path expression; false if it was parsedpublic void setExpression(IdentificationVariable expression)
parsed object object, which should only be
done when this object is instantiated during the conversion of a parsed JPQL query into
StateObjects.expression - The parsed object representing an
identification variablepublic void setText(java.lang.String text)
setText in class SimpleStateObjecttext - This model's text valuepublic void setVirtual(boolean virtual)
virtual - true if this identification variable was virtually created to
fully qualify path expression; false if it was parsedEclipseLink 2.6.3, "build v20160428-59c81c5" API Reference