|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.brains2b.sql.meta.ColumnModel
public class ColumnModel
Wrapper around column definition from DatabaseMetaData
Class is read-only, use SquelerDDL:ColumnDDL for changing columns
SQLMetaData
,
SQLRecord
Constructor Summary | |
---|---|
protected |
ColumnModel()
Constructor only used by ColumnDDL |
|
ColumnModel(SQLRecord record)
Create a ColumnModel on the basis of this SQLRecord |
Method Summary | |
---|---|
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 |
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 |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected ColumnModel()
public ColumnModel(SQLRecord record)
record
- SQLRecord, the record containing the
information on this columnMethod Detail |
---|
public java.lang.String getName()
This is equal to the name of the table,column, etc.
getName
in interface SQLMetaModel
public SQLRecord getRecord()
getRecord
in interface SQLMetaModel
public java.lang.String getType()
returned value depends on the model: TABLE,COLUMN,INDEX
getType
in interface SQLMetaModel
public int getSequence()
TableModel
, IndexModel
or
ConstraintModel
public java.lang.String getTableName()
public int getDataType()
java.sql.Type
public 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.name
toString
in class java.lang.Object
Object.toString()
protected void setRecord(SQLRecord record)
record
- SQLRecordpublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |