Interface MutableEntity

All Superinterfaces:
Entity, HasDateRange, HasId, HasMutableDateRange, HasMutableId, HasMutableName, HasMutableText, HasName, HasOid, HasText
All Known Subinterfaces:
MutableEntityExtended
All Known Implementing Classes:
MutableEntityExtendedImp

public interface MutableEntity extends Entity, HasMutableId, HasMutableName, HasMutableText, HasMutableDateRange
The named interface defines a powerful abstraction for entities of a domain model. The features are:
oid
An internal identifier owned by the domain. The internal identifier should never visible to external systems or users.
The internal identifier should be set during construction through the new operator and never changed again.
id
An external identifier used to identify the entity inside and outside the domain. The external identifier should be set during construction. A good approach would be a factory method. The ownership fo the external identifier could be an external system.
name
A human readable name used to identify the entity when humans are involved. The uniqueness of the name is not required or guaranteed.
  • text
    a human readable documentation of the instance. We recommend using markdown syntax for the text.
    • Method Details

      • validate

        default boolean validate()
        Check if the entity is consistent based on the field values and business rules.
        Specified by:
        validate in interface Entity
        Returns:
        true if the entity is consistent otherwise false