|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectatg.adapter.gsa.GSARepositorySchemaGenerator
public class GSARepositorySchemaGenerator
This class is used to generate drop and alter a database schema required for a given repository. It uses the Apache DDLUtils tools for the actual schema manipulation. To use the class first initialize it's "model" by passing a GSARepository to the constructor. Afterwards you may invoke the action methods such as:
strict
property to true to always fail on error. The default is to continue on
error.
| Field Summary | |
|---|---|
org.apache.ddlutils.model.Database |
mDatabase
|
DatabaseTypeNameToJDBC |
mDatabaseTypeNameToJDBC
|
org.apache.ddlutils.Platform |
mPlatform
|
atg.adapter.gsa.GSARepository |
mRepository
|
| Constructor Summary | |
|---|---|
GSARepositorySchemaGenerator(atg.adapter.gsa.GSARepository pRepository)
Creates a new GSARepositorySchemaGenerator and initializes it with a model based upon the given repository. |
|
| Method Summary | |
|---|---|
void |
alterSchema(boolean pContinueOnError)
Alters the schema based on the current model. |
void |
buildModel(atg.adapter.gsa.GSARepository pRepository)
Initialize this class with a model for the given repository. |
void |
createSchema(boolean pContinueOnError,
boolean pDrop)
Creates the schema based on the current model. |
void |
dropSchema(boolean pContinueOnError)
Drops the schema based on the current model. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public atg.adapter.gsa.GSARepository mRepository
public org.apache.ddlutils.Platform mPlatform
public org.apache.ddlutils.model.Database mDatabase
public DatabaseTypeNameToJDBC mDatabaseTypeNameToJDBC
| Constructor Detail |
|---|
public GSARepositorySchemaGenerator(atg.adapter.gsa.GSARepository pRepository)
throws atg.repository.RepositoryException
pRepository -
atg.repository.RepositoryException| Method Detail |
|---|
public void buildModel(atg.adapter.gsa.GSARepository pRepository)
throws atg.repository.RepositoryException
pRepository -
atg.repository.RepositoryException
public void createSchema(boolean pContinueOnError,
boolean pDrop)
throws org.apache.ddlutils.DatabaseOperationException,
java.sql.SQLException
pContinueOnError - - If true, continue on error, else fail.pDrop - - If true, drops schema first before attempting to create it.
java.sql.SQLException
org.apache.ddlutils.DatabaseOperationException
public void dropSchema(boolean pContinueOnError)
throws org.apache.ddlutils.DatabaseOperationException,
java.sql.SQLException
pContinueOnError - - If true, continue on error, else fail.
java.sql.SQLException
org.apache.ddlutils.DatabaseOperationException
public void alterSchema(boolean pContinueOnError)
throws org.apache.ddlutils.DatabaseOperationException,
java.sql.SQLException
pContinueOnError - - If true, fail on error, else continue on error.
java.sql.SQLException
org.apache.ddlutils.DatabaseOperationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||