public class ExistsExpressionStateObject extends AbstractSingleEncapsulatedExpressionStateObject
EXISTS expression is a predicate that is true only if the
result of the subquery consists of one or more values and that is false otherwise.
exists_expression ::= [NOT] EXISTS(subquery)ExistsExpression| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NOT_PROPERTY
Notifies the visibility of the
NOT identifier has changed. |
STATE_OBJECT_PROPERTY| Constructor and Description |
|---|
ExistsExpressionStateObject(StateObject parent)
Creates a new
ExistsExpressionStateObject. |
ExistsExpressionStateObject(StateObject parent,
boolean not,
StateObject stateObject)
Creates a new
ExistsExpressionStateObject. |
ExistsExpressionStateObject(StateObject parent,
boolean not,
java.lang.String jpqlFragment)
Creates a new
ExistsExpressionStateObject. |
ExistsExpressionStateObject(StateObject parent,
StateObject stateObject)
Creates a new
ExistsExpressionStateObject. |
ExistsExpressionStateObject(StateObject parent,
java.lang.String jpqlFragment)
Creates a new
ExistsExpressionStateObject. |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(StateObjectVisitor visitor)
Visits this
StateObject by the given visitor. |
ExistsExpressionStateObject |
addNot()
Makes sure the
NOT identifier is specified. |
ExistsExpression |
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 |
getIdentifier()
Returns the JPQL identifier of the expression represented by this
AbstractSingleEncapsulatedExpressionStateObject. |
boolean |
hasNot()
Determines whether the
NOT identifier is used or not. |
boolean |
isEquivalent(StateObject stateObject)
Determines whether the given
StateObject is equivalent to this one, i.e. |
void |
removeNot()
Makes sure the
NOT identifier is not specified. |
void |
setExpression(ExistsExpression 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 |
setNot(boolean not)
Sets whether the
NOT identifier should be part of the expression or not. |
void |
setStateObject(StateObject stateObject)
Sets the given
StateObject to represent the new encapsulated expression. |
void |
toggleNot()
Changes the visibility state of the
NOT identifier. |
getStateObject, hasStateObject, parseaddPropertyChangeListener, children, decorate, equals, findIdentificationVariable, getDeclaration, getDecorator, getGrammar, getManagedTypeProvider, getParent, getQueryBuilder, getRoot, getType, getType, getTypeHelper, getTypeRepository, hashCode, isDecorated, removePropertyChangeListener, setExpression, setParent, toString, toString, toTextpublic static java.lang.String NOT_PROPERTY
NOT identifier has changed.public ExistsExpressionStateObject(StateObject parent)
ExistsExpressionStateObject.parent - The parent of this state object, which cannot be nulljava.lang.NullPointerException - The given parent cannot be nullpublic ExistsExpressionStateObject(StateObject parent, boolean not, StateObject stateObject)
ExistsExpressionStateObject.parent - The parent of this state object, which cannot be nullnot - Determines whether the NOT identifier is part of the expression
or notstateObject - The StateObject representing the subqueryjava.lang.NullPointerException - The given parent cannot be nullpublic ExistsExpressionStateObject(StateObject parent, boolean not, java.lang.String jpqlFragment)
ExistsExpressionStateObject.parent - The parent of this state object, which cannot be nullnot - Determines whether the NOT identifier is part of the expression
or notjpqlFragment - The portion of the query representing the encapsulated expressionjava.lang.NullPointerException - The given parent cannot be nullpublic ExistsExpressionStateObject(StateObject parent, StateObject stateObject)
ExistsExpressionStateObject.parent - The parent of this state object, which cannot be nullstateObject - The StateObject representing the subqueryjava.lang.NullPointerException - The given parent cannot be nullpublic ExistsExpressionStateObject(StateObject parent, java.lang.String jpqlFragment)
ExistsExpressionStateObject.parent - The parent of this state object, which cannot be nulljpqlFragment - The portion of the query representing the encapsulated expressionjava.lang.NullPointerException - The given parent cannot be nullpublic void accept(StateObjectVisitor visitor)
StateObject by the given visitor.visitor - The visitor to visit this objectpublic ExistsExpressionStateObject addNot()
NOT identifier is specified.public ExistsExpression getExpression()
StateObject representation of the JPQL query
was created by parsing an existing JPQL query.getExpression in interface StateObjectgetExpression in class AbstractSingleEncapsulatedExpressionStateObjectStateObject
or null when the JPQL query is manually created (i.e. not from a string)public java.lang.String getIdentifier()
AbstractSingleEncapsulatedExpressionStateObject.getIdentifier in class AbstractEncapsulatedExpressionStateObjectpublic boolean hasNot()
NOT identifier is used or not.true if the NOT identifier is part of the expression;
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 StateObjectisEquivalent in class AbstractSingleEncapsulatedExpressionStateObjectstateObject - The StateObject to compare its content to this onetrue if both object are equivalent; false otherwisepublic void removeNot()
NOT identifier is not specified.public void setExpression(ExistsExpression 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 EXISTS
expressionpublic void setNot(boolean not)
NOT identifier should be part of the expression or not.not - true if the NOT identifier should be part of the
expression; false otherwisepublic void setStateObject(StateObject stateObject)
StateObject to represent the new encapsulated expression.stateObject - The new encapsulated StateObjectpublic void toggleNot()
NOT identifier.EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference