Record Class DefaultPersistentFlavor<T extends PersistentData>
java.lang.Object
java.lang.Record
com.inductiveautomation.ignition.gateway.storeforward.flavor.DefaultPersistentFlavor<T>
- Type Parameters:
T- a subclass ofPersistentDatathat is relevant to this flavor- Record Components:
signature- the unique signature for the flavor of persistent datadescription- a localized string providing a description of the flavorserializer- aPersistentSerializersuitable for serializing instances of typeTsystemType- an optionalSystemIdentifierif a system type is associated with this flavor
- All Implemented Interfaces:
PersistentFlavor<T>
public record DefaultPersistentFlavor<T extends PersistentData>(@NonNull String signature, @NonNull LocalizedString description, @NonNull PersistentSerializer<T extends PersistentData,?> serializer, @NonNull Optional<SystemIdentifier> systemType, @NonNull Class<T extends PersistentData> dataClass)
extends Record
implements PersistentFlavor<T>
Default implementation of
PersistentFlavor.
This record encapsulates signature, description of the persistent data flavor, a serializer to be used with the flavor, and an optional system type identifier.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultPersistentFlavor(@NonNull String signature, @NonNull LocalizedString description, @NonNull PersistentSerializer<T, ?> serializer, @NonNull Optional<SystemIdentifier> systemType, @NonNull Class<T> dataClass) Creates an instance of aDefaultPersistentFlavorrecord class.DefaultPersistentFlavor(String signature, LocalizedString description, PersistentSerializer<T, ?> serializer, SystemIdentifier systemType, Class<T> dataClass) DefaultPersistentFlavor(String signature, LocalizedString description, PersistentSerializer<T, ?> serializer, Class<T> dataClass) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedataClassrecord component.@NonNull LocalizedStringReturns the value of thedescriptionrecord component.booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NonNull PersistentSerializer<T,?> Returns the value of theserializerrecord component.@NonNull StringReturns the value of thesignaturerecord component.@NonNull Optional<SystemIdentifier>Returns the value of thesystemTyperecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
DefaultPersistentFlavor
public DefaultPersistentFlavor(String signature, LocalizedString description, PersistentSerializer<T, ?> serializer, Class<T> dataClass) -
DefaultPersistentFlavor
public DefaultPersistentFlavor(String signature, LocalizedString description, PersistentSerializer<T, ?> serializer, SystemIdentifier systemType, Class<T> dataClass) -
DefaultPersistentFlavor
public DefaultPersistentFlavor(@NonNull String signature, @NonNull LocalizedString description, @NonNull PersistentSerializer<T, ?> serializer, @NonNull Optional<SystemIdentifier> systemType, @NonNull Class<T> dataClass) Creates an instance of aDefaultPersistentFlavorrecord class.- Parameters:
signature- the value for thesignaturerecord componentdescription- the value for thedescriptionrecord componentserializer- the value for theserializerrecord componentsystemType- the value for thesystemTyperecord componentdataClass- the value for thedataClassrecord component
-
-
Method Details
-
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). -
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. -
signature
Returns the value of thesignaturerecord component.- Specified by:
signaturein interfacePersistentFlavor<T extends PersistentData>- Returns:
- the value of the
signaturerecord component
-
description
Returns the value of thedescriptionrecord component.- Specified by:
descriptionin interfacePersistentFlavor<T extends PersistentData>- Returns:
- the value of the
descriptionrecord component
-
serializer
Returns the value of theserializerrecord component.- Specified by:
serializerin interfacePersistentFlavor<T extends PersistentData>- Returns:
- the value of the
serializerrecord component
-
systemType
Returns the value of thesystemTyperecord component.- Specified by:
systemTypein interfacePersistentFlavor<T extends PersistentData>- Returns:
- the value of the
systemTyperecord component
-
dataClass
Returns the value of thedataClassrecord component.- Specified by:
dataClassin interfacePersistentFlavor<T extends PersistentData>- Returns:
- the value of the
dataClassrecord component
-