Package net.tangly.gleam.model
Record Class TsvRelation<T>
java.lang.Object
java.lang.Record
net.tangly.gleam.model.TsvRelation<T>
- Type Parameters:
T
- class of the owned entity- Record Components:
ownerId
- identifier of the owner entity. It is stored as a foreign key in the TSV fileownedEntity
- the entity owned through the relation
Model an one to multiple relation.
-
Constructor Summary
ConstructorDescriptionTsvRelation
(long ownerId, T ownedEntity) Creates an instance of aTsvRelation
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 theownedEntity
record component.long
ownerId()
Returns the value of theownerId
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
TsvRelation
Creates an instance of aTsvRelation
record class.- Parameters:
ownerId
- the value for theownerId
record componentownedEntity
- the value for theownedEntity
record component
-
-
Method Details
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
ownerId
-
ownedEntity
Returns the value of theownedEntity
record component.- Returns:
- the value of the
ownedEntity
record component
-