Class RevisionSnapshotFilter.Builder
java.lang.Object
org.axonframework.eventsourcing.snapshotting.RevisionSnapshotFilter.Builder
- Enclosing class:
RevisionSnapshotFilter
Builder class to instantiate a
RevisionSnapshotFilter.
The type and revision are hard requirements and as such should be provided.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Initializes aRevisionSnapshotFilteras specified through this Builder.Sets an aggregaterevisionthisSnapshotFilterwill allow.Sets the aggregatetypethisSnapshotFilterwill allow using the outcome ofClass.getName()on the giventype.Sets the aggregatetypethisSnapshotFilterwill allow.protected voidvalidate()Validate whether the fields contained in this Builder as set accordingly.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
type
Sets the aggregatetypethisSnapshotFilterwill allow using the outcome ofClass.getName()on the giventype. Note that if thetypedoes not match theDomainEventData.getType(), the filter will returntrueas per theSnapshotFilterdocumentation.- Parameters:
type- defines aggregate type thisSnapshotFilterallows- Returns:
- the current Builder instance, for fluent interfacing
-
type
Sets the aggregatetypethisSnapshotFilterwill allow. Note that if thetypedoes not match theDomainEventData.getType(), the filter will returntrueas per theSnapshotFilterdocumentation.- Parameters:
type- defines aggregate type thisSnapshotFilterallows- Returns:
- the current Builder instance, for fluent interfacing
-
revision
Sets an aggregaterevisionthisSnapshotFilterwill allow.- Parameters:
revision- the aggregate- Returns:
- the current Builder instance, for fluent interfacing
-
build
Initializes aRevisionSnapshotFilteras specified through this Builder.- Returns:
- a
RevisionSnapshotFilteras specified through this Builder
-
validate
protected void validate()Validate whether the fields contained in this Builder as set accordingly.- Throws:
AxonConfigurationException- if one field is asserted to be incorrect according to the Builder's specifications
-