public abstract class SettableIdBasedEntity<T extends org.springframework.data.domain.Persistable<Long>> extends Object implements IdBasedEntity, org.springframework.data.domain.Persistable<Long>, EntityWithDto<T>
AcrossSequenceGenerator| Constructor and Description |
|---|
SettableIdBasedEntity() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
Two non-new entities are considered equal if they have the same id.
|
Long |
getNewEntityId()
Returns the id that will forcibly be assigned when persisting this entity.
|
int |
hashCode() |
boolean |
isNew()
Returns if the
Persistable is new or was persisted already. |
abstract void |
setId(Long id) |
void |
setNewEntityId(Long newEntityId)
Forcibly set the entity as new with the specific id.
|
T |
toDto() |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetIdpublic abstract void setId(Long id)
public final boolean isNew()
Persistable is new or was persisted already.isNew in interface org.springframework.data.domain.Persistable<Long>public void setNewEntityId(Long newEntityId)
newEntityId - id this new entity should be assigned topublic Long getNewEntityId()
IdBasedEntity.getId()public T toDto()
toDto in interface EntityWithDto<T extends org.springframework.data.domain.Persistable<Long>>public boolean equals(Object o)
Copyright © 2020. All rights reserved.