public class ColumnMetaData extends Object implements Cloneable
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
autoIncrement |
protected String |
columnName |
protected String |
comment |
protected String |
defaultValue |
protected boolean |
generated |
protected boolean |
nullable |
protected int |
scale |
protected int |
size |
protected TableMetaData |
tableMetaData |
protected int |
type |
protected String |
typeName |
| 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 |
isAutoIncrement()
Returns whether column is auto-incremented by the backend.
|
boolean |
isGenerated()
Returns whether column is generated by the backend.
|
boolean |
isNullable()
Returns whether column is nullable.
|
boolean |
matchesSqlType(SqlType sqlType)
Checks whether colunm's type matches given SqlType according to the backend.
|
void |
setupColumnFromMetaData(ResultSet resultSet)
Sets up the column from the database meta data result.
|
String |
toString() |
void |
validate()
Validates and postprocesses the column data.
|
protected final TableMetaData tableMetaData
protected String columnName
protected String comment
protected int type
protected String typeName
protected int size
protected int scale
protected String defaultValue
protected boolean nullable
protected boolean generated
protected boolean autoIncrement
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 String getComment()
public int getType()
Typespublic String getTypeName()
public int getSize()
public int getScale()
public String getDefaultValue()
public boolean isNullable()
public boolean isGenerated()
public boolean isAutoIncrement()
public boolean matchesSqlType(SqlType sqlType)
sqlType - the sqltypepublic void validate()
Copyright © 2016 Krake Softwaretechnik. All rights reserved.