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

org.elder.sourcerer.Snapshot Maven / Gradle / Ivy

Go to download

An opinionated framework for implementing an CQRS architecture using event sourcing

The newest version!
package org.elder.sourcerer;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * The current state of an aggregate at some point in time.
 */
public class Snapshot {
    private final TState state;
    private final Integer streamVersion;

    @JsonCreator
    public Snapshot(
            @JsonProperty("state") final TState state,
            @JsonProperty("streamVersion") final Integer streamVersion) {
        this.state = state;
        this.streamVersion = streamVersion;
    }

    public TState getState() {
        return state;
    }

    public Integer getStreamVersion() {
        return streamVersion;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy