NULLIF returns the first expression if the two expressions are not equal. If
the expressions are equal, NULLIF returns a null value of the type of the
first expression.
NULLIF is equivalent to a searched CASE expression in
which the two expressions are equal and the resulting expression is NULL.
Returns the same type as the first expression.
BNF: nullif_expression::= NULLIF(scalar_expression, scalar_expression)
NullIfExpression
| Access | Constructor and Description |
|---|---|
| public | NullIfExpressionStateObject(StateObject
The parent of this state object, which cannot be parent)nullCreates a new |
| public | NullIfExpressionStateObject(StateObject
The parent of this state object, which cannot be parent, StateObject nullThe firstStateObject, StateObject StateObject representing the first expressionThe secondStateObject)StateObject representing the second expressionCreates a new |
| public | NullIfExpressionStateObject(StateObject
The parent of this state object, which cannot be parent, String nullThe string representation of the first encapsulated expression to
parse and to convert into a firstJpqlFragment, String StateObject representationThe string representation of the second encapsulated expression to
parse and to convert into a secondJpqlFragment)StateObject representationCreates a new |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(StateObjectVisitor
The visitor)visitor to visit this objectImplements org. StateObject by the given visitor.
|
| public NullIfExpression | getExpression()
Implements org. StateObject representation of the JPQL query
was created by parsing an existing JPQL query.
|
| protected String | getFirstQueryBNFId()
Implements abstract org. |
| public String | getIdentifier()
Implements abstract org. AbstractSingleEncapsulatedExpressionStateObject.
|
| protected String | getSecondQueryBNFId()
Implements abstract org. |
| public void | setExpression(NullIfExpression
The expression)parsed object representing a NULLIF
expressionKeeps a reference of the |
| NullIfExpressionStateObject | back to summary |
|---|---|
| public NullIfExpressionStateObject(StateObject parent) Creates a new
| |
| NullIfExpressionStateObject | back to summary |
|---|---|
| public NullIfExpressionStateObject(StateObject parent, StateObject firstStateObject, StateObject secondStateObject) Creates a new
| |
| NullIfExpressionStateObject | back to summary |
|---|---|
| public NullIfExpressionStateObject(StateObject parent, String firstJpqlFragment, String secondJpqlFragment) Creates a new
| |
| accept | back to summary |
|---|---|
| public void accept(StateObjectVisitor visitor) Implements org. Doc from org. Visits this
| |
| getExpression | back to summary |
|---|---|
| public NullIfExpression getExpression() Implements org. Doc from org. Returns the actual parsed object if this
| |
| getFirstQueryBNFId | back to summary |
|---|---|
| protected String getFirstQueryBNFId() Implements abstract org. Returns the unique identifier of the BNF that will be used to parse a JPQL fragment as the first encapsulated expression. | |
| getIdentifier | back to summary |
|---|---|
| public String getIdentifier() Implements abstract org. Returns the JPQL identifier of the expression represented by this | |
| getSecondQueryBNFId | back to summary |
|---|---|
| protected String getSecondQueryBNFId() Implements abstract org. Returns the unique identifier of the BNF that will be used to parse a JPQL fragment as the second encapsulated expression. | |
| setExpression | back to summary |
|---|---|
| public void setExpression(NullIfExpression expression) Keeps a reference of the
| |