All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.enodeframework.domain.IAggregateRoot Maven / Gradle / Ivy

There is a newer version: 1.1.10
Show newest version
package org.enodeframework.domain;

import org.enodeframework.eventing.DomainEventStream;
import org.enodeframework.eventing.IDomainEvent;

import java.util.List;

/**
 * Represents an aggregate root.
 */
public interface IAggregateRoot {
    /**
     * Represents the unique id of the aggregate root.
     */
    String getUniqueId();

    /**
     * Represents the current version of the aggregate root.
     */
    int getVersion();

    /**
     * Get all the changes of the aggregate root.
     */
    List> getChanges();

    /**
     * Accept changes of the aggregate root.
     */
    void acceptChanges();

    /**
     * Replay the given event streams.
     */
    void replayEvents(List eventStreams);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy