com.github.rahulsom.grooves.queries.QuerySupport Maven / Gradle / Ivy
package com.github.rahulsom.grooves.queries;
import com.github.rahulsom.grooves.api.AggregateType;
import com.github.rahulsom.grooves.api.events.BaseEvent;
import com.github.rahulsom.grooves.api.snapshots.Snapshot;
import com.github.rahulsom.grooves.queries.internal.BaseQuery;
import com.github.rahulsom.grooves.queries.internal.Executor;
import com.github.rahulsom.grooves.queries.internal.QueryExecutor;
/**
* Aggregate trait that simplifies computing temporal snapshots from events.
*
* @param The aggregate over which the query executes
* @param The type of the Event's id field
* @param The type of the Event
* @param The type of the Snapshot's id field
* @param The type of the Snapshot
*
* @author Rahul Somasunderam
*/
public interface QuerySupport<
AggregateIdT,
AggregateT extends AggregateType,
EventIdT,
EventT extends BaseEvent,
SnapshotIdT,
SnapshotT extends Snapshot,
QueryT extends BaseQuery
>
extends
TemporalQuerySupport,
VersionedQuerySupport {
default Executor getExecutor() {
return new QueryExecutor<>();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy