Class JdbcQueryColumn

java.lang.Object
com.northconcepts.datapipeline.foundations.core.Bean
com.northconcepts.datapipeline.foundations.jdbc.JdbcQueryColumn
All Implemented Interfaces:
DataExceptionContributor, JsonSerializable, RecordSerializable, XmlSerializable, Serializable

public class JdbcQueryColumn extends Bean
Metadata for one result column of a JdbcQuery, read from JDBC ResultSetMetaData by JdbcConnection.loadQueries().
See Also:
  • Field Details

  • Constructor Details

    • JdbcQueryColumn

      public JdbcQueryColumn()
  • Method Details

    • getName

      public String getName()
      Returns the column label: its AS alias, or its name when there is none.
    • setName

      public JdbcQueryColumn setName(String name)
      Sets the column label: its AS alias, or its name when there is none.
    • getSqlType

      public int getSqlType()
      Returns the column's java.sql.Types code.
    • setSqlType

      public void setSqlType(int sqlType)
      Sets the column's java.sql.Types code.
    • getDatabaseTypeName

      public String getDatabaseTypeName()
    • setDatabaseTypeName

      public void setDatabaseTypeName(String databaseTypeName)
    • getSize

      public int getSize()
      Returns the column's maximum width in characters (the JDBC display size).
    • setSize

      public void setSize(int size)
      Sets the column's maximum width in characters (the JDBC display size).
    • getScale

      public int getScale()
      Returns the number of digits to the right of the decimal point (0 where not applicable).
    • setScale

      public void setScale(int scale)
      Sets the number of digits to the right of the decimal point (0 where not applicable).
    • isNullable

      public boolean isNullable()
      Indicates if the column is known to allow nulls (false when the driver reports no nulls or unknown).
    • setNullable

      public void setNullable(boolean nullable)
      Indicates if the column is known to allow nulls (false when the driver reports no nulls or unknown).
    • getTableName

      public String getTableName()
    • setTableName

      public void setTableName(String tableName)
    • getSchemaName

      public String getSchemaName()
    • setSchemaName

      public void setSchemaName(String schemaName)
    • getCatalogName

      public String getCatalogName()
    • setCatalogName

      public void setCatalogName(String catalogName)
    • isAutoIncrement

      public boolean isAutoIncrement()
    • setAutoIncrement

      public void setAutoIncrement(boolean autoIncrement)
    • isCurrency

      public boolean isCurrency()
    • setCurrency

      public void setCurrency(boolean currency)
    • isReadOnly

      public boolean isReadOnly()
    • setReadOnly

      public void setReadOnly(boolean readOnly)
    • isSearchable

      public boolean isSearchable()
      Indicates if the column can be used in a WHERE clause.
    • setSearchable

      public void setSearchable(boolean searchable)
      Indicates if the column can be used in a WHERE clause.
    • isWritable

      public boolean isWritable()
    • setWritable

      public void setWritable(boolean writable)
    • getJavaType

      public Class<?> getJavaType()
      Returns the Java type for the column's values, chosen from the connection's type overrides or SQL-to-Java type mapper.
    • setJavaType

      public JdbcQueryColumn setJavaType(Class<?> javaType)
      Sets the Java type for the column's values, normally chosen by JdbcConnection.loadQueries().
    • getNameAsJavaIdentifier

      public String getNameAsJavaIdentifier()
      Returns the label as a camel-case Java identifier, e.g. firstName for FIRST_NAME.
    • getClassName

      public String getClassName()
      Returns the fully-qualified class name of the values the JDBC driver returns for this column.
    • setClassName

      public JdbcQueryColumn setClassName(String className)
      Sets the fully-qualified class name of the values the JDBC driver returns for this column.
    • isSigned

      public boolean isSigned()
    • setSigned

      public JdbcQueryColumn setSigned(boolean signed)
    • toRecord

      public Record toRecord()
      Description copied from interface: RecordSerializable
      Converts this object's state to a record that RecordSerializable.fromRecord(Record) can load.
      Specified by:
      toRecord in interface RecordSerializable
      Overrides:
      toRecord in class Bean
    • fromRecord

      public JdbcQueryColumn fromRecord(Record source)
      Description copied from interface: RecordSerializable
      Loads this instance's state from a record and returns this (for fluid API call chaining). For fluid API call chaining, the overridden method should change the declared return type to its class.
      Specified by:
      fromRecord in interface RecordSerializable
      Overrides:
      fromRecord in class Bean
      Parameters:
      source -
      Returns:
      this instance.