Package org.techbd.util
Record Class ArtifactStore.InvalidPersistenceStrategy
java.lang.Object
java.lang.Record
org.techbd.util.ArtifactStore.InvalidPersistenceStrategy
- All Implemented Interfaces:
ArtifactStore.PersistenceStrategy
- Enclosing class:
ArtifactStore
public static record ArtifactStore.InvalidPersistenceStrategy(String strategyJson, Exception error)
extends Record
implements ArtifactStore.PersistenceStrategy
-
Field Summary
Fields inherited from interface org.techbd.util.ArtifactStore.PersistenceStrategy
REQUIRED_ARG_ARTIFACT_ID
-
Constructor Summary
ConstructorDescriptionInvalidPersistenceStrategy
(String strategyJson, Exception error) Creates an instance of aInvalidPersistenceStrategy
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.error()
Returns the value of theerror
record component.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 thestrategyJson
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
InvalidPersistenceStrategy
Creates an instance of aInvalidPersistenceStrategy
record class.- Parameters:
strategyJson
- the value for thestrategyJson
record componenterror
- the value for theerror
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)
. -
strategyJson
Returns the value of thestrategyJson
record component.- Returns:
- the value of the
strategyJson
record component
-
error
Returns the value of theerror
record component.- Returns:
- the value of the
error
record component
-