Package com.totvs.tjf.core.common.domain
Class AbstractDomainEntity<K extends DomainObjectId<?>>
- java.lang.Object
-
- com.totvs.tjf.core.common.domain.AbstractEntity<K>
-
- com.totvs.tjf.core.common.domain.AbstractDomainEntity<K>
-
- Type Parameters:
K- the type of identifier entity.
- All Implemented Interfaces:
DomainObject,IdentifiableDomainObject<K>
- Direct Known Subclasses:
AbstractDomainAggregate
@MappedSuperclass public abstract class AbstractDomainEntity<K extends DomainObjectId<?>> extends AbstractEntity<K>
Basic definition of an entity.
-
-
Field Summary
-
Fields inherited from class com.totvs.tjf.core.common.domain.AbstractEntity
id
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractDomainEntity()protectedAbstractDomainEntity(K id)protectedAbstractDomainEntity(K id, List<DomainEvent> domainEvents)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidafterDomainEventPublication()Deprecated, for removal: This API element is subject to removal in a future version.As of TJF version 3, AfterDomainEventPublication will be removeEvents and will always be called.Collection<DomainEvent>getEvents()Returns all events that have been recorded for publication.protected voidregisterEvent(DomainEvent event)Record the published events when the persistence is performed.voidremoveEvents()-
Methods inherited from class com.totvs.tjf.core.common.domain.AbstractEntity
equals, getId, hashCode
-
-
-
-
Constructor Detail
-
AbstractDomainEntity
protected AbstractDomainEntity()
-
AbstractDomainEntity
protected AbstractDomainEntity(K id, List<DomainEvent> domainEvents)
-
AbstractDomainEntity
protected AbstractDomainEntity(K id)
-
-
Method Detail
-
registerEvent
protected void registerEvent(@NonNull DomainEvent event)Record the published events when the persistence is performed.- Parameters:
event- the event to be logged.
-
afterDomainEventPublication
@Deprecated(forRemoval=true, since="2.30") public void afterDomainEventPublication()
Deprecated, for removal: This API element is subject to removal in a future version.As of TJF version 3, AfterDomainEventPublication will be removeEvents and will always be called.Function called by the persistence framework to delete events that have been registered and have already been published.
-
removeEvents
public void removeEvents()
-
getEvents
public Collection<DomainEvent> getEvents()
Returns all events that have been recorded for publication.
-
-