|
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.Objectorg.eclipse.persistence.jpa.jpql.model.query.AbstractStateObject
org.eclipse.persistence.jpa.jpql.model.query.AbstractConditionalClauseStateObject
public abstract class AbstractConditionalClauseStateObject
Conditional expressions are composed of other conditional expressions, comparison operations, logical operations, path expressions that evaluate to boolean values, boolean literals, and boolean input parameters. Arithmetic expressions can be used in comparison expressions. Arithmetic expressions are composed of other arithmetic expressions, arithmetic operations, path expressions that evaluate to numeric values, numeric literals, and numeric input parameters. Arithmetic operations use numeric promotion. Standard bracketing () for ordering expression evaluation is supported.
expression ::= identifier conditional_expression
AbstractConditionalClause
Field Summary | |
---|---|
static java.lang.String |
CONDITIONAL_STATE_OBJECT_PROPERTY
Notifies the conditional expression property has changed. |
Constructor Summary | |
---|---|
protected |
AbstractConditionalClauseStateObject(StateObject parent)
Creates a new AbstractConditionalClauseStateObject . |
protected |
AbstractConditionalClauseStateObject(StateObject parent,
StateObject conditionalStateObject)
Creates a new AbstractConditionalClauseStateObject . |
Method Summary | |
---|---|
protected void |
addChildren(java.util.List<StateObject> children)
Adds the children of this StateObject to the given list. |
AndExpressionStateObject |
andParse(java.lang.String jpqlFragment)
Parses the given JPQL fragment as the right side of an AND expression. |
IConditionalExpressionStateObjectBuilder |
getBuilder()
Creates and returns a new IConditionalExpressionStateObjectBuilder that can be used to
programmatically create a conditional expression and once the expression is complete,
IConditionalExpressionStateObjectBuilder.commit() will push the StateObject
representation of that expression as this clause's conditional expression. |
StateObject |
getConditional()
Returns the state object representing the composition of the conditional expressions. |
abstract java.lang.String |
getIdentifier()
Returns the JPQL identifier of this clause. |
boolean |
hasConditional()
Determines whether the StateObject representing the conditional 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. |
OrExpressionStateObject |
orParse(java.lang.String jpqlFragment)
Parses the given JPQL fragment as the right side of an OR expression. |
void |
parse(java.lang.String jpqlFragment)
Parses the given JPQL fragment, which represents a conditional expression, and creates the StateObject . |
void |
setConditional(StateObject conditionalStateObject)
Sets the given StateObject to be the conditional expression of this clause. |
protected boolean |
shouldEncapsulateORExpression(StateObject stateObject)
|
protected void |
toTextInternal(java.lang.Appendable writer)
Prints out a string representation of this StateObject , 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.AbstractStateObject |
---|
acceptUnknownVisitor, acceptUnknownVisitor, addProblems, addPropertyChangeListener, areEquivalent, buildProblem, buildProblem, buildStateObject, buildStateObjects, checkParent, children, decorate, equals, findIdentificationVariable, firePropertyChanged, getChangeSupport, getDeclaration, getDecorator, getExpression, 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 CONDITIONAL_STATE_OBJECT_PROPERTY
Constructor Detail |
---|
protected AbstractConditionalClauseStateObject(StateObject parent)
AbstractConditionalClauseStateObject
.
parent
- The parent of this state object, which cannot be null
java.lang.NullPointerException
- The given parent cannot be null
protected AbstractConditionalClauseStateObject(StateObject parent, StateObject conditionalStateObject)
AbstractConditionalClauseStateObject
.
parent
- The parent of this state object, which cannot be null
conditionalStateObject
- The StateObject
representing the conditional expression
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 AndExpressionStateObject andParse(java.lang.String jpqlFragment)
AND
expression. The
current conditional expression will become the left side of the AND
expression.
jpqlFragment
- The portion of the query representing the right side of the
AND
expression
AndExpressionStateObject
public IConditionalExpressionStateObjectBuilder getBuilder()
IConditionalExpressionStateObjectBuilder
that can be used to
programmatically create a conditional expression and once the expression is complete,
IConditionalExpressionStateObjectBuilder.commit()
will push the StateObject
representation of that expression as this clause's conditional expression.
public StateObject getConditional()
public abstract java.lang.String getIdentifier()
public boolean hasConditional()
StateObject
representing the conditional expression is present
or not.
true
if the conditional expression 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 OrExpressionStateObject orParse(java.lang.String jpqlFragment)
OR
expression. The
current conditional expression will become the left side of the OR
expression.
jpqlFragment
- The portion of the query representing the right side of the
OR
expression
OrExpressionStateObject
public void parse(java.lang.String jpqlFragment)
StateObject
.
jpqlFragment
- The portion of the query representing a conditional expressionpublic void setConditional(StateObject conditionalStateObject)
StateObject
to be the conditional expression of this clause.
conditionalStateObject
- The new StateObject
representing the conditional
expressionprotected boolean shouldEncapsulateORExpression(StateObject stateObject)
protected void toTextInternal(java.lang.Appendable writer) throws java.io.IOException
StateObject
, which should not be used to
define a true
string representation of a JPQL query but should be used for
debugging purposes.
toTextInternal
in class AbstractStateObject
writer
- The writer used to print out the string representation
java.io.IOException
- This should never happens, it is only required because Appendable
is used instead of any concrete class
|
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 |