public abstract class SuperEntity<ID extends Serializable> extends Object implements Serializable, Identifiable<ID>, HumanReadable
| Modifier | Constructor and Description |
|---|---|
protected |
SuperEntity()
Creates new entity with
null identifier. |
protected |
SuperEntity(ID id)
Creates new entity.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Two entities are equal if their ID is equal.
|
ID |
getId()
Get unique ID of the entity.
|
int |
hashCode() |
boolean |
isNew()
Return true if entity is new otherwise false.
|
void |
setId(ID id)
Sets unique identifier of the entity.
|
String |
toHumanString()
Returns human readable entity identification with start and end round brackets.
|
String |
toString() |
protected SuperEntity(@Nullable ID id)
id - The unique identifierprotected SuperEntity()
null identifier.public void setId(@Nullable ID id)
IdentifiablesetId in interface Identifiable<ID extends Serializable>id - unique identifier@Nullable public ID getId()
getId in interface Identifiable<ID extends Serializable>public boolean isNew()
public String toHumanString()
HumanReadabletoHumanString in interface HumanReadableCopyright © 2018 Pivotal Software, Inc.. All rights reserved.