|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface to perform limited storage management on a database schema used by TJDO.
SchemaManagerFactory
Method Summary | |
void |
addClasses(java.lang.Class[] classes)
Adds to the schema any database objects (tables, views, constraints, indexes, etc.) necessary to enable persistence of the given PersistenceCapable class(es). |
void |
dropAllTables()
Drops all tables in the schema. |
void |
dropTablesFor(java.lang.Class[] classes)
Removes from the schema any existing database tables used in persisting the given PersistenceCapable class(es). |
java.lang.String |
getSchemaName()
Returns the name of the database schema. |
void |
reset()
Resets the schema manager back to its initial state. |
Method Detail |
public java.lang.String getSchemaName()
null
if the
DBMS does not support the concept of schemas.public void addClasses(java.lang.Class[] classes)
This method is primarily useful for applications that wish to perform all of their database initialization up front, rather than wait for the TJDO runtime to do it on-demand.
SQL identifiers for new database objects are chosen so as not to collide with any existing objects. Therefore it is always safe for TJDO and non-TJDO code to share the same database schema.
classes
- The class(es) to be added.
SchemaValidationException
- If there is some mismatch between the current schema contents and
those necessary to enable persistence of the given classes.public void dropTablesFor(java.lang.Class[] classes)
This method will fail if the relevant tables are depended upon by others used for classes that are not being removed. In case of failure, it is unspecified whether or not any tables were actually removed.
After dropping tables this method performs an implicit reset()
.
classes
- The class(es) whose tables are to be removed.public void dropAllTables()
After dropping tables this method performs an implicit reset()
.
public void reset()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |