Top Description Fields Constructors Methods
org.eclipse.persistence.jpa.jpql.tools.model.query

public Class WhereClauseStateObject

extends AbstractConditionalClauseStateObject
Class Inheritance
Imports
org.eclipse.persistence.jpa.jpql.parser.WhereClause

The WHERE clause of a query consists of a conditional expression used to select objects or values that satisfy the expression. The WHERE clause restricts the result of a select statement or the scope of an update or delete operation.

BNF: where_clause ::= WHERE conditional_expression

Author
Pascal Filion
Since
2.4
Version
2.4
See Also
WhereClause

Field Summary

Inherited from org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractConditionalClauseStateObject:
CONDITIONAL_STATE_OBJECT_PROPERTY

Constructor Summary

AccessConstructor and Description
public
WhereClauseStateObject(AbstractModifyStatementStateObject
The parent of this state object, which cannot be null
parent
)

Creates a new WhereClauseStateObject.

public
WhereClauseStateObject(AbstractSelectStatementStateObject
The parent of this state object, which cannot be null
parent
)

Creates a new WhereClauseStateObject.

Method Summary

Modifier and TypeMethod and Description
public void
public WhereClause
getExpression()

Overrides org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject.getExpression.

Implements org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject.getExpression.

Returns the actual parsed object if this StateObject representation of the JPQL query was created by parsing an existing JPQL query.
public String
public void
setExpression(WhereClause
The parsed object representing a Where clause
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.

Inherited from org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractConditionalClauseStateObject:
addChildrenandParsegetBuildergetConditionalhasConditionalisEquivalentorParseparsesetConditionalshouldEncapsulateORExpressiontoTextInternal

Constructor Detail

WhereClauseStateObjectback to summary
public WhereClauseStateObject(AbstractModifyStatementStateObject parent)

Creates a new WhereClauseStateObject.

Parameters
parent:AbstractModifyStatementStateObject

The parent of this state object, which cannot be null

Exceptions
NullPointerException:
The given parent cannot be null
WhereClauseStateObjectback to summary
public WhereClauseStateObject(AbstractSelectStatementStateObject parent)

Creates a new WhereClauseStateObject.

Parameters
parent:AbstractSelectStatementStateObject

The parent of this state object, which cannot be null

Exceptions
NullPointerException:
The given parent cannot be null

Method Detail

acceptback to summary
public void accept(StateObjectVisitor visitor)

Implements org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject.accept.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject.accept.

Visits this StateObject by the given visitor.

Parameters
visitor:StateObjectVisitor

The visitor to visit this object

Annotations
@Override
getExpressionback to summary
public WhereClause getExpression()

Overrides org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject.getExpression.

Implements org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject.getExpression.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject.getExpression.

Returns the actual parsed object if this StateObject representation of the JPQL query was created by parsing an existing JPQL query.

Returns:WhereClause

The parsed object when a JPQL query is parsed and converted into a StateObject or null when the JPQL query is manually created (i.e. not from a string)

Annotations
@Override
getIdentifierback to summary
public String getIdentifier()

Implements abstract org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractConditionalClauseStateObject.getIdentifier.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractConditionalClauseStateObject.getIdentifier.

Returns the JPQL identifier of this clause.

Returns:String

The JPQL identifier of this conditional clause

Annotations
@Override
setExpressionback to summary
public void setExpression(WhereClause 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.

Parameters
expression:WhereClause

The parsed object representing a Where clause