Package org.techbd.util
Record Class ArtifactStore.DiagnosticPersistence
java.lang.Object
java.lang.Record
org.techbd.util.ArtifactStore.DiagnosticPersistence
- All Implemented Interfaces:
ArtifactStore.PersistenceStrategy
- Enclosing class:
ArtifactStore
public static record ArtifactStore.DiagnosticPersistence(String identifier)
extends Record
implements ArtifactStore.PersistenceStrategy
-
Field Summary
Fields inherited from interface org.techbd.util.ArtifactStore.PersistenceStrategy
REQUIRED_ARG_ARTIFACT_ID
-
Constructor Summary
ConstructorDescriptionDiagnosticPersistence
(String identifier) Creates an instance of aDiagnosticPersistence
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.Returns the value of theidentifier
record component.void
persist
(@NotNull ArtifactStore.Artifact artifact, @NotNull Optional<ArtifactStore.PersistenceReporter> reporter) final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
DiagnosticPersistence
public DiagnosticPersistence() -
DiagnosticPersistence
Creates an instance of aDiagnosticPersistence
record class.- Parameters:
identifier
- the value for theidentifier
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)
. -
identifier
Returns the value of theidentifier
record component.- Returns:
- the value of the
identifier
record component
-