public abstract class EncapsulatedIdentificationVariableExpressionStateObject extends AbstractSingleEncapsulatedExpressionStateObject
<identifier>(identification_variable)
EncapsulatedIdentificationVariableExpression
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
IDENTIFICATION_VARIABLE_PROPERTY
Notifies the identification variable property has changed.
|
STATE_OBJECT_PROPERTY
Modifier | Constructor and Description |
---|---|
protected |
EncapsulatedIdentificationVariableExpressionStateObject(StateObject parent)
Creates a new
EncapsulatedIdentificationVariableExpressionStateObject . |
protected |
EncapsulatedIdentificationVariableExpressionStateObject(StateObject parent,
java.lang.String identificationVariable)
Creates a new
EncapsulatedIdentificationVariableExpressionStateObject . |
Modifier and Type | Method and Description |
---|---|
protected void |
checkIntegrity()
Makes sure the cached identification variable and the one owned by
IdentificationVariableStateObject are the same. |
protected void |
clearResolvedObjects()
Clears the values related to the managed type and type.
|
EncapsulatedIdentificationVariableExpression |
getExpression()
Returns the actual parsed object if this
StateObject representation of the JPQL query
was created by parsing an existing JPQL query. |
java.lang.String |
getIdentificationVariable()
Returns the identification variable.
|
IManagedType |
getManagedType()
Returns the
IManagedType associated with the field handled by this object. |
protected java.lang.String |
getQueryBNFId()
Returns the unique identifier of the
JPQLQueryBNF that will determine how to parse the encapsulated expression. |
IdentificationVariableStateObject |
getStateObject()
Returns the encapsulated
StateObject . |
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 |
hasIdentificationVariable()
Determines whether the identification variable has been defined or not.
|
protected void |
initialize()
Initializes this state object.
|
protected IManagedType |
resolveManagedType()
Retrieves the
IManagedType that is mapped to the identification variable, if and only
if the identification variable is used to declare an entity. |
protected IType |
resolveType()
Resolves the
IType of the property handled by this object. |
protected ITypeDeclaration |
resolveTypeDeclaration()
Resolves the
ITypeDeclaration of the property handled by this object. |
void |
setIdentificationVariable(java.lang.String identificationVariable)
Sets the identification variable of this encapsulated expression.
|
addChildren, hasStateObject, isEquivalent, parse, setStateObject, toTextEncapsulatedExpression
getIdentifier, toTextInternal
acceptUnknownVisitor, acceptUnknownVisitor, addProblems, addPropertyChangeListener, areEquivalent, buildProblem, buildProblem, buildStateObject, buildStateObjects, checkParent, children, decorate, equals, findIdentificationVariable, firePropertyChanged, getChangeSupport, getDeclaration, getDecorator, getGrammar, getManagedTypeProvider, getParent, getQueryBuilder, getRoot, getType, getType, getTypeHelper, getTypeRepository, hashCode, isDecorated, parent, parent, parent, removePropertyChangeListener, setExpression, setParent, toString, toString, toStringInternal, toStringItems, toText
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
accept
public static final java.lang.String IDENTIFICATION_VARIABLE_PROPERTY
protected EncapsulatedIdentificationVariableExpressionStateObject(StateObject parent)
EncapsulatedIdentificationVariableExpressionStateObject
.parent
- The parent of this state object, which cannot be null
java.lang.NullPointerException
- The given parent cannot be null
protected EncapsulatedIdentificationVariableExpressionStateObject(StateObject parent, java.lang.String identificationVariable)
EncapsulatedIdentificationVariableExpressionStateObject
.parent
- The parent of this state object, which cannot be null
identificationVariable
- The identification variablejava.lang.NullPointerException
- The given parent cannot be null
protected void checkIntegrity()
IdentificationVariableStateObject
are the same. If they are not, then clears the cached
values related to the type.protected void clearResolvedObjects()
public EncapsulatedIdentificationVariableExpression getExpression()
StateObject
representation of the JPQL query
was created by parsing an existing JPQL query.getExpression
in interface StateObject
getExpression
in class AbstractSingleEncapsulatedExpressionStateObject
StateObject
or null
when the JPQL query is manually created (i.e. not from a string)public java.lang.String getIdentificationVariable()
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
otherwiseprotected java.lang.String getQueryBNFId()
JPQLQueryBNF
that will determine how to parse the encapsulated expression.getQueryBNFId
in class AbstractSingleEncapsulatedExpressionStateObject
null
ID of the BNFpublic IdentificationVariableStateObject getStateObject()
StateObject
.getStateObject
in class AbstractSingleEncapsulatedExpressionStateObject
StateObject
public IType getType()
IType
of the field handled by this object.IType
of the identification variable 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 hasIdentificationVariable()
true
if the identification variable has been defined;
false
otherwiseprotected void initialize()
initialize
in class AbstractStateObject
protected IManagedType resolveManagedType()
IManagedType
that is mapped to the identification variable, if and only
if the identification variable is used to declare an entity.IManagedType
declared by the identification variable or null
if it could not be resolvedprotected IType resolveType()
IType
of the property handled by this object.IType
that was resolved by this object or the IType
for
IType.UNRESOLVABLE_TYPE
if it could not be resolvedprotected ITypeDeclaration resolveTypeDeclaration()
ITypeDeclaration
of the property handled by this object.ITypeDeclaration
that was resolved by this object or the ITypeDeclaration
for IType.UNRESOLVABLE_TYPE
if it could not be resolvedpublic void setIdentificationVariable(java.lang.String identificationVariable)
identificationVariable
- The name of the identification variable