Module org.itsallcode.jdbc
Record Class SimpleMetaData
java.lang.Object
java.lang.Record
org.itsallcode.jdbc.resultset.generic.SimpleMetaData
- Record Components:
columns- all column metadata for the result set
A wrapper for
ResultSetMetaData to simplify usage.-
Constructor Summary
ConstructorsConstructorDescriptionSimpleMetaData(List<ColumnMetaData> columns) Creates an instance of aSimpleMetaDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptioncolumns()Returns the value of thecolumnsrecord component.static SimpleMetaDataCreate a newSimpleMetaDatafor a givenResultSet.final booleanIndicates whether some other object is "equal to" this one.getColumnByIndex(int index) Get column metadata for a given index (one based).final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SimpleMetaData
Creates an instance of aSimpleMetaDatarecord class.- Parameters:
columns- the value for thecolumnsrecord component
-
-
Method Details
-
create
Create a newSimpleMetaDatafor a givenResultSet.- Parameters:
resultSet- the result set- Returns:
- simple metadata
-
getColumnByIndex
Get column metadata for a given index (one based).- Parameters:
index- column index (one based)- Returns:
- column metadata
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
columns
Returns the value of thecolumnsrecord component.- Returns:
- the value of the
columnsrecord component
-