java.lang.Object
java.lang.Record
org.itsallcode.jdbc.resultset.generic.Row
- Record Components:
rowIndex
- row index (zero based)columns
- column metadatacolumnValues
- values for each column
public record Row(int rowIndex, List<ColumnMetaData> columns, List<ColumnValue> columnValues)
extends Record
Represents a generic row from a result set.
-
Constructor Summary
ConstructorsConstructorDescriptionRow
(int rowIndex, List<ColumnMetaData> columns, List<ColumnValue> columnValues) Creates an instance of aRow
record class. -
Method Summary
Modifier and TypeMethodDescriptioncolumns()
Returns the value of thecolumns
record component.Returns the value of thecolumnValues
record component.final boolean
Indicates whether some other object is "equal to" this one.get
(int columnIndex) Get the value at a given column index (zero based).<T> T
Get the value at a given column index (zero based) converted to the given type.final int
hashCode()
Returns a hash code value for this object.int
rowIndex()
Returns the value of therowIndex
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Row
Creates an instance of aRow
record class.- Parameters:
rowIndex
- the value for therowIndex
record componentcolumns
- the value for thecolumns
record componentcolumnValues
- the value for thecolumnValues
record component
-
-
Method Details
-
get
Get the value at a given column index (zero based).- Parameters:
columnIndex
- column index (zero based)- Returns:
- column value
-
get
Get the value at a given column index (zero based) converted to the given type.- Type Parameters:
T
- expected type- Parameters:
columnIndex
- column index (zero based)type
- expected type- Returns:
- column value
-
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
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
rowIndex
Returns the value of therowIndex
record component.- Returns:
- the value of the
rowIndex
record component
-
columns
Returns the value of thecolumns
record component.- Returns:
- the value of the
columns
record component
-
columnValues
Returns the value of thecolumnValues
record component.- Returns:
- the value of the
columnValues
record component
-