Package com.orchestranetworks.instance

# Interface ValueContextForValidationOnRecord

public interface ValueContextForValidationOnRecord
This interface represents a validation context for a record, in the scope of a constraint on table that performs checks at the record-level.

See Also:
  - `ConstraintOnTableWithRecordLevelCheck.checkRecord(ValueContextForValidationOnRecord)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addMessage(UserMessage aMessage)`
  Adds the specified validation message to the current validation context.
  `void`
  `addMessage(SchemaNode aNode, UserMessage aMessage)`
  Adds the specified validation message concerning a node in the current record.
  `ValueContext`
  `getRecord()`
  Returns the record currently being created or modified.
  `AdaptationTable`
  `getTable()`
  Returns the table that contains the record currently being created or modified.
  `boolean`
  `isCheckOnUserInput()`
  Returns `true` if the associated constraint validates the value at user input.
  `boolean`
  `isRecordCreation()`
  Returns `true` if the current record is being created.
  `void`
  `removeRecordFromMessages(ValueContext aRecord)`
  Deprecated.

- ## Method Details

  - ### getTable

    AdaptationTable getTable()
    Returns the table that contains the record currently being created or modified.

  - ### getRecord

    ValueContext getRecord()
    Returns the record currently being created or modified. It contains the values as they are entered by the end user in the user interface. New values are not yet persisted.

  - ### addMessage

    void addMessage(SchemaNode aNode, UserMessage aMessage)
    Adds the specified validation message concerning a node in the current record. This method is equivalent to `ValueContextForValidationOnTable.addMessage(Adaptation, SchemaNode, UserMessage)`.
    Throws:
      `IllegalArgumentException` - if the specified message is `null`.
      `IllegalArgumentException` - if the specified node is `null`.
      `IllegalArgumentException` - if the specified node is not consistent with the current context. That is, specified node must be in the same record that is currently being created or modified.
    See Also:
      - `addMessage(UserMessage)`

  - ### addMessage

    void addMessage(UserMessage aMessage)
    Adds the specified validation message to the current validation context. This method is equivalent to `ValueContextForValidationOnTable.addMessage(Adaptation, UserMessage)`.
    Throws:
      `IllegalArgumentException` - if the specified message is `null`.
    See Also:
      - `addMessage(SchemaNode, UserMessage)`

  - ### removeRecordFromMessages

    @Deprecated void removeRecordFromMessages(ValueContext aRecord)
    Deprecated.
    Validating a record does not modify the persisted validation report. Therefore this method has no effect.

  - ### isCheckOnUserInput

    boolean isCheckOnUserInput()
    Returns `true` if the associated constraint validates the value at user input.
    Since:
      5.4.1
    See Also:
      - `ConstraintOnTableWithRecordLevelCheck.checkRecord(ValueContextForValidationOnRecord)`

  - ### isRecordCreation

    boolean isRecordCreation()
    Returns `true` if the current record is being created.
    Since:
      6.1.0
    See Also:
      - `ConstraintOnTableWithRecordLevelCheck.checkRecord(ValueContextForValidationOnRecord)`