Interface Entity

All Superinterfaces:
HasDateRange, HasId, HasName, HasOid, HasText
All Known Subinterfaces:
EntityExtended, MutableEntity, MutableEntityExtended
All Known Implementing Classes:
EntityExtendedImp, MutableEntityExtendedImp

public interface Entity extends HasOid, HasId, HasName, HasText, HasDateRange
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.
    • Nested Class Summary

      Nested classes/interfaces inherited from interface net.tangly.core.HasDateRange

      HasDateRange.RangeFilter<T extends HasDateRange>
    • Field Summary

      Fields inherited from interface net.tangly.core.HasDateRange

      FROM, TO

      Fields inherited from interface net.tangly.core.HasId

      ID

      Fields inherited from interface net.tangly.core.HasName

      NAME

      Fields inherited from interface net.tangly.core.HasOid

      OID, UNDEFINED_OID

      Fields inherited from interface net.tangly.core.HasText

      TEXT
    • Method Summary

      Modifier and Type
      Method
      Description
      default boolean
      Checks if the entity is consistent based on the field values and business rules.

      Methods inherited from interface net.tangly.core.HasDateRange

      from, isActive, isActive, range, to

      Methods inherited from interface net.tangly.core.HasId

      id

      Methods inherited from interface net.tangly.core.HasName

      name

      Methods inherited from interface net.tangly.core.HasOid

      oid

      Methods inherited from interface net.tangly.core.HasText

      text
    • Method Details

      • validate

        default boolean validate()
        Checks if the entity is consistent based on the field values and business rules.
        Returns:
        true if the entity is consistent otherwise false