Class SubstringExpression

  • All Implemented Interfaces:
    Expression

    public final class SubstringExpression
    extends AbstractTripleEncapsulatedExpression
    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])

    JPA 2.1:

    BNF ::= SUBSTRING(string_expression, arithmetic_expression [, arithmetic_expression])
    Example: UPDATE Employee e SET e.firstName = SUBSTRING('TopLink Workbench', 1, 8)

    Version:
    2.5
    Author:
    Pascal Filion
    Since:
    2.3
    • Constructor Detail

      • SubstringExpression

        public SubstringExpression​(AbstractExpression parent)
        Creates a new SubstringExpression.
        Parameters:
        parent - The parent of this expression