Click or drag to resize

MasterConstraintTMaster, TDetail Class

Validates master attribute, which is in master-detail (or parent/child) relationship with another attribute.
Inheritance Hierarchy
SystemObject
  Aloe.SystemFrameworks.Domain.BusinessLogicBusinessRule
    Aloe.SystemFrameworks.Domain.ValidationConstraintTMaster
      Aloe.SystemFrameworks.Domain.ValidationValidationConstraintTMaster
        Aloe.SystemFrameworks.Domain.ValidationMasterConstraintTMaster, TDetail

Namespace:  Aloe.SystemFrameworks.Domain.Validation
Assembly:  Aloe.SystemFrameworks.Domain (in Aloe.SystemFrameworks.Domain.dll) Version: 20.1.3.5
Syntax
public class MasterConstraint<TMaster, TDetail> : ValidationConstraint<TMaster>
where TMaster : EntityObject
where TDetail : EditableDomainObject

Type Parameters

TMaster
The type of the master entities.
TDetail
The type of the detail entities.

The MasterConstraintTMaster, TDetail type exposes the following members.

Constructors
  NameDescription
Public methodMasterConstraintTMaster, TDetail
Initializes a new instance of the MasterConstraintTMaster, TDetail class.
Top
Properties
  NameDescription
Public propertyAttribute
The data attribute for which the constraint is defined or null if the constraint is not for specific attribute.
(Inherited from ConstraintTObject.)
Public propertyCode
Gets the unique rule code.
(Inherited from BusinessRule.)
Public propertyData
Gets the master detail constraint data.
Public propertyDefaultExecutionPriority
Gets the default execution priority of the rule. It is used when priority is not specified when registering the rule for events.
(Inherited from ConstraintTObject.)
Public propertyExecuteForDeletedObject
Gets a value indicating whether to execute the rule for deleted object. The default is false. Inheritors can override it.
(Inherited from BusinessRule.)
Public propertyGetAttribute
Gets the function that returns the attribute of the constraint. The attribute is specified for constraints, which constrain a specific attribute.
(Inherited from ConstraintTObject.)
Public propertyGetMessage
Gets the message getter function. The function is called to create and format a message in case of constraint violation.
(Inherited from ValidationConstraintTObject.)
Public propertyIsActivated
Gets a value indicating whether this constraint has already been activated.
(Inherited from ConstraintTObject.)
Public propertyLocalizedName
Gets the localized name of the constraint.
(Overrides BusinessRuleLocalizedName.)
Public propertyName
Gets the constraint name.
(Overrides BusinessRuleName.)
Top
Methods
Remarks

The master-detail relationship has the following properties:

  • The master attribute is in entity type, which is master to the entity type of the detail attribute.
  • The master and the detail attributes are of the same type.
  • The master attribute is nullable, the detail attribute is not nullable.
  • The master attribute has value only when all detail values have the same value (or there are not detail entities).
  • Changing the master attribute changes all detail values to the same value.
  • Changing a detail values, so that there are now different detail values leads to setting NULL in the master.

See Also