Class AbstractEntity

java.lang.Object
codes.thischwa.cf.model.AbstractEntity
All Implemented Interfaces:
ResponseEntity
Direct Known Subclasses:
BatchEntry, RecordEntity, ZoneEntity

public class AbstractEntity extends Object implements ResponseEntity
Represents a base abstract entity class for modeling domain objects with a unique identifier.

This class provides a fundamental contract for entities by implementing the ResponseEntity interface. The primary attribute of this class is the `id` field, which serves as a unique identifier for all derived entities.

Commonly extended by other entity classes to maintain a consistent entity structure across the domain models. This encourages code reusability and consistency within the system.

  • Constructor Details

    • AbstractEntity

      public AbstractEntity()
  • Method Details

    • getId

      public String getId()
      Description copied from interface: ResponseEntity
      Retrieves the unique identifier of the entity.
      Specified by:
      getId in interface ResponseEntity
      Returns:
      the unique identifier as a String
    • setId

      public void setId(String id)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object