|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enableit.db.darrt.AbstractFileHandler | +--org.enableit.db.darrt.AbstractSchemaHandler | +--org.enableit.db.darrt.SchemaHandler
The entry point or facade for the library. External tools should only need to access this class.
This class expects always to have a reference and a target schema. Sometimes they may be taken from the same XML file, as in the case of installing a .dar file. On other occasions they may be completly separate as with the case of comparing two online datasources.
Either schema may be specified in a range of ways such as by setting
the URL where a darrt-schema
document may be found, specifying
online datasources or providing pre-instantiated object representations.
Field Summary |
Fields inherited from class org.enableit.db.darrt.AbstractFileHandler |
ABOUT |
Constructor Summary | |
SchemaHandler()
Default constructor. |
Method Summary | |
void |
alterSchema()
Compares the reference and target schemas, then modifies the target as necessary to match the reference. |
void |
changeTarget()
Changes the target database defined by the reference schema XML document to the values held in the target provider. |
void |
createSchema()
Creates the reference schema at the location identified first by the provider parameter or if null by the provider details inside the target schema. |
org.enableit.db.beans.Database |
export()
Export the schema identified by the reference provider property. |
java.util.List |
orderDependencies(org.enableit.db.beans.Schema schema)
Order the schema's tables for data import (i.e. |
Methods inherited from class org.enableit.db.darrt.AbstractSchemaHandler |
addListener, addListeners, diffSchemas, getDatabase, getDebug, getListeners, getOnlineRefSchema, getOnlineTargetSchema, getRefDatabase, getRefSchemaName, getRefSchemaUrl, getTablePattern, getTargetDatabase, getTargetSchemaUrl, setDebug, setOnlineRefSchema, setOnlineTargetSchema, setRefDatabase, setRefSchemaName, setRefSchemaUrl, setTablePattern, setTargetDatabase, setTargetSchemaUrl |
Methods inherited from class org.enableit.db.darrt.AbstractFileHandler |
getOperDir, setOperDir |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SchemaHandler()
Method Detail |
public org.enableit.db.beans.Database export()
Database
instance representing the exported schema.public void createSchema() throws SchemaHandlingException
Note that if this method is used to create a schema in a database where any tables exist with the same names, then those tables will be modified to fit the reference schema.
SchemaHandlingException
public void alterSchema() throws SchemaHandlingException
SchemaHandlingException
public void changeTarget() throws SchemaHandlingException
SchemaHandlingException
public java.util.List orderDependencies(org.enableit.db.beans.Schema schema)
schema
- The schema to order tables for.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |