|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dbunit.dataset.Column
public class Column
Represents a table column.
Nested Class Summary | |
---|---|
static class |
Column.Nullable
Specifies nullable usage. |
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(String columnName,
DataType dataType)
Creates a Column object. |
|
Column(String columnName,
DataType dataType,
Column.Nullable nullable)
Creates a Column object. |
|
Column(String columnName,
DataType dataType,
String sqlTypeName,
Column.Nullable nullable)
Creates a Column object. |
|
Column(String columnName,
DataType dataType,
String sqlTypeName,
Column.Nullable nullable,
String defaultValue)
Creates a Column object. |
Method Summary | |
---|---|
boolean |
equals(Object o)
|
String |
getColumnName()
Returns this column name. |
DataType |
getDataType()
Returns this column data type. |
String |
getDefaultValue()
|
Column.Nullable |
getNullable()
Returns true if this column is nullable. |
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. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Column.Nullable NO_NULLS
NULL
values.
public static final Column.Nullable NULLABLE
NULL
values.
public static final Column.Nullable NULLABLE_UNKNOWN
Constructor Detail |
---|
public Column(String columnName, DataType dataType)
columnName
- the column namedataType
- the data typepublic Column(String columnName, DataType dataType, Column.Nullable nullable)
public Column(String columnName, DataType dataType, String sqlTypeName, Column.Nullable nullable)
public Column(String columnName, DataType dataType, String sqlTypeName, Column.Nullable nullable, String defaultValue)
columnName
- The name of the columndataType
- The DbUnit DataType
of the columnsqlTypeName
- The SQL name of the column which comes from the JDBC driver.
See value 'TYPE_NAME' in DatabaseMetaData.getColumns(String, String, String, String)
nullable
- whether or not the column is nullabledefaultValue
- The default value on the DB for this column. Can be null
.Method Detail |
---|
public String getColumnName()
public DataType getDataType()
public String getSqlTypeName()
public Column.Nullable getNullable()
true
if this column is nullable.
public String getDefaultValue()
public static Column.Nullable nullableValue(int nullable)
nullable
- one of the following constants
DatabaseMetaData.columnNoNulls
,
DatabaseMetaData.columnNullable
,
DatabaseMetaData.columnNullableUnknown
public static Column.Nullable nullableValue(boolean nullable)
nullable
- true
if null is allowedpublic String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |