org.dbunit.dataset
Class Column

java.lang.Object
  extended byorg.dbunit.dataset.Column

public class Column
extends java.lang.Object

Represents a table column.

Since:
Feb 17, 2002
Version:
$Revision: 1.12 $
Author:
Manuel Laflamme

Nested Class Summary
static class Column.Nullable
           
 
Field Summary
static Column.Nullable NO_NULLS
          Indicates that the column might not allow NULL values.
static Column.Nullable NULLABLE
          Indicates that the column definitely allows NULL values.
static Column.Nullable NULLABLE_UNKNOWN
          Indicates that the nullability of columns is unknown.
 
Constructor Summary
Column(java.lang.String columnName, DataType dataType)
          Creates a Column object.
Column(java.lang.String columnName, DataType dataType, Column.Nullable nullable)
          Creates a Column object.
Column(java.lang.String columnName, DataType dataType, java.lang.String sqlTypeName, Column.Nullable nullable)
          Creates a Column object.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getColumnName()
          Returns this column name.
 DataType getDataType()
          Returns this column data type.
 Column.Nullable getNullable()
          Returns true if this column is nullable.
 java.lang.String getSqlTypeName()
          Returns this column sql data type name.
 int hashCode()
           
static Column.Nullable nullableValue(boolean nullable)
          Returns the appropriate Nullable constant.
static Column.Nullable nullableValue(int nullable)
          Returns the appropriate Nullable constant according specified JDBC DatabaseMetaData constant.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_NULLS

public static final Column.Nullable NO_NULLS
Indicates that the column might not allow NULL values.


NULLABLE

public static final Column.Nullable NULLABLE
Indicates that the column definitely allows NULL values.


NULLABLE_UNKNOWN

public static final Column.Nullable NULLABLE_UNKNOWN
Indicates that the nullability of columns is unknown.

Constructor Detail

Column

public Column(java.lang.String columnName,
              DataType dataType)
Creates a Column object. This contructor set nullable to true.

Parameters:
columnName - the column name
dataType - the data type

Column

public Column(java.lang.String columnName,
              DataType dataType,
              Column.Nullable nullable)
Creates a Column object.


Column

public Column(java.lang.String columnName,
              DataType dataType,
              java.lang.String sqlTypeName,
              Column.Nullable nullable)
Creates a Column object.

Method Detail

getColumnName

public java.lang.String getColumnName()
Returns this column name.


getDataType

public DataType getDataType()
Returns this column data type.


getSqlTypeName

public java.lang.String getSqlTypeName()
Returns this column sql data type name.


getNullable

public Column.Nullable getNullable()
Returns true if this column is nullable.


nullableValue

public static Column.Nullable nullableValue(int nullable)
Returns the appropriate Nullable constant according specified JDBC DatabaseMetaData constant.

Parameters:
nullable - one of the following constants DatabaseMetaData.columnNoNulls, DatabaseMetaData.columnNullable, DatabaseMetaData.columnNullableUnknown

nullableValue

public static Column.Nullable nullableValue(boolean nullable)
Returns the appropriate Nullable constant.

Parameters:
nullable - true if null is allowed

toString

public java.lang.String toString()

equals

public boolean equals(java.lang.Object o)

hashCode

public int hashCode()


Copyright © 2002-2004 DbUnit.org. All Rights Reserved.