Class UpdateItem

  • All Implemented Interfaces:
    Expression

    public final class UpdateItem
    extends AbstractExpression
    The new_value specified for an update operation must be compatible in type with the field to which it is assigned.
    BNF: update_item ::= [identification_variable.]{state_field | single_valued_association_field} = new_value

    Since:
    2.3
    Version:
    2.5
    Author:
    Pascal Filion
    See Also:
    UpdateClause
    • Constructor Detail

      • UpdateItem

        public UpdateItem​(AbstractExpression parent)
        Creates a new UpdateItem.
        Parameters:
        parent - The parent of this expression
    • Method Detail

      • getNewValue

        public Expression getNewValue()
        Returns the Expression representing the new value, which is the new value of the property.
        Returns:
        The expression for the new value
      • getStateFieldPathExpression

        public Expression getStateFieldPathExpression()
        Returns the Expression representing the state field path expression, which is the property that should get updated.
        Returns:
        The expression for the state field path expression
      • hasEqualSign

        public boolean hasEqualSign()
        Determines whether the equal sign was parsed or not.
        Returns:
        true if the equal sign was parsed; false otherwise
      • hasNewValue

        public boolean hasNewValue()
        Determines whether the new value section of the query was parsed.
        Returns:
        true the new value was parsed; false if nothing was parsed
      • hasSpaceAfterEqualSign

        public boolean hasSpaceAfterEqualSign()
        Determines whether a whitespace was parsed after the equal sign or not.
        Returns:
        true if there was a whitespace after the equal sign; false otherwise
      • hasSpaceAfterStateFieldPathExpression

        public boolean hasSpaceAfterStateFieldPathExpression()
        Determines whether a whitespace was parsed after the state field path expression not.
        Returns:
        true if there was a whitespace after the state field path expression; false otherwise
      • hasStateFieldPathExpression

        public boolean hasStateFieldPathExpression()
        Determines whether the state field was parsed.
        Returns:
        true the state field was parsed; false otherwise