java.lang.Object
java.lang.Record
org.itsallcode.jdbc.metadata.ColumnMetaData
- Record Components:
tableCatalog
- table catalog (may benull
)tableSchema
- table schema (may benull
)tableName
- table namecolumnName
- column namedataType
- SQL typetypeName
- Data source dependent type name, for a UDT the type name is fully qualifiedcolumnSize
- column size.decimalDigits
- the number of fractional digits.null
is returned for data types where DECIMAL_DIGITS is not applicable.numPrecisionRadix
- Radix (typically either 10 or 2)nullable
- isNULL
allowed.remarks
- comment describing column (may benull
)columnDef
- default value for the column, which should be interpreted as a string when the value is enclosed in single quotes (may benull
)charOctetLength
- for char types the maximum number of bytes in the columnordinalPosition
- index of column in table (starting at 1)isNullable
- ISO rules are used to determine the nullability for a column.scopeCatalog
- catalog of table that is the scope of a reference attribute (null
if DATA_TYPE isn't REF)scopeSchema
- schema of table that is the scope of a reference attribute (null
if the DATA_TYPE isn't REF)scopeTable
- table name that this the scope of a reference attribute (null
if the DATA_TYPE isn't REF)sourceDataType
- source type of a distinct type or user-generated Ref type, SQL type from java.sql.Types (null
if DATA_TYPE isn't DISTINCT or user-generated REF)isAutoIncrement
- Indicates whether this column is auto incrementedisGeneratedColumn
- Indicates whether this is a generated column
public record ColumnMetaData(String tableCatalog, String tableSchema, String tableName, String columnName, JDBCType dataType, String typeName, int columnSize, int decimalDigits, int numPrecisionRadix, ColumnMetaData.Nullability nullable, String remarks, String columnDef, int charOctetLength, int ordinalPosition, ColumnMetaData.ISONullability isNullable, String scopeCatalog, String scopeSchema, String scopeTable, short sourceDataType, ColumnMetaData.AutoIncrement isAutoIncrement, ColumnMetaData.Generated isGeneratedColumn)
extends Record
Description of a column.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Indicates whether a column is auto incremented.static enum
Indicates whether this is a generated column.static enum
Column ISO nullability.static enum
Column nullability. -
Constructor Summary
ConstructorsConstructorDescriptionColumnMetaData
(String tableCatalog, String tableSchema, String tableName, String columnName, JDBCType dataType, String typeName, int columnSize, int decimalDigits, int numPrecisionRadix, ColumnMetaData.Nullability nullable, String remarks, String columnDef, int charOctetLength, int ordinalPosition, ColumnMetaData.ISONullability isNullable, String scopeCatalog, String scopeSchema, String scopeTable, short sourceDataType, ColumnMetaData.AutoIncrement isAutoIncrement, ColumnMetaData.Generated isGeneratedColumn) Creates an instance of aColumnMetaData
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of thecharOctetLength
record component.Returns the value of thecolumnDef
record component.Returns the value of thecolumnName
record component.int
Returns the value of thecolumnSize
record component.dataType()
Returns the value of thedataType
record component.int
Returns the value of thedecimalDigits
record component.final 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 theisAutoIncrement
record component.Returns the value of theisGeneratedColumn
record component.Returns the value of theisNullable
record component.nullable()
Returns the value of thenullable
record component.int
Returns the value of thenumPrecisionRadix
record component.int
Returns the value of theordinalPosition
record component.remarks()
Returns the value of theremarks
record component.Returns the value of thescopeCatalog
record component.Returns the value of thescopeSchema
record component.Returns the value of thescopeTable
record component.short
Returns the value of thesourceDataType
record component.Returns the value of thetableCatalog
record component.Returns the value of thetableName
record component.Returns the value of thetableSchema
record component.final String
toString()
Returns a string representation of this record class.typeName()
Returns the value of thetypeName
record component.
-
Constructor Details
-
ColumnMetaData
public ColumnMetaData(String tableCatalog, String tableSchema, String tableName, String columnName, JDBCType dataType, String typeName, int columnSize, int decimalDigits, int numPrecisionRadix, ColumnMetaData.Nullability nullable, String remarks, String columnDef, int charOctetLength, int ordinalPosition, ColumnMetaData.ISONullability isNullable, String scopeCatalog, String scopeSchema, String scopeTable, short sourceDataType, ColumnMetaData.AutoIncrement isAutoIncrement, ColumnMetaData.Generated isGeneratedColumn) Creates an instance of aColumnMetaData
record class.- Parameters:
tableCatalog
- the value for thetableCatalog
record componenttableSchema
- the value for thetableSchema
record componenttableName
- the value for thetableName
record componentcolumnName
- the value for thecolumnName
record componentdataType
- the value for thedataType
record componenttypeName
- the value for thetypeName
record componentcolumnSize
- the value for thecolumnSize
record componentdecimalDigits
- the value for thedecimalDigits
record componentnumPrecisionRadix
- the value for thenumPrecisionRadix
record componentnullable
- the value for thenullable
record componentremarks
- the value for theremarks
record componentcolumnDef
- the value for thecolumnDef
record componentcharOctetLength
- the value for thecharOctetLength
record componentordinalPosition
- the value for theordinalPosition
record componentisNullable
- the value for theisNullable
record componentscopeCatalog
- the value for thescopeCatalog
record componentscopeSchema
- the value for thescopeSchema
record componentscopeTable
- the value for thescopeTable
record componentsourceDataType
- the value for thesourceDataType
record componentisAutoIncrement
- the value for theisAutoIncrement
record componentisGeneratedColumn
- the value for theisGeneratedColumn
record component
-
-
Method Details
-
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 '=='. -
tableCatalog
Returns the value of thetableCatalog
record component.- Returns:
- the value of the
tableCatalog
record component
-
tableSchema
Returns the value of thetableSchema
record component.- Returns:
- the value of the
tableSchema
record component
-
tableName
Returns the value of thetableName
record component.- Returns:
- the value of the
tableName
record component
-
columnName
Returns the value of thecolumnName
record component.- Returns:
- the value of the
columnName
record component
-
dataType
Returns the value of thedataType
record component.- Returns:
- the value of the
dataType
record component
-
typeName
Returns the value of thetypeName
record component.- Returns:
- the value of the
typeName
record component
-
columnSize
Returns the value of thecolumnSize
record component.- Returns:
- the value of the
columnSize
record component
-
decimalDigits
Returns the value of thedecimalDigits
record component.- Returns:
- the value of the
decimalDigits
record component
-
numPrecisionRadix
Returns the value of thenumPrecisionRadix
record component.- Returns:
- the value of the
numPrecisionRadix
record component
-
nullable
Returns the value of thenullable
record component.- Returns:
- the value of the
nullable
record component
-
remarks
Returns the value of theremarks
record component.- Returns:
- the value of the
remarks
record component
-
columnDef
Returns the value of thecolumnDef
record component.- Returns:
- the value of the
columnDef
record component
-
charOctetLength
Returns the value of thecharOctetLength
record component.- Returns:
- the value of the
charOctetLength
record component
-
ordinalPosition
Returns the value of theordinalPosition
record component.- Returns:
- the value of the
ordinalPosition
record component
-
isNullable
Returns the value of theisNullable
record component.- Returns:
- the value of the
isNullable
record component
-
scopeCatalog
Returns the value of thescopeCatalog
record component.- Returns:
- the value of the
scopeCatalog
record component
-
scopeSchema
Returns the value of thescopeSchema
record component.- Returns:
- the value of the
scopeSchema
record component
-
scopeTable
Returns the value of thescopeTable
record component.- Returns:
- the value of the
scopeTable
record component
-
sourceDataType
Returns the value of thesourceDataType
record component.- Returns:
- the value of the
sourceDataType
record component
-
isAutoIncrement
Returns the value of theisAutoIncrement
record component.- Returns:
- the value of the
isAutoIncrement
record component
-
isGeneratedColumn
Returns the value of theisGeneratedColumn
record component.- Returns:
- the value of the
isGeneratedColumn
record component
-