Record Class PrimaryKey
java.lang.Object
java.lang.Record
io.bloviate.db.PrimaryKey
- Record Components:
tableName- the name of the table containing this primary keykeyColumns- the ordered list of columns that comprise this primary key
The primary key of a database table — the column or columns that uniquely identify each row.
A primary key may be simple (one column) or composite (several), so it carries an ordered list
of KeyColumns whose sequence positions preserve the declared key order. The fill engine
uses this both to recognize key columns when choosing generators and as the reference target that
ForeignKeys point at.
- Since:
- 1.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionPrimaryKey(String tableName, List<KeyColumn> keyColumns) Creates an instance of aPrimaryKeyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thekeyColumnsrecord component.Returns the value of thetableNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PrimaryKey
Creates an instance of aPrimaryKeyrecord class.- Parameters:
tableName- the value for thetableNamerecord componentkeyColumns- the value for thekeyColumnsrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
tableName
-
keyColumns
Returns the value of thekeyColumnsrecord component.- Returns:
- the value of the
keyColumnsrecord component
-