Package org.salespointframework.core
Class AbstractEntity<ID extends org.jmolecules.ddd.types.Identifier>
java.lang.Object
org.salespointframework.core.AbstractEntity<ID>
- All Implemented Interfaces:
Persistable<ID>
- Direct Known Subclasses:
AbstractAggregateRoot
,AccountancyEntry
,ChargeLine
,OrderLine
@MappedSuperclass
public abstract class AbstractEntity<ID extends org.jmolecules.ddd.types.Identifier>
extends Object
implements Persistable<ID>
Base class for Salespoint entities to uniquely define
equals(Object)
and hashCode()
.- Author:
- Oliver Gierke
-
Constructor Details
-
AbstractEntity
public AbstractEntity()
-
-
Method Details
-
hasId
Returns whether the entity has the given identifier.- Parameters:
id
- must not be null.- Returns:
-
isNew
public boolean isNew()- Specified by:
isNew
in interfacePersistable<ID extends org.jmolecules.ddd.types.Identifier>
-
equals
-
hashCode
public int hashCode()
-