public class ColumnMetaData extends Object
| Constructor and Description |
|---|
ColumnMetaData(TableMetaData tableMetaData)
Creates column meta data.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getColumnName()
Gets the columnName of the column.
|
String |
getComment()
Gets the comment.
|
String |
getDefaultValue()
Gets the column's default.
|
int |
getScale()
Gets the numeric scale.
|
int |
getSize()
Gets the column's size.
|
TableMetaData |
getTableMetaData()
Gets the table meta data.
|
int |
getType()
Gets the column's type.
|
String |
getTypeName()
Gets the backend-specific type columnName.
|
boolean |
isNullable()
Returns whether column is nullable.
|
boolean |
matchesSqlType(SqlType sqlType)
Checks whether colunm's type matches given SqlType according to the backend.
|
void |
setColumnName(String columnName)
Sets the column name.
|
void |
setComment(String comment)
Sets the comment.
|
void |
setDefaultValue(String defaultValue)
Sets the default value.
|
void |
setNullable(boolean nullable)
Sets whether column is nullable.
|
void |
setScale(int scale)
Sets the scale.
|
void |
setSize(int size)
Sets the size.
|
void |
setType(int type)
Sets the type.
|
void |
setTypeName(String typeName)
Sets the type name.
|
void |
setupColumnFromMetaData(ResultSet resultSet)
Sets up the column from the database meta data result.
|
String |
toString() |
void |
validate()
Validates and postprocesses the column data.
|
public ColumnMetaData(TableMetaData tableMetaData)
tableMetaData - the table meta data this column belongs topublic TableMetaData getTableMetaData()
public void setupColumnFromMetaData(ResultSet resultSet) throws SQLException
resultSet - the column result setSQLException - the processing the result set failedpublic String getColumnName()
public void setColumnName(String columnName)
columnName - the column namepublic String getComment()
public void setComment(String comment)
comment - the commentpublic int getType()
Typespublic void setType(int type)
type - the typepublic String getTypeName()
public void setTypeName(String typeName)
typeName - the type namepublic int getSize()
public void setSize(int size)
size - the sizepublic int getScale()
public void setScale(int scale)
scale - the scalepublic String getDefaultValue()
public void setDefaultValue(String defaultValue)
defaultValue - the default valuepublic boolean isNullable()
public void setNullable(boolean nullable)
nullable - true if nullablepublic boolean matchesSqlType(SqlType sqlType)
sqlType - the sqltypepublic void validate()
Tentackle - distributed, domain- and model-driven