|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javatools.db.DbAbstractTable | +--javatools.db.DbFixedAbstractTable
It represents a real database table. It's a base class to build derived classes representing real tables.
Field Summary | |
protected java.util.HashMap |
colNameMap
A map containing all column names. |
protected DbColumn[] |
columns
The array containing all the columns of the table. |
protected java.lang.Object[] |
defaultValues
Array containing the default values. |
Fields inherited from class javatools.db.DbAbstractTable |
db, displaySize, names, tableName, types |
Constructor Summary | |
DbFixedAbstractTable(DbDatabase db)
Creates new DbFixedAbstractTable |
Method Summary | |
protected void |
buildUp()
Performs building of static lists. |
protected void |
catchDefaults()
Finds defaults. |
DbDeleter |
deleter()
Returns a deleter for this table. |
DbColumn |
getColumn(int index)
Get the column of the given index. |
DbColumn |
getColumn(java.lang.String name)
Get the DbColumn representing the column with this name. |
int |
getColumnCount()
Returns the number of contained columns. |
java.lang.Object |
getDefault(int index)
Returns the default value for the requested column. |
java.lang.Object |
getDefault(java.lang.String name)
Returns the default value for a given column. |
DbInserter |
inserter()
Return an inserter for inserting new data in the database. |
DbInserter |
inserter(DbSelector selector)
Return an inserter for inserting new data in the database. |
protected void |
loadStructure()
Loads table structure from a file: localConfigPath/TABLENAME.table. |
protected void |
saveStructure()
Saves table structure into a file: localConfigPath/TABLENAME.table. |
DbUpdater |
updater()
Returns an updater for this table. |
Methods inherited from class javatools.db.DbAbstractTable |
equals, getConstraint, getDatabase, getFullTableName, setTableName, simpleDeleter, simpleInserter, simpleInserter, simpleUpdater, usesTables |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected DbColumn[] columns
protected java.util.HashMap colNameMap
protected java.lang.Object[] defaultValues
Constructor Detail |
public DbFixedAbstractTable(DbDatabase db) throws DbException
db
- The database that will be used.
DbException
- If something goes wrong.Method Detail |
public DbColumn getColumn(int index) throws DbException
getColumn
in class DbAbstractTable
index
- The index for the requested column.
DbException
- If something goes wrong.public DbColumn getColumn(java.lang.String name) throws DbException
getColumn
in class DbAbstractTable
name
- The name of the requested column.
DbException
- If something goes wrong.public int getColumnCount()
getColumnCount
in class DbAbstractTable
public java.lang.Object getDefault(int index) throws DbException
getDefault
in class DbAbstractTable
index
- The index for the requested column.
DbException
- If something goes wrong.public java.lang.Object getDefault(java.lang.String name) throws DbException
getDefault
in class DbAbstractTable
name
- The name of the requested column.
DbException
- If something goes wrong.public DbInserter inserter(DbSelector selector) throws DbException
inserter
in class DbAbstractTable
selector
- The selector that will be used to build this inserter.
DbException
- If something goes wrong.public DbInserter inserter() throws DbException
inserter
in class DbAbstractTable
DbException
- If something goes wrong.public DbUpdater updater() throws DbException
updater
in class DbAbstractTable
DbException
- If something goes wrong.public DbDeleter deleter() throws DbException
deleter
in class DbAbstractTable
DbException
- If something goes wrong.protected void buildUp() throws DbException
DbException
- If something goes wrong.protected void catchDefaults() throws DbException
DbException
- If something goes wrong.protected void loadStructure() throws DbException
DbException
- If something goes wrong.protected void saveStructure() throws DbException
DbException
- If something goes wrong.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |