Class AbstractDomainEntity<K extends DomainObjectId<?>>

    • 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.