public class ColumnModel extends java.lang.Object implements SQLMetaModel
Class is read-only, use SquelerDDL:ColumnDDL for changing columns
SQLMetaData,
SQLRecord,
Serialized Form| Modifier | Constructor and Description |
|---|---|
protected |
ColumnModel()
Constructor
only used by ColumnDDL
|
|
ColumnModel(SQLRecord record)
Create a ColumnModel on the basis of this SQLRecord
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
int |
getColumnSize()
get the size of the column for non-numeric types or the precision for numeric types
|
int |
getDataType()
get the datatype as defined in
java.sql.Type |
int |
getDecimalDigits()
get the number of decimal places for a numeric field.
|
java.lang.String |
getDefault()
get the column default value
|
java.lang.String |
getName()
get the name for this model's instance
|
SQLRecord |
getRecord()
the record which defines all the values for the model
|
java.lang.String |
getRemarks()
get optional remarks for a column
|
int |
getSequence()
get the sequence of this column within the object it is
contained in such as a
TableModel, IndexModel or
ConstraintModel |
java.lang.String |
getTableName()
get the table name
|
java.lang.String |
getType()
get the type of Object defined by the meta model
|
java.lang.String |
getTypeName()
get the type description for the column type
|
int |
hashCode() |
boolean |
isAutoIncrement()
check if the column is an auto increment
|
boolean |
isNullable()
get an indication if the field is nullable
|
protected void |
setRecord(SQLRecord record)
set the record for this Model
|
java.lang.String |
toString()
a String representation of this column as
tablename.name |
protected ColumnModel()
public ColumnModel(SQLRecord record)
record - SQLRecord, the record containing the
information on this columnpublic java.lang.String getName()
This is equal to the name of the table,column, etc.
getName in interface SQLMetaModelpublic SQLRecord getRecord()
getRecord in interface SQLMetaModelpublic java.lang.String getType()
returned value depends on the model: TABLE,COLUMN,INDEX
getType in interface SQLMetaModelpublic int getSequence()
TableModel, IndexModel or
ConstraintModelpublic java.lang.String getTableName()
public int getDataType()
java.sql.Typepublic java.lang.String getTypeName()
This value is specific for the database used
public int getColumnSize()
public int getDecimalDigits()
public boolean isNullable()
public java.lang.String getRemarks()
public java.lang.String getDefault()
public java.lang.String toString()
tablename.nametoString in class java.lang.ObjectObject.toString()protected void setRecord(SQLRecord record)
record - SQLRecordpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean isAutoIncrement()