Class NullIfExpressionStateObject

  • All Implemented Interfaces:
    StateObject

    public class NullIfExpressionStateObject
    extends AbstractDoubleEncapsulatedExpressionStateObject
    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)

    Version:
    2.4
    See Also:
    NullIfExpression
    Author:
    Pascal Filion
    Since:
    2.4
    • Constructor Detail

      • NullIfExpressionStateObject

        public NullIfExpressionStateObject​(StateObject parent)
        Creates a new NullIfExpressionStateObject.
        Parameters:
        parent - The parent of this state object, which cannot be null
        Throws:
        java.lang.NullPointerException - The given parent cannot be null
      • NullIfExpressionStateObject

        public NullIfExpressionStateObject​(StateObject parent,
                                           StateObject firstStateObject,
                                           StateObject secondStateObject)
        Creates a new NullIfExpressionStateObject.
        Parameters:
        parent - The parent of this state object, which cannot be null
        firstStateObject - The StateObject representing the first expression
        secondStateObject - The StateObject representing the second expression
        Throws:
        java.lang.NullPointerException - The given parent cannot be null
      • NullIfExpressionStateObject

        public NullIfExpressionStateObject​(StateObject parent,
                                           java.lang.String firstJpqlFragment,
                                           java.lang.String secondJpqlFragment)
        Creates a new NullIfExpressionStateObject.
        Parameters:
        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 representation
        secondJpqlFragment - The string representation of the second encapsulated expression to parse and to convert into a StateObject representation
        Throws:
        java.lang.NullPointerException - The given parent cannot be null