Class BaseEntity

java.lang.Object
com.github.collinalpert.java2db.entities.BaseEntity
Direct Known Subclasses:
BaseCodeAndDescriptionEntity, BaseDeletableEntity, SerializableBaseEntity

public class BaseEntity
extends Object
Describes an entity that has an id. Every entity must inherit from this class.
Author:
Collin Alpert
  • Constructor Details

  • Method Details

    • getId

      public int getId()
    • setId

      @Deprecated public void setId​(int id)
      Deprecated.
      This setter only exists for frameworks like@ Spring, where a form needs to set this id. It is greatly discouraged from using this setter directly and it's effects will not be considered with any of the CRUD operations.
      Parameters:
      id - The id of the entity.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object