ch.sahits.model.db
Interface IBasicDataBaseTable

All Known Subinterfaces:
IPHPDBModel
All Known Implementing Classes:
BasicDataBaseTable, DataBaseTable

public interface IBasicDataBaseTable


Method Summary
 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()
           
 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
 java.util.List<DataBaseTableIndex> uniqueKeys()
          Retrieve a list of all indexes that represent a unique key
 

Method Detail

getDbProductName

java.lang.String getDbProductName()
Returns:
the dbProductName

getSchema

java.lang.String getSchema()
Retrieve the schema.

Returns:
database schema

getTableName

java.lang.String getTableName()
Retrieve the table name

Returns:
table name

getFields

java.util.List<DataBaseTableField> getFields()
Retrieve a list of the database fields.

Returns:
DataBaseTableField s

getIndexes

java.util.List<DataBaseTableIndex> getIndexes()
Retrieve a list of all table indexes

Returns:
DataBaseTableIndex s

findField

DataBaseTableField findField(java.lang.String fieldName)
Find the field with the name fieldName

Parameters:
fieldName - name of the field
Returns:
DataBaseTableField or null if the field is not found

findIndex

DataBaseTableIndex findIndex(java.lang.String indexName)
Find the index with the name indexName

Parameters:
indexName - name of the index
Returns:
DataBaseTableIndex or null if the index is not found

findPrimaryIndex

DataBaseTableIndex findPrimaryIndex()
Find the index which's name start with PK_. If no such index is found the first found unique is returned.

Returns:
Primary index or null if none is found.

getHost

java.lang.String getHost()
Returns:
the host

getPort

java.lang.String getPort()
Returns:
the port

getUserName

java.lang.String getUserName()
Returns:
the userName

getPassword

java.lang.String getPassword()
Returns:
the password

getDbName

java.lang.String getDbName()
Returns:
the dbName

forginKeys

java.util.List<DataBaseTableIndex> forginKeys()
Retrieve a list of all indexes that represent a forgin key

Returns:
List of indexes

uniqueKeys

java.util.List<DataBaseTableIndex> uniqueKeys()
Retrieve a list of all indexes that represent a unique key

Returns:
List of indexes

otherKeys

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

Returns:
List of indexes