|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.brains2b.sql.meta.TableModel
public class TableModel
Wrapper around table definition from DatabaseMetaData
Class is read-only, use SquelerDDL:TableDDL for changing columns
SQLMetaData
,
SQLRecord
Constructor Summary | |
---|---|
protected |
TableModel()
Constructor only used by TableDDL |
|
TableModel(SQLRecord record)
Create a TableModel on the basis of this SQLRecord |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getCatalog()
get the Catalog for this TableModel |
java.util.List |
getColumns()
get the columns for this Table |
java.util.List |
getIndices()
get the indices for this Table |
java.lang.String |
getName()
get the name for this model's instance |
ConstraintModel |
getPrimaryKey()
get the primary key for this table in the form of a ConstraintModel of type ConstraintModel.PRIMARY_KEY |
SQLRecord |
getRecord()
the record which defines all the values for the model |
java.lang.String |
getRemarks()
get optional remarks for this table |
java.lang.String |
getSchema()
get the Schema for this TableModel |
java.lang.String |
getType()
get the type of Object defined by the meta model |
protected void |
setColumns(java.util.List columns)
set the columns for this TableModel |
protected void |
setIndices(java.util.List indices)
set the indices for this Model |
protected void |
setPrimaryKey(ConstraintModel primaryKey)
set the primary key for this table |
protected void |
setRecord(SQLRecord record)
set the record for this Model |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected TableModel()
public TableModel(SQLRecord record)
record
- SQLRecord, the record containing the
information for this tableMethod Detail |
---|
public java.lang.String getName()
This is equal to the name of the table,column, etc.
getName
in interface SQLMetaModel
public java.lang.String getCatalog()
public java.lang.String getSchema()
public java.lang.String getRemarks()
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 java.util.List getColumns()
protected void setColumns(java.util.List columns)
List
- of ColumnModelpublic java.util.List getIndices()
protected void setIndices(java.util.List indices)
List
- of IndexModelprotected void setPrimaryKey(ConstraintModel primaryKey)
ConstraintModel
-
java.lang.IllegalArgumentException
- if the ConstraintModel is not
of type ConstraintModel.PRIMARY_KEY
protected void setRecord(SQLRecord record)
record
- SQLRecordpublic ConstraintModel getPrimaryKey()
ConstraintModel
of type ConstraintModel.PRIMARY_KEY
ConstraintModel
public 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 |