public class TableModel extends java.lang.Object implements SQLMetaModel
Class is read-only, use SquelerDDL:TableDDL for changing columns
SQLMetaData,
SQLRecord,
Serialized Form| Modifier | Constructor and Description |
|---|---|
protected |
TableModel()
Constructor
only used by TableDDL
|
|
TableModel(SQLRecord record)
Create a TableModel on the basis of this SQLRecord
|
| Modifier and Type | Method and Description |
|---|---|
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
|
int |
hashCode() |
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
|
protected TableModel()
public TableModel(SQLRecord record)
record - SQLRecord, the record containing the
information for this tablepublic java.lang.String getName()
This is equal to the name of the table,column, etc.
getName in interface SQLMetaModelpublic java.lang.String getCatalog()
public java.lang.String getSchema()
public java.lang.String getRemarks()
public SQLRecord getRecord()
getRecord in interface SQLMetaModelpublic java.lang.String getType()
returned value depends on the model: TABLE,COLUMN,INDEX
getType in interface SQLMetaModelpublic java.util.List getColumns()
protected void setColumns(java.util.List columns)
columns - List of ColumnModelpublic java.util.List getIndices()
protected void setIndices(java.util.List indices)
indices - List of IndexModelprotected void setPrimaryKey(ConstraintModel primaryKey)
primaryKey - ConstraintModeljava.lang.IllegalArgumentException - if the ConstraintModel is not
of type ConstraintModel.PRIMARY_KEYprotected void setRecord(SQLRecord record)
record - SQLRecordpublic ConstraintModel getPrimaryKey()
ConstraintModel of type ConstraintModel.PRIMARY_KEYConstraintModelpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object