|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.jpa.jpql.model.query.AbstractStateObject org.eclipse.persistence.jpa.jpql.model.query.AbstractEncapsulatedExpressionStateObject org.eclipse.persistence.jpa.jpql.model.query.AbstractTripleEncapsulatedExpressionStateObject
public abstract class AbstractTripleEncapsulatedExpressionStateObject
This state object takes care of parsing an expression that encapsulates three expressions separated by a comma.
expression ::= <identifier>(first_expression, second_expression, third_expression)
LocateExpressionStateObject
,
SubstringExpressionStateObject
,
AbstractTripleEncapsulatedExpression
Field Summary | |
---|---|
static java.lang.String |
FIRST_STATE_OBJECT_PROPERTY
Notifies the first StateObject property has changed. |
static java.lang.String |
SECOND_STATE_OBJECT_PROPERTY
Notifies the second StateObject property has changed. |
static java.lang.String |
THIRD_STATE_OBJECT_PROPERTY
Notifies the third StateObject property has changed. |
Constructor Summary | |
---|---|
protected |
AbstractTripleEncapsulatedExpressionStateObject(StateObject parent)
Creates a new AbstractTripleEncapsulatedExpressionStateObject . |
protected |
AbstractTripleEncapsulatedExpressionStateObject(StateObject parent,
StateObject firstStateObject,
StateObject secondStateObject,
StateObject thirdStateObject)
Creates a new AbstractTripleEncapsulatedExpressionStateObject . |
protected |
AbstractTripleEncapsulatedExpressionStateObject(StateObject parent,
java.lang.String firstJpqlFragment,
java.lang.String secondJpqlFragment,
java.lang.String thirdJpqlFragment)
Creates a new AbstractTripleEncapsulatedExpressionStateObject . |
Method Summary | |
---|---|
protected void |
addChildren(java.util.List<StateObject> children)
Adds the children of this StateObject to the given list. |
AbstractTripleEncapsulatedExpression |
getExpression()
Returns the actual parsed object if this StateObject representation of the JPQL query
was created by parsing an existing JPQL query. |
StateObject |
getFirst()
Returns the StateObject representing the first expression. |
protected abstract java.lang.String |
getFirstQueryBNFId()
Returns the unique identifier of the BNF that will be used to parse a JPQL fragment as the first encapsulated expression. |
StateObject |
getSecond()
Returns the StateObject representing the second expression. |
protected abstract java.lang.String |
getSecondQueryBNFId()
Returns the unique identifier of the BNF that will be used to parse a JPQL fragment as the second encapsulated expression. |
StateObject |
getThird()
Returns the StateObject representing the third expression. |
protected abstract java.lang.String |
getThirdQueryBNFId()
Returns the unique identifier of the BNF that will be used to parse a JPQL fragment as the third encapsulated expression. |
boolean |
hasFirst()
Determines whether the StateObject representing the first encapsulated expression is
present or not. |
boolean |
hasSecond()
Determines whether the StateObject representing the second encapsulated expression is
present or not. |
boolean |
hasThird()
Determines whether the StateObject representing the third encapsulated expression is
present or not. |
boolean |
isEquivalent(StateObject stateObject)
Determines whether the given StateObject is equivalent to this one, i.e. the
information of both StateObject is the same. |
void |
parseFirst(java.lang.String jpqlFragment)
Parses the given JPQL fragment, which will represent the first encapsulated expression. |
void |
parseSecond(java.lang.String jpqlFragment)
Parses the given JPQL fragment, which will represent the second encapsulated expression. |
void |
parseThird(java.lang.String jpqlFragment)
Parses the given JPQL fragment, which will represent the third encapsulated expression. |
void |
setFirst(StateObject firstStateObject)
Sets the given StateObject to represent the first encapsulated expression. |
void |
setSecond(StateObject secondStateObject)
Sets the given StateObject to represent the second encapsulated expression. |
void |
setThird(StateObject thirdStateObject)
Sets the given StateObject to represent the third encapsulated expression. |
protected void |
toTextEncapsulatedExpression(java.lang.Appendable writer)
Prints out a string representation of this encapsulated information, which should not be used to define a true string representation of a JPQL query but should be used for
debugging purposes. |
Methods inherited from class org.eclipse.persistence.jpa.jpql.model.query.AbstractEncapsulatedExpressionStateObject |
---|
getIdentifier, toTextInternal |
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, getParent, getQueryBuilder, getRoot, getType, getType, getTypeHelper, getTypeRepository, hashCode, initialize, 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 |
---|
accept |
Field Detail |
---|
public static final java.lang.String FIRST_STATE_OBJECT_PROPERTY
StateObject
property has changed.
public static final java.lang.String SECOND_STATE_OBJECT_PROPERTY
StateObject
property has changed.
public static final java.lang.String THIRD_STATE_OBJECT_PROPERTY
StateObject
property has changed.
Constructor Detail |
---|
protected AbstractTripleEncapsulatedExpressionStateObject(StateObject parent)
AbstractTripleEncapsulatedExpressionStateObject
.
parent
- The parent of this state object, which cannot be null
java.lang.NullPointerException
- The given parent cannot be null
protected AbstractTripleEncapsulatedExpressionStateObject(StateObject parent, StateObject firstStateObject, StateObject secondStateObject, StateObject thirdStateObject)
AbstractTripleEncapsulatedExpressionStateObject
.
parent
- The parent of this state object, which cannot be null
firstStateObject
- The StateObject
of the first encapsulated expressionsecondStateObject
- The StateObject
of the second encapsulated expressionthirdStateObject
- The StateObject
of the third encapsulated expression
java.lang.NullPointerException
- The given parent cannot be null
protected AbstractTripleEncapsulatedExpressionStateObject(StateObject parent, java.lang.String firstJpqlFragment, java.lang.String secondJpqlFragment, java.lang.String thirdJpqlFragment)
AbstractTripleEncapsulatedExpressionStateObject
.
parent
- The parent of this state object, which cannot be null
firstJpqlFragment
- The string representation of the first encapsulated expression to
parse and to convert into a StateObject
representationsecondJpqlFragment
- The string representation of the second encapsulated expression to
parse and to convert into a StateObject
representationthirdJpqlFragment
- The string representation of the third encapsulated expression to
parse and to convert into a StateObject
representation
java.lang.NullPointerException
- The given parent cannot be null
Method Detail |
---|
protected void addChildren(java.util.List<StateObject> children)
StateObject
to the given list.
addChildren
in class AbstractStateObject
children
- The list used to store the childrenpublic AbstractTripleEncapsulatedExpression getExpression()
StateObject
representation of the JPQL query
was created by parsing an existing JPQL query.
getExpression
in interface StateObject
getExpression
in class AbstractEncapsulatedExpressionStateObject
StateObject
or null
when the JPQL query is manually created (i.e. not from a string)public StateObject getFirst()
StateObject
representing the first expression.
StateObject
or null
if none existsprotected abstract java.lang.String getFirstQueryBNFId()
public StateObject getSecond()
StateObject
representing the second expression.
StateObject
or null
if none existsprotected abstract java.lang.String getSecondQueryBNFId()
public StateObject getThird()
StateObject
representing the third expression.
StateObject
or null
if none existsprotected abstract java.lang.String getThirdQueryBNFId()
public boolean hasFirst()
StateObject
representing the first encapsulated expression is
present or not.
true
if the first StateObject
is not null
;
false
otherwisepublic boolean hasSecond()
StateObject
representing the second encapsulated expression is
present or not.
true
if the second StateObject
is not null
;
false
otherwisepublic boolean hasThird()
StateObject
representing the third encapsulated expression is
present or not.
true
if the third StateObject
is not null
;
false
otherwisepublic boolean isEquivalent(StateObject stateObject)
StateObject
is equivalent to this one, i.e. the
information of both StateObject
is the same.
isEquivalent
in interface StateObject
isEquivalent
in class AbstractStateObject
stateObject
- The StateObject
to compare its content to this one
true
if both object are equivalent; false
otherwisepublic void parseFirst(java.lang.String jpqlFragment)
jpqlFragment
- The string representation of the first encapsulated expression to parse and
to convert into a StateObject
representationpublic void parseSecond(java.lang.String jpqlFragment)
jpqlFragment
- The string representation of the second encapsulated expression to parse and
to convert into a StateObject
representationpublic void parseThird(java.lang.String jpqlFragment)
jpqlFragment
- The string representation of the third encapsulated expression to parse and
to convert into a StateObject
representationpublic void setFirst(StateObject firstStateObject)
StateObject
to represent the first encapsulated expression.
firstStateObject
- The new encapsulated StateObject
representing the first
expressionpublic void setSecond(StateObject secondStateObject)
StateObject
to represent the second encapsulated expression.
secondStateObject
- The new encapsulated StateObject
representing the second
expressionpublic void setThird(StateObject thirdStateObject)
StateObject
to represent the third encapsulated expression.
thirdStateObject
- The new encapsulated StateObject
representing the third
expressionprotected void toTextEncapsulatedExpression(java.lang.Appendable writer) throws java.io.IOException
true
string representation of a JPQL query but should be used for
debugging purposes.
toTextEncapsulatedExpression
in class AbstractEncapsulatedExpressionStateObject
writer
- The writer used to print out the string representation of the encapsulated
information
java.io.IOException
- This should never happens, only required because Appendable
is
used instead of StringBuilder
for instance
|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |