Class EncapsulatedIdentificationVariableExpressionStateObject
- java.lang.Object
-
- org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject
-
- org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractEncapsulatedExpressionStateObject
-
- org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractSingleEncapsulatedExpressionStateObject
-
- org.eclipse.persistence.jpa.jpql.tools.model.query.EncapsulatedIdentificationVariableExpressionStateObject
-
- All Implemented Interfaces:
StateObject
- Direct Known Subclasses:
EntryExpressionStateObject
,IndexExpressionStateObject
,KeyExpressionStateObject
,ObjectExpressionStateObject
,ValueExpressionStateObject
public abstract class EncapsulatedIdentificationVariableExpressionStateObject extends AbstractSingleEncapsulatedExpressionStateObject
This object represents an identification variable that is wrapped by a function.BNF:<identifier>(identification_variable)
- Since:
- 2.4
- Version:
- 2.4
- Author:
- Pascal Filion
- See Also:
EncapsulatedIdentificationVariableExpression
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
IDENTIFICATION_VARIABLE_PROPERTY
Notifies the identification variable property has changed.-
Fields inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractSingleEncapsulatedExpressionStateObject
STATE_OBJECT_PROPERTY
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EncapsulatedIdentificationVariableExpression
getExpression()
Returns the actual parsed object if thisStateObject
representation of the JPQL query was created by parsing an existing JPQL query.java.lang.String
getIdentificationVariable()
Returns the identification variable.IManagedType
getManagedType()
Returns theIManagedType
associated with the field handled by this object.IdentificationVariableStateObject
getStateObject()
Returns the encapsulatedStateObject
.IType
getType()
Returns theIType
of the field handled by this object.ITypeDeclaration
getTypeDeclaration()
Returns theITypeDeclaration
of the field handled by this object.boolean
hasIdentificationVariable()
Determines whether the identification variable has been defined or not.void
setIdentificationVariable(java.lang.String identificationVariable)
Sets the identification variable of this encapsulated expression.-
Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractSingleEncapsulatedExpressionStateObject
hasStateObject, isEquivalent, parse
-
Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractEncapsulatedExpressionStateObject
getIdentifier
-
Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject
addPropertyChangeListener, children, decorate, equals, findIdentificationVariable, getDeclaration, getDecorator, getGrammar, getManagedTypeProvider, getParent, getQueryBuilder, getRoot, getType, getType, getTypeHelper, getTypeRepository, hashCode, isDecorated, removePropertyChangeListener, setExpression, setParent, toString, toString, toText
-
Methods inherited from interface org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject
accept
-
-
-
-
Field Detail
-
IDENTIFICATION_VARIABLE_PROPERTY
public static final java.lang.String IDENTIFICATION_VARIABLE_PROPERTY
Notifies the identification variable property has changed.- See Also:
- Constant Field Values
-
-
Method Detail
-
getExpression
public EncapsulatedIdentificationVariableExpression getExpression()
Returns the actual parsed object if thisStateObject
representation of the JPQL query was created by parsing an existing JPQL query.- Specified by:
getExpression
in interfaceStateObject
- Overrides:
getExpression
in classAbstractSingleEncapsulatedExpressionStateObject
- Returns:
- The parsed object when a JPQL query is parsed and converted into a
StateObject
ornull
when the JPQL query is manually created (i.e. not from a string)
-
getIdentificationVariable
public java.lang.String getIdentificationVariable()
Returns the identification variable.- Returns:
- The name of the identification variable
-
getManagedType
public IManagedType getManagedType()
Returns theIManagedType
associated with the field handled by this object. If this object does not handle a field that has aIManagedType
, thennull
should be returned.For example: "
SELECT e FROM Employee e
", the object for e would be returning theIManagedType
for Employee.- Returns:
- Either the
IManagedType
, if it could be resolved;null
otherwise
-
getStateObject
public IdentificationVariableStateObject getStateObject()
Returns the encapsulatedStateObject
.- Overrides:
getStateObject
in classAbstractSingleEncapsulatedExpressionStateObject
- Returns:
- The encapsulated
StateObject
-
getType
public IType getType()
Returns theIType
of the field handled by this object.- Returns:
- Either the
IType
of the identification variable or theIType
forIType.UNRESOLVABLE_TYPE
if it could not be resolved
-
getTypeDeclaration
public ITypeDeclaration getTypeDeclaration()
Returns theITypeDeclaration
of the field handled by this object.- Returns:
- Either the
ITypeDeclaration
that was resolved by this object or theITypeDeclaration
forIType.UNRESOLVABLE_TYPE
if it could not be resolved
-
hasIdentificationVariable
public boolean hasIdentificationVariable()
Determines whether the identification variable has been defined or not.- Returns:
true
if the identification variable has been defined;false
otherwise
-
setIdentificationVariable
public void setIdentificationVariable(java.lang.String identificationVariable)
Sets the identification variable of this encapsulated expression.- Parameters:
identificationVariable
- The name of the identification variable
-
-