Package org.techbd.util
Record Class ArtifactStore.AggregatePersistence
java.lang.Object
java.lang.Record
org.techbd.util.ArtifactStore.AggregatePersistence
- All Implemented Interfaces:
ArtifactStore.PersistenceStrategy
- Enclosing class:
ArtifactStore
public static record ArtifactStore.AggregatePersistence(List<ArtifactStore.PersistenceStrategy> strategies)
extends Record
implements ArtifactStore.PersistenceStrategy
-
Field Summary
Fields inherited from interface org.techbd.util.ArtifactStore.PersistenceStrategy
REQUIRED_ARG_ARTIFACT_ID
-
Constructor Summary
ConstructorDescriptionAggregatePersistence
(List<ArtifactStore.PersistenceStrategy> strategies) Creates an instance of aAggregatePersistence
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.void
persist
(@NotNull ArtifactStore.Artifact artifact, @NotNull Optional<ArtifactStore.PersistenceReporter> reporter) Returns the value of thestrategies
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
AggregatePersistence
Creates an instance of aAggregatePersistence
record class.- Parameters:
strategies
- the value for thestrategies
record component
-
-
Method Details
-
persist
public void persist(@NotNull @NotNull ArtifactStore.Artifact artifact, @NotNull @NotNull Optional<ArtifactStore.PersistenceReporter> reporter) - Specified by:
persist
in interfaceArtifactStore.PersistenceStrategy
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
strategies
Returns the value of thestrategies
record component.- Returns:
- the value of the
strategies
record component
-