Class LocateExpressionStateObject

  • All Implemented Interfaces:
    StateObject

    public class LocateExpressionStateObject
    extends AbstractTripleEncapsulatedExpressionStateObject
    The LOCATE function returns the position of a given string within a string, starting the search at a specified position. It returns the first position at which the string was found as an integer. The first argument is the string to be located; the second argument is the string to be searched; the optional third argument is an integer that represents the string position at which the search is started (by default, the beginning of the string to be searched). The first position in a string is denoted by 1. If the string is not found, 0 is returned.
    BNF: expression ::= LOCATE(string_primary, string_primary [, simple_arithmetic_expression])

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

      • LocateExpressionStateObject

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

        public LocateExpressionStateObject​(StateObject parent,
                                           StateObject firstStateObject,
                                           StateObject secondStateObject)
        Creates a new LocateExpressionStateObject.
        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
      • LocateExpressionStateObject

        public LocateExpressionStateObject​(StateObject parent,
                                           StateObject firstStateObject,
                                           StateObject secondStateObject,
                                           StateObject thirdStateObject)
        Creates a new LocateExpressionStateObject.
        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
      • LocateExpressionStateObject

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

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