Class SubstringExpressionStateObject

  • All Implemented Interfaces:
    StateObject

    public class SubstringExpressionStateObject
    extends AbstractTripleEncapsulatedExpressionStateObject
    The second and third arguments of the SUBSTRING function denote the starting position and length of the substring to be returned. These arguments are integers. The first position of a string is denoted by 1. The SUBSTRING function returns a string.

    JPA 1.0:

    BNF ::= SUBSTRING(string_primary, simple_arithmetic_expression, simple_arithmetic_expression)

    JPA 2.0:
    BNF ::= SUBSTRING(string_primary, simple_arithmetic_expression [, simple_arithmetic_expression])

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

      • SubstringExpressionStateObject

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

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

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

        public SubstringExpressionStateObject​(StateObject parent,
                                              java.lang.String firstJpqlFragment,
                                              java.lang.String secondJpqlFragment)
        Creates a new SubstringExpressionStateObject.
        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
      • SubstringExpressionStateObject

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