|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.sahits.model.db.BasicDataBaseTable
public class BasicDataBaseTable
Implementation of a database table model
| Constructor Summary | |
|---|---|
BasicDataBaseTable(java.lang.String product)
Initialize the object with the database product |
|
BasicDataBaseTable(java.lang.String product,
java.lang.String _schema)
Initialize the object with the database product |
|
BasicDataBaseTable(java.lang.String product,
java.lang.String _tableName,
java.lang.String _schema)
Initialize the object with the database product |
|
| Method Summary | |
|---|---|
void |
add(DataBaseTableField field)
Add a database field. |
void |
add(DataBaseTableIndex ind)
Add a database index. |
boolean |
equals(java.lang.Object obj)
|
DataBaseTableField |
findField(java.lang.String fieldName)
Find the field with the name fieldName |
DataBaseTableIndex |
findIndex(java.lang.String indexName)
Find the index with the name indexName |
DataBaseTableIndex |
findPrimaryIndex()
Find the index which's name start with PK_. |
java.util.List<DataBaseTableIndex> |
forginKeys()
Retrieve a list of all indexes that represent a forgin key |
java.lang.String |
getDbName()
|
java.lang.String |
getDbProductName()
|
java.util.List<DataBaseTableField> |
getFields()
Retrieve a list of the database fields. |
java.lang.String |
getHost()
|
java.util.List<DataBaseTableIndex> |
getIndexes()
Retrieve a list of all table indexes |
java.lang.String |
getPassword()
|
java.lang.String |
getPort()
|
java.lang.String |
getSchema()
Retrieve the schema. |
java.lang.String |
getTableName()
Retrieve the table name |
java.lang.String |
getUserName()
|
int |
hashCode()
|
java.util.List<DataBaseTableIndex> |
otherKeys()
Retrieve a list of all indexes that represent an index that is not a primary key nor a forgin key nor a unique index |
void |
setDbName(java.lang.String _dbName)
|
void |
setDbProductName(java.lang.String _dbProductName)
|
void |
setFieldAt(int index,
DataBaseTableField field)
Set a database field at position index |
void |
setFieldAt(int index,
DataBaseTableIndex ind)
Set a database index at position index |
void |
setFields(java.util.List<DataBaseTableField> _fields)
Set the DataBaseTableField s |
void |
setHost(java.lang.String _host)
|
void |
setIndexes(java.util.List<DataBaseTableIndex> _indexes)
Set the DataBaseTableIndex s |
void |
setPassword(java.lang.String _password)
|
void |
setPort(java.lang.String _port)
|
void |
setSchema(java.lang.String _schema)
Set the database schema. |
void |
setTableName(java.lang.String _tableName)
Set the table name. |
void |
setUserName(java.lang.String _userName)
|
java.lang.String |
toString()
Convert this into a string representation |
java.util.List<DataBaseTableIndex> |
uniqueKeys()
Retrieve a list of all indexes that represent a unique key |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BasicDataBaseTable(java.lang.String product,
java.lang.String _tableName,
java.lang.String _schema)
product - Indicates which database product is used (Oracle, MySQL, ...)_tableName - Name of the table_schema - Schema of the table, may be null
public BasicDataBaseTable(java.lang.String product,
java.lang.String _schema)
product - Indicates which database product is used (Oracle, MySQL, ...)_schema - Schema of the tablepublic BasicDataBaseTable(java.lang.String product)
product - Indicates which database product is used (Oracle, MySQL, ...)| Method Detail |
|---|
public java.lang.String getDbProductName()
getDbProductName in interface IBasicDataBaseTablegetDbProductName in interface IDBTablepublic void setDbProductName(java.lang.String _dbProductName)
_dbProductName - the dbProductName to setpublic java.lang.String getSchema()
IDBTable
getSchema in interface IBasicDataBaseTablegetSchema in interface IDBTablepublic void setSchema(java.lang.String _schema)
setSchema in interface IDBTable_schema - public java.lang.String getTableName()
IDBTable
getTableName in interface IBasicDataBaseTablegetTableName in interface IDBTablepublic void setTableName(java.lang.String _tableName)
setTableName in interface IDBTable_tableName - public java.util.List<DataBaseTableField> getFields()
IBasicDataBaseTable
getFields in interface IBasicDataBaseTableDataBaseTableField spublic void setFields(java.util.List<DataBaseTableField> _fields)
DataBaseTableField s
_fields -
public void setFieldAt(int index,
DataBaseTableField field)
index
index - positionfield - public void add(DataBaseTableField field)
field - public java.util.List<DataBaseTableIndex> getIndexes()
IBasicDataBaseTable
getIndexes in interface IBasicDataBaseTableDataBaseTableIndex spublic void setIndexes(java.util.List<DataBaseTableIndex> _indexes)
DataBaseTableIndex s
_indexes -
public void setFieldAt(int index,
DataBaseTableIndex ind)
index
index - positionind - public void add(DataBaseTableIndex ind)
ind - public java.lang.String toString()
toString in class java.lang.Objectpublic DataBaseTableField findField(java.lang.String fieldName)
IBasicDataBaseTablefieldName
findField in interface IBasicDataBaseTablefieldName - name of the field
DataBaseTableField or null if the field is not foundpublic DataBaseTableIndex findIndex(java.lang.String indexName)
IBasicDataBaseTableindexName
findIndex in interface IBasicDataBaseTableindexName - name of the index
DataBaseTableIndex or null if the index is not foundpublic DataBaseTableIndex findPrimaryIndex()
IBasicDataBaseTable
findPrimaryIndex in interface IBasicDataBaseTablepublic java.lang.String getHost()
getHost in interface IBasicDataBaseTablegetHost in interface IDBTablepublic void setHost(java.lang.String _host)
setHost in interface IDBTable_host - the host to setpublic java.lang.String getPort()
getPort in interface IBasicDataBaseTablegetPort in interface IDBTablepublic void setPort(java.lang.String _port)
setPort in interface IDBTable_port - the port to setpublic java.lang.String getUserName()
getUserName in interface IBasicDataBaseTablegetUserName in interface IDBTablepublic void setUserName(java.lang.String _userName)
setUserName in interface IDBTable_userName - the userName to setpublic java.lang.String getPassword()
getPassword in interface IBasicDataBaseTablegetPassword in interface IDBTablepublic void setPassword(java.lang.String _password)
setPassword in interface IDBTable_password - the password to setpublic java.lang.String getDbName()
getDbName in interface IBasicDataBaseTablegetDbName in interface IDBTablepublic void setDbName(java.lang.String _dbName)
setDbName in interface IDBTable_dbName - the dbName to setpublic java.util.List<DataBaseTableIndex> forginKeys()
IBasicDataBaseTable
forginKeys in interface IBasicDataBaseTablepublic java.util.List<DataBaseTableIndex> uniqueKeys()
IBasicDataBaseTable
uniqueKeys in interface IBasicDataBaseTablepublic java.util.List<DataBaseTableIndex> otherKeys()
IBasicDataBaseTable
otherKeys in interface IBasicDataBaseTablepublic int hashCode()
hashCode in class java.lang.Objectpublic 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 | |||||||||