Record Class Column
java.lang.Object
java.lang.Record
io.bloviate.db.Column
- Record Components:
name- the column nametableName- the name of the table containing this columnschema- the schema name, may be null for databases that don't use schemascatalog- the catalog name, may be null for databases that don't use catalogsjdbcType- the standard JDBC data type for this columnmaxSize- the maximum size/length for this column, null if not applicablemaxDigits- the maximum number of digits for numeric columns, null if not applicabletypeName- the database-specific type name (e.g., "VARCHAR", "INTEGER")autoIncrement- true if this column is auto-increment/identity, null if unknownnullable- true if this column accepts NULL values, null if unknowndefaultValue- the default value expression, null if none specifiedordinalPosition- the 1-based position of this column within the table
public record Column(String name, String tableName, String schema, String catalog, JDBCType jdbcType, Integer maxSize, Integer maxDigits, String typeName, Boolean autoIncrement, Boolean nullable, String defaultValue, Integer ordinalPosition)
extends Record
Represents a database column with its complete metadata.
This immutable record encapsulates all metadata for a database column as discovered through JDBC metadata analysis. The information includes data type, constraints, size limits, and positioning within the table structure.
Column metadata is used by DatabaseSupport implementations
to select appropriate DataGenerator instances for generating
realistic test data that respects the column's constraints.
- Author:
- Tim Veil
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theautoIncrementrecord component.catalog()Returns the value of thecatalogrecord component.Returns the value of thedefaultValuerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.jdbcType()Returns the value of thejdbcTyperecord component.Returns the value of themaxDigitsrecord component.maxSize()Returns the value of themaxSizerecord component.name()Returns the value of thenamerecord component.nullable()Returns the value of thenullablerecord component.Returns the value of theordinalPositionrecord component.schema()Returns the value of theschemarecord component.Returns the value of thetableNamerecord component.final StringtoString()Returns a string representation of this record class.typeName()Returns the value of thetypeNamerecord component.
-
Constructor Details
-
Column
public Column(String name, String tableName, String schema, String catalog, JDBCType jdbcType, Integer maxSize, Integer maxDigits, String typeName, Boolean autoIncrement, Boolean nullable, String defaultValue, Integer ordinalPosition) Creates an instance of aColumnrecord class.- Parameters:
name- the value for thenamerecord componenttableName- the value for thetableNamerecord componentschema- the value for theschemarecord componentcatalog- the value for thecatalogrecord componentjdbcType- the value for thejdbcTyperecord componentmaxSize- the value for themaxSizerecord componentmaxDigits- the value for themaxDigitsrecord componenttypeName- the value for thetypeNamerecord componentautoIncrement- the value for theautoIncrementrecord componentnullable- the value for thenullablerecord componentdefaultValue- the value for thedefaultValuerecord componentordinalPosition- the value for theordinalPositionrecord 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). -
name
-
tableName
-
schema
-
catalog
-
jdbcType
-
maxSize
-
maxDigits
-
typeName
-
autoIncrement
Returns the value of theautoIncrementrecord component.- Returns:
- the value of the
autoIncrementrecord component
-
nullable
-
defaultValue
Returns the value of thedefaultValuerecord component.- Returns:
- the value of the
defaultValuerecord component
-
ordinalPosition
Returns the value of theordinalPositionrecord component.- Returns:
- the value of the
ordinalPositionrecord component
-