com.github.rahulsom.grooves.api.snapshots.Join Maven / Gradle / Ivy
package com.github.rahulsom.grooves.api.snapshots;
import com.github.rahulsom.grooves.api.AggregateType;
import com.github.rahulsom.grooves.api.events.BaseEvent;
/**
* A special kind of {@link Snapshot} that stores information about joined entities.
*
* @param The Aggregate this join represents
* @param The type for the join's {@link #getId()} field
* @param The type for the other aggregate that {@link AggregateT} joins to
* @param The type for the {@link EventT}'s id field
* @param The base type for events that apply to {@link AggregateT}
*
* @author Rahul Somasunderam
*/
public interface Join<
AggregateT extends AggregateType, JoinIdT, JoinedAggregateIdT, EventIdT,
EventT extends BaseEvent>
extends
TemporalJoin,
VersionedJoin,
Snapshot {
@Override
default void setLastEvent(EventT aidBaseEvent) {
this.setLastEventTimestamp(aidBaseEvent.getTimestamp());
this.setLastEventPosition(aidBaseEvent.getPosition());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy