org.qi4j.library.eventsourcing.domain.api

## Class DomainEvents

- java.lang.Object
- - org.qi4j.library.eventsourcing.domain.api.DomainEvents

-     public class DomainEvents
      extends Object

  This gives access to the current domain event. This is only usable within methods marked with @DomainEvent annotation.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DomainEvents()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static DomainEventValue` | `currentEvent()`
    `static void` | `setCurrentEvent(DomainEventValue currentEvent)` This is called by the EventSourcing library, either during creation or replay.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DomainEvents

          public DomainEvents()

  - ### Method Detail

    - #### currentEvent

          public static DomainEventValue currentEvent()

    - #### setCurrentEvent

          public static void setCurrentEvent(DomainEventValue currentEvent)

      This is called by the EventSourcing library, either during creation or replay. Don't use in application code.
      Parameters:
        `currentEvent` - new current event