Class BaseEntity
java.lang.Object
com.github.collinalpert.java2db.entities.BaseEntity
- Direct Known Subclasses:
BaseCodeAndDescriptionEntity,BaseDeletableEntity
public class BaseEntity
extends java.lang.Object
Describes an entity that has an id. Every entity must inherit from this class.
- Author:
- Collin Alpert
-
Constructor Summary
Constructors Constructor Description BaseEntity() -
Method Summary
-
Constructor Details
-
BaseEntity
public BaseEntity()
-
-
Method Details
-
getId
public long getId() -
setId
@Deprecated public void setId(long 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 java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-