Package org.apache.storm.jdbc.common

# Class Column<T>

java.lang.Object
org.apache.storm.jdbc.common.Column<T>

All Implemented Interfaces:
  `Serializable`

public class Column<T> extends Object implements Serializable
A database table can be defined as a list of rows and each row can be defined as a list of columns where each column instance has a name, a value and a type. This class represents an instance of a column in a database row. For example if we have the following table named user:

      ____________________________
     |    UserId  |   UserName    |
     |      1     |    Foo        |
     |      2     |    Bar        |
      ----------------------------

The following class can be used to represent the data in the table as

    <![CDATA[
     List<List> rows = new ArrayList<List>();
     List row1 = Lists.newArrayList(new Column("UserId", 1, Types.INTEGER), new Column("UserName", "Foo", Types.VARCHAR))
     List row1 = Lists.newArrayList(new Column("UserId", 2, Types.INTEGER), new Column("UserName", "Bar", Types.VARCHAR))

     rows.add(row1)
     rows.add(row2)
     ]]>

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Column(String columnName, int sqlType)`
  `Column(String columnName, T val, int sqlType)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object o)`
  `String`
  `getColumnName()`
  `int`
  `getSqlType()`
  `T`
  `getVal()`
  `int`
  `hashCode()`
  `String`
  `toString()`

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

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Column

    public Column(String columnName, T val, int sqlType)

  - ### Column

    public Column(String columnName, int sqlType)

- ## Method Details

  - ### getColumnName

    public String getColumnName()

  - ### getVal

    public T getVal()

  - ### getSqlType

    public int getSqlType()

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`