Package org.apache.torque.generator.source.jdbc

# Class ColumnMetadata

java.lang.Object
org.apache.torque.generator.source.jdbc.ColumnMetadata

public class ColumnMetadata extends Object
The data retrieved about a column as read from JDBC Metadata.

Version:
  $Id: ColumnMetadata.java 1917241 2024-04-21 13:29:41Z tv $

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ColumnMetadata(String name, Integer sqlType, Integer size, Integer nullType, String defValue, Integer decimalDigits)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Integer`
  `getDecimalDigits()`
  Returns the number of decimal digits.
  `String`
  `getDefValue()`
  Returns the default value of the column.
  `String`
  `getName()`
  Returns the name of the column.
  `Integer`
  `getNullType()`
  Returns whether the column may be null.
  `Integer`
  `getSize()`
  Returns the maximum size of the column.
  `Integer`
  `getSqlType()`
  Returns the data type of the column.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ColumnMetadata

    public ColumnMetadata(String name, Integer sqlType, Integer size, Integer nullType, String defValue, Integer decimalDigits)
    Constructor.
    Parameters:
      `name` - The name of the column.
      `sqlType` - The data type of the column.
      `size` - The maximum size of the column.
      `nullType` - 0 if the column may not be null, 1 if the column may be known, 2 unknown.
      `defValue` - The default value of the column, or null if no default value exists.
      `decimalDigits` - The number of decimal digits of the column.

- ## Method Details

  - ### getName

    public String getName()
    Returns the name of the column.
    Returns:
      the name of the column.

  - ### getSqlType

    public Integer getSqlType()
    Returns the data type of the column.
    Returns:
      the data type of the column as in java.sql.Types.

  - ### getSize

    public Integer getSize()
    Returns the maximum size of the column.
    Returns:
      the maximum size of the column.

  - ### getNullType

    public Integer getNullType()
    Returns whether the column may be null.
    Returns:
      0 if the column may not be null, 1 if the column may be known, 2 unknown.

  - ### getDefValue

    public String getDefValue()
    Returns the default value of the column.
    Returns:
      the default value, or 0 if no default value exists.

  - ### getDecimalDigits

    public Integer getDecimalDigits()
    Returns the number of decimal digits.
    Returns:
      the number of decimal digits.