|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TableFormat
A table in the database that can be created upon demand, and can be upgraded on demand. Basically, it's a prototype of the format of a table in the database.
There may be differences between the TableFormat and the actual table -- this TableFormat only makes sure that the format matches what's required AS IT IS USED. So, for example, if you have a database table already created using a TableFormat, and then you add a new column to a TableFormat, the new column will not be created until it is used.
Contrapositively, extra columns that are in the table but not in the TableFormat will not be deleted -- they will stay there. For example, in a survey's storage table, there is a TableFormat which has only the required columns -- all the extra columns for storing data that are variable are handled separately from the TableFormat.
Nested Class Summary | |
---|---|
static interface |
TableFormat.ColumnFormat
|
static interface |
TableFormat.ColumnFormatKnowHowToCreate
A column that is non-standard or expected to be needed in an upgrade, with special upgrade needs (more than just creating the column). |
static class |
TableFormat.ColumnFormatRenamed
This assumes that neither the old nor new columns are primary keys, and that the old and new columns are the same type. |
static class |
TableFormat.ColumnFormatStub
|
static interface |
TableFormat.TableFormatAndDoMore
|
static class |
TableFormat.TableFormatStub
|
static class |
TableFormat.TableFormatStubAndDoMoreAddRow
Adds a default row of data automatically when the table is created. |
Method Summary | |
---|---|
TableFormat.ColumnFormat |
getColumn(java.lang.String name)
Get a column by this name, if it exists. |
java.util.List<TableFormat.ColumnFormat> |
getColumns()
|
java.util.List |
getDefaultData()
The default data to initialize this table with, if it is initialized. |
java.lang.String |
getName()
|
int |
getPrimaryKeyColumnIndex()
The index of the column that is the primary key. |
int |
getVersion()
The version of the table. |
Method Detail |
---|
java.util.List<TableFormat.ColumnFormat> getColumns()
TableFormat.ColumnFormat getColumn(java.lang.String name)
name
-
java.lang.String getName()
int getPrimaryKeyColumnIndex()
java.util.List getDefaultData()
int getVersion()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |