Record Class EventCopyExtension.SourceId
java.lang.Object
java.lang.Record
ch.tocco.nice2.optional.event.api.eventcopy.EventCopyExtension.SourceId
- All Implemented Interfaces:
Comparable<String>
- Enclosing interface:
EventCopyExtension
public static record EventCopyExtension.SourceId(String model, PrimaryKey key)
extends Record
implements Comparable<String>
-
Constructor Summary
ConstructorDescriptionSourceId
(String model, PrimaryKey key) Creates an instance of aSourceId
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
final boolean
Indicates whether some other object is "equal to" this one.static EventCopyExtension.SourceId
fromEntity
(Entity entity) final int
hashCode()
Returns a hash code value for this object.key()
Returns the value of thekey
record component.model()
Returns the value of themodel
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
SourceId
Creates an instance of aSourceId
record class.- Parameters:
model
- the value for themodel
record componentkey
- the value for thekey
record component
-
-
Method Details
-
fromEntity
-
compareTo
- Specified by:
compareTo
in interfaceComparable<String>
-
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)
. -
model
Returns the value of themodel
record component.- Returns:
- the value of the
model
record component
-
key
Returns the value of thekey
record component.- Returns:
- the value of the
key
record component
-