Class TrimExpressionStateObject

  • All Implemented Interfaces:
    StateObject

    public class TrimExpressionStateObject
    extends AbstractSingleEncapsulatedExpressionStateObject
    The TRIM function trims the specified character from a string. If the character to be trimmed is not specified, it is assumed to be space (or blank). The optional trim_character is a single-character string literal or a character-valued input parameter (i.e., char or Character). If a trim specification is not provided, BOTH is assumed. The TRIM function returns the trimmed string.
    BNF: expression ::= TRIM([[trim_specification] [trim_character] FROM] string_primary)

    Since:
    2.4
    Version:
    2.5
    Author:
    Pascal Filion
    See Also:
    TrimExpression
    • Field Detail

      • HAS_FROM_PROPERTY

        public static final String HAS_FROM_PROPERTY
        Notifies the visibility of the FROM identifier has changed.
        See Also:
        Constant Field Values
      • SPECIFICATION_PROPERTY

        public static final String SPECIFICATION_PROPERTY
        Notifies the specification property has changed.
        See Also:
        Constant Field Values
      • TRIM_CHARACTER_PROPERTY

        public static final String TRIM_CHARACTER_PROPERTY
        Notify the state object representing the trim character has changed.
        See Also:
        Constant Field Values
    • Constructor Detail

      • TrimExpressionStateObject

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

        public TrimExpressionStateObject​(StateObject parent,
                                         TrimExpression.Specification specification,
                                         StateObject trimCharacter,
                                         StateObject stateObject)
        Creates a new TrimExpressionStateObject.
        Parameters:
        parent - The parent of this state object, which cannot be null
        specification - Defines the way the string is trimmed, or Specification.DEFAULT when it is not present
        trimCharacter - The trim character
        stateObject - The StateObject representing the encapsulated expression
        Throws:
        NullPointerException - The given parent cannot be null
      • TrimExpressionStateObject

        public TrimExpressionStateObject​(StateObject parent,
                                         String jpqlFragment)
        Creates a new TrimExpressionStateObject.
        Parameters:
        parent - The parent of this state object, which cannot be null
        jpqlFragment - The portion of the query representing the encapsulated expression
        Throws:
        NullPointerException - The given parent cannot be null