Package com.orchestranetworks.schema

# Interface ConstraintOnTableWithRecordLevelCheck

All Superinterfaces:
  `ConstraintOnTable`, `JavaBeanVersion`

public interface ConstraintOnTableWithRecordLevelCheck extends ConstraintOnTable
Defines a record-level check, to be performed in addition to table-level checks.

### Life cycle

In the addition to the life cycle of `ConstraintOnTable`, in the operational phase, the method `checkRecord(ValueContextForValidationOnRecord)` is called each time a record is modified through the user interface or by a programmatic process. This is to detect possible errors created by the record modifications.

See Also:
  - `ConstraintOnTable`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `checkRecord(ValueContextForValidationOnRecord aContext)`
  Provides the opportunity to perform custom validation concerning a specific record in the context of a record creation or modification through the user interface or by a programmatic procedure.

  ### Methods inherited from interface com.orchestranetworks.schema.ConstraintOnTable

  `checkTable, setup, toUserDocumentation`

  ### Methods inherited from interface com.orchestranetworks.schema.JavaBeanVersion

  `getBeanVersion`

- ## Method Details

  - ### checkRecord

    void checkRecord(ValueContextForValidationOnRecord aContext)
    Provides the opportunity to perform custom validation concerning a specific record in the context of a record creation or modification through the user interface or by a programmatic procedure.

    It typically does so by retrieving the new values from the incoming `record context` and checking them. If new values have errors, error messages can be added to the specified context, so that they will be included in the validation report for the specified record and displayed in the user interface.

    This method should be used for performing the same checks as the ones performed at table level by the method `ConstraintOnTable.checkTable(ValueContextForValidationOnTable)` but at record level.

    With respect to the dependencies that may be defined in the method `ConstraintOnTable.setup(ConstraintContextOnTable)`, this method is called if the values of the dependencies are updated. If no dependencies are declared, the constraint is considered as unknown and this method is always called upon user input, or globally when modifying a record.

    See Also:
      - `ConstraintOnTable.checkTable(ValueContextForValidationOnTable)`