ID - The type of the entityId of the Entity.public abstract class BaseEntity<ID> extends Object implements Entity<ID>
equals() method based on the entity identity. This also enforce
the entity to valid, i.e. not null. Otherwise a SeedException will be thrown.| Constructor and Description |
|---|
BaseEntity() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other)
Computes the equality on the entity identity returned by
getEntityId(). |
abstract ID |
getEntityId()
Gets the entity id.
|
int |
hashCode()
Computes the hash code on the entity identity returned by
getEntityId(). |
String |
toString() |
public abstract ID getEntityId()
EntitygetEntityId in interface Entity<ID>public int hashCode()
getEntityId(). This method can be overridden
but be sure to respect the equality semantics for entities.
when doing so.public boolean equals(Object other)
getEntityId(). This method can be overridden
but be sure to respect the equality semantics for entities.Copyright © 2013-2016–2016 SeedStack. All rights reserved.