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 aRowrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncolumns()Returns the value of thecolumnsrecord component.Returns the value of thecolumnValuesrecord component.final booleanIndicates whether some other object is "equal to" this one.get(int columnIndex) Get the value at a given column index (zero based).<T> TGet the value at a given column index (zero based) converted to the given type.final inthashCode()Returns a hash code value for this object.introwIndex()Returns the value of therowIndexrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Row
Creates an instance of aRowrecord class.- Parameters:
rowIndex- the value for therowIndexrecord componentcolumns- the value for thecolumnsrecord componentcolumnValues- the value for thecolumnValuesrecord 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 therowIndexrecord component.- Returns:
- the value of the
rowIndexrecord component
-
columns
Returns the value of thecolumnsrecord component.- Returns:
- the value of the
columnsrecord component
-
columnValues
Returns the value of thecolumnValuesrecord component.- Returns:
- the value of the
columnValuesrecord component
-