| Package | Description |
|---|---|
| org.apache.ddlutils |
This package mainly contains the database platform abstraction,
Platform
and the factory to create instances for individual platforms,
PlatformFactory. |
| org.apache.ddlutils.alteration |
Contains the algorithm for comparing two database models and determining
what needs to be changed to migrate one to the other.
|
| org.apache.ddlutils.io |
The
org.apache.ddlutils.io package contains a classes for input
and output of both the database schemas and data files. |
| org.apache.ddlutils.model |
This package contains the classes making up the database model.
|
| org.apache.ddlutils.platform |
This package contains the platform implementations for the individual databases.
|
| org.apache.ddlutils.platform.db2 |
This package contains the platform implementation for the
DB2 UDB database.
|
| org.apache.ddlutils.platform.derby |
This package contains the platform implementation for the
Apache Derby database.
|
| org.apache.ddlutils.platform.firebird |
This package contains the platform implementation for the
Firebird database.
|
| org.apache.ddlutils.platform.hsqldb |
This package contains the platform implementation for the
HSQLDB database.
|
| org.apache.ddlutils.platform.interbase |
This package contains the platform implementation for the
Interbase database.
|
| org.apache.ddlutils.platform.maxdb |
This package contains the platform implementation for the
MaxDB database.
|
| org.apache.ddlutils.platform.mckoi |
This package contains the platform implementation for the
Mckoi database.
|
| org.apache.ddlutils.platform.mssql |
This package contains the platform implementation for the
Sql Server database.
|
| org.apache.ddlutils.platform.mysql |
This package contains the platform implementation for the
MySQL database.
|
| org.apache.ddlutils.platform.oracle |
This package contains the platform implementation for the
Oracle database.
|
| org.apache.ddlutils.platform.postgresql |
This package contains the platform implementation for the
PostgreSQL database.
|
| org.apache.ddlutils.platform.sapdb |
This package contains the platform implementation for the
SAP DB database.
|
| org.apache.ddlutils.platform.sybase |
This package contains the platform implementation for the
Sybase ASE database.
|
| org.apache.ddlutils.task |
The
org.apache.ddlutils.task package contains the Ant
tasks provided by DdlUtils. |
| org.apache.ddlutils.util |
The
org.apache.ddlutils.util package contains utility classes of DdlUtils. |
| Modifier and Type | Method and Description |
|---|---|
Database |
Platform.readModelFromDatabase(Connection connection,
String name)
Reads the database model from the live database to which the given connection is pointing.
|
Database |
Platform.readModelFromDatabase(Connection connection,
String name,
String catalog,
String schema,
String[] tableTypes)
Reads the database model from the live database to which the given connection is pointing.
|
Database |
Platform.readModelFromDatabase(String name)
Reads the database model from the live database as specified by the data source set for
this platform.
|
Database |
Platform.readModelFromDatabase(String name,
String catalog,
String schema,
String[] tableTypes)
Reads the database model from the live database as specified by the data source set for
this platform.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Platform.alterTables(Connection connection,
Database desiredDb,
boolean continueOnError)
Alters the database schema so that it match the given model.
|
void |
Platform.alterTables(Connection connection,
Database desiredDb,
CreationParameters params,
boolean continueOnError)
Alters the database schema so that it match the given model.
|
void |
Platform.alterTables(Connection connection,
String catalog,
String schema,
String[] tableTypes,
Database desiredDb,
boolean continueOnError)
Alters the database schema so that it match the given model.
|
void |
Platform.alterTables(Connection connection,
String catalog,
String schema,
String[] tableTypes,
Database desiredDb,
CreationParameters params,
boolean continueOnError)
Alters the database schema so that it match the given model.
|
void |
Platform.alterTables(Database desiredDb,
boolean continueOnError)
Alters the database schema so that it match the given model.
|
void |
Platform.alterTables(Database desiredDb,
CreationParameters params,
boolean continueOnError)
Alters the database schema so that it match the given model.
|
void |
Platform.alterTables(String catalog,
String schema,
String[] tableTypes,
Database desiredDb,
boolean continueOnError)
Alters the database schema so that it match the given model.
|
void |
Platform.alterTables(String catalog,
String schema,
String[] tableTypes,
Database desiredDb,
CreationParameters params,
boolean continueOnError)
Alters the database schema so that it match the given model.
|
void |
Platform.createTables(Connection connection,
Database model,
boolean dropTablesFirst,
boolean continueOnError)
Creates the tables defined in the database model.
|
void |
Platform.createTables(Connection connection,
Database model,
CreationParameters params,
boolean dropTablesFirst,
boolean continueOnError)
Creates the tables defined in the database model.
|
void |
Platform.createTables(Database model,
boolean dropTablesFirst,
boolean continueOnError)
Creates the tables defined in the database model.
|
void |
Platform.createTables(Database model,
CreationParameters params,
boolean dropTablesFirst,
boolean continueOnError)
Creates the tables defined in the database model.
|
void |
Platform.delete(Connection connection,
Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Deletes the row which maps to the given bean from the database.
|
void |
Platform.delete(Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Deletes the given bean from the database, assuming the primary key values are specified.
|
void |
Platform.dropTable(Connection connection,
Database model,
Table table,
boolean continueOnError)
Drops the specified table and all foreign keys pointing to it.
|
void |
Platform.dropTable(Database model,
Table table,
boolean continueOnError)
Drops the specified table and all foreign keys pointing to it.
|
void |
Platform.dropTables(Connection connection,
Database model,
boolean continueOnError)
Drops the tables defined in the given database.
|
void |
Platform.dropTables(Database model,
boolean continueOnError)
Drops the tables defined in the given database.
|
List |
Platform.fetch(Database model,
String sql)
Queries for a list of dyna beans representing rows of the given query.
|
List |
Platform.fetch(Database model,
String sql,
Collection parameters)
Queries for a list of dyna beans representing rows of the given query.
|
List |
Platform.fetch(Database model,
String sql,
Collection parameters,
int start,
int end)
Queries for a list of dyna beans representing rows of the given query.
|
List |
Platform.fetch(Database model,
String sql,
Collection parameters,
Table[] queryHints)
Queries for a list of dyna beans representing rows of the given query.
|
List |
Platform.fetch(Database model,
String sql,
Collection parameters,
Table[] queryHints,
int start,
int end)
Queries for a list of dyna beans representing rows of the given query.
|
List |
Platform.fetch(Database model,
String sql,
int start,
int end)
Queries for a list of dyna beans representing rows of the given query.
|
List |
Platform.fetch(Database model,
String sql,
Table[] queryHints)
Queries for a list of dyna beans representing rows of the given query.
|
List |
Platform.fetch(Database model,
String sql,
Table[] queryHints,
int start,
int end)
Queries for a list of dyna beans representing rows of the given query.
|
String |
Platform.getAlterTablesSql(Connection connection,
Database desiredDb)
Returns the SQL for altering the database schema so that it match the given model.
|
String |
Platform.getAlterTablesSql(Connection connection,
Database desiredDb,
CreationParameters params)
Returns the SQL for altering the database schema so that it match the given model.
|
String |
Platform.getAlterTablesSql(Connection connection,
String catalog,
String schema,
String[] tableTypes,
Database desiredDb)
Returns the SQL for altering the database schema so that it match the given model.
|
String |
Platform.getAlterTablesSql(Connection connection,
String catalog,
String schema,
String[] tableTypes,
Database desiredDb,
CreationParameters params)
Returns the SQL for altering the database schema so that it match the given model.
|
String |
Platform.getAlterTablesSql(Database desiredDb)
Returns the SQL for altering the database schema so that it match the given model.
|
String |
Platform.getAlterTablesSql(Database desiredDb,
CreationParameters params)
Returns the SQL for altering the database schema so that it match the given model.
|
String |
Platform.getAlterTablesSql(String catalog,
String schema,
String[] tableTypes,
Database desiredDb)
Returns the SQL for altering the database schema so that it match the given model.
|
String |
Platform.getAlterTablesSql(String catalog,
String schema,
String[] tableTypes,
Database desiredDb,
CreationParameters params)
Returns the SQL for altering the database schema so that it match the given model.
|
String |
Platform.getCreateTablesSql(Database model,
boolean dropTablesFirst,
boolean continueOnError)
Returns the SQL for creating the tables defined in the database model.
|
String |
Platform.getCreateTablesSql(Database model,
CreationParameters params,
boolean dropTablesFirst,
boolean continueOnError)
Returns the SQL for creating the tables defined in the database model.
|
String |
Platform.getDeleteSql(Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Returns the sql for deleting the given bean from the database.
|
String |
Platform.getDropTableSql(Database model,
Table table,
boolean continueOnError)
Returns the SQL for dropping the given table and all foreign keys pointing to it.
|
String |
Platform.getDropTablesSql(Database model,
boolean continueOnError)
Returns the SQL for dropping the tables defined in the given database.
|
String |
Platform.getInsertSql(Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Returns the sql for inserting the given bean.
|
String |
Platform.getUpdateSql(Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Returns the sql for updating the given bean in the database.
|
void |
Platform.insert(Connection connection,
Database model,
Collection dynaBeans)
Inserts the given beans.
|
void |
Platform.insert(Connection connection,
Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Inserts the bean.
|
void |
Platform.insert(Database model,
Collection dynaBeans)
Inserts the given beans in the database, assuming the primary key values are specified.
|
void |
Platform.insert(Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Inserts the given DynaBean in the database, assuming the primary key values are specified.
|
Iterator |
Platform.query(Database model,
String sql)
Performs the given SQL query returning an iterator over the results.
|
Iterator |
Platform.query(Database model,
String sql,
Collection parameters)
Performs the given parameterized SQL query returning an iterator over the results.
|
Iterator |
Platform.query(Database model,
String sql,
Collection parameters,
Table[] queryHints)
Performs the given parameterized SQL query returning an iterator over the results.
|
Iterator |
Platform.query(Database model,
String sql,
Table[] queryHints)
Performs the given SQL query returning an iterator over the results.
|
void |
Platform.store(Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Stores the given bean in the database, inserting it if there is no primary key
otherwise the bean is updated in the database.
|
void |
Platform.update(Connection connection,
Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Updates the row which maps to the given bean.
|
void |
Platform.update(Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Updates the given bean in the database, assuming the primary key values are specified.
|
| Modifier and Type | Method and Description |
|---|---|
void |
AddIndexChange.apply(Database database,
boolean caseSensitive)
Applies this change to the given database.
|
void |
ModelChange.apply(Database database,
boolean caseSensitive)
Applies this change to the given database.
|
void |
AddColumnChange.apply(Database database,
boolean caseSensitive)
Applies this change to the given database.
|
void |
RemoveColumnChange.apply(Database database,
boolean caseSensitive)
Applies this change to the given database.
|
void |
RemoveForeignKeyChange.apply(Database database,
boolean caseSensitive)
Applies this change to the given database.
|
void |
RemoveIndexChange.apply(Database database,
boolean caseSensitive)
Applies this change to the given database.
|
void |
RemoveTableChange.apply(Database database,
boolean caseSensitive)
Applies this change to the given database.
|
void |
AddTableChange.apply(Database database,
boolean caseSensitive)
Applies this change to the given database.
|
void |
AddForeignKeyChange.apply(Database database,
boolean caseSensitive)
Applies this change to the given database.
|
void |
AddPrimaryKeyChange.apply(Database database,
boolean caseSensitive)
Applies this change to the given database.
|
void |
RemovePrimaryKeyChange.apply(Database database,
boolean caseSensitive)
Applies this change to the given database.
|
void |
PrimaryKeyChange.apply(Database database,
boolean caseSensitive)
Applies this change to the given database.
|
void |
ColumnRequiredChange.apply(Database database,
boolean caseSensitive)
Applies this change to the given database.
|
void |
ColumnDefaultValueChange.apply(Database database,
boolean caseSensitive)
Applies this change to the given database.
|
void |
ColumnAutoIncrementChange.apply(Database database,
boolean caseSensitive)
Applies this change to the given database.
|
void |
ColumnOrderChange.apply(Database database,
boolean caseSensitive)
Applies this change to the given database.
|
void |
ColumnSizeChange.apply(Database database,
boolean caseSensitive)
Applies this change to the given database.
|
void |
ColumnDataTypeChange.apply(Database database,
boolean caseSensitive)
Applies this change to the given database.
|
List |
ModelComparator.compare(Database sourceModel,
Database targetModel)
Compares the two models and returns the changes necessary to create the second
model from the first one.
|
List |
ModelComparator.compareTables(Database sourceModel,
Table sourceTable,
Database targetModel,
Table targetTable)
Compares the two tables and returns the changes necessary to create the second
table from the first one.
|
| Modifier and Type | Method and Description |
|---|---|
Database |
DataReader.getModel()
Returns the database model.
|
Database |
DatabaseIO.read(File file)
Reads the database model contained in the specified file.
|
Database |
DatabaseIO.read(InputSource source)
Reads the database model from the given input source.
|
Database |
DatabaseIO.read(Reader reader)
Reads the database model given by the reader.
|
Database |
DatabaseIO.read(String filename)
Reads the database model contained in the specified file.
|
| Modifier and Type | Method and Description |
|---|---|
DataReader |
DatabaseDataIO.getConfiguredDataReader(Platform platform,
Database model)
Returns a data reader instance configured for the given platform (which needs to
be connected to a live database) and model.
|
void |
DataReader.setModel(Database model)
Sets the database model.
|
void |
DatabaseIO.write(Database model,
OutputStream output)
Writes the database model to the given output stream.
|
void |
DatabaseIO.write(Database model,
String filename)
Writes the database model to the specified file.
|
void |
DatabaseIO.write(Database model,
Writer output)
Writes the database model to the given output writer.
|
void |
DatabaseDataIO.writeDataToDatabase(Platform platform,
Database model,
InputStream[] inputs)
Reads the data from the given input streams and writes it to the database to which the given
platform is connected.
|
void |
DatabaseDataIO.writeDataToDatabase(Platform platform,
Database model,
Reader[] inputs)
Reads the data from the given input readers and writes it to the database to which the given
platform is connected.
|
void |
DatabaseDataIO.writeDataToDatabase(Platform platform,
Database model,
String[] files)
Reads the data from the indicated files and writes it to the database to which the given
platform is connected.
|
void |
DatabaseDataIO.writeDataToXML(Platform platform,
Database model,
DataWriter writer)
Writes the data contained in the database to which the given platform is connected, as XML
to the given data writer.
|
void |
DatabaseDataIO.writeDataToXML(Platform platform,
Database model,
OutputStream output,
String xmlEncoding)
Writes the data contained in the database to which the given platform is connected, as XML
to the given output stream (which won't be closed by this method).
|
void |
DatabaseDataIO.writeDataToXML(Platform platform,
Database model,
String path,
String xmlEncoding)
Writes the data contained in the database to which the given platform is connected, as XML
to the given output stream (which won't be closed by this method).
|
void |
DatabaseDataIO.writeDataToXML(Platform platform,
Database model,
Writer output,
String xmlEncoding)
Writes the data contained in the database to which the given platform is connected, as XML
to the given output writer (which won't be closed by this method).
|
void |
DataDtdWriter.writeDtd(Database model,
Writer output)
Writes the DTD for data xml files for the given database model, to the specified writer.
|
| Constructor and Description |
|---|
DataToDatabaseSink(Platform platform,
Database model)
Creates a new sink instance.
|
DynaSqlCreateRule(Database model,
Table table,
DataSink receiver)
Creates a new creation rule that creates dyna bean instances.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Database.mergeWith(Database otherDb)
Adds all tables from the other database to this database.
|
| Modifier and Type | Method and Description |
|---|---|
Database |
JdbcModelReader.getDatabase(Connection connection,
String name)
Reads the database model from the given connection.
|
Database |
JdbcModelReader.getDatabase(Connection connection,
String name,
String catalog,
String schema,
String[] tableTypes)
Reads the database model from the given connection.
|
Database |
PlatformImplBase.readModelFromDatabase(Connection connection,
String name)
Reads the database model from the live database to which the given connection is pointing.
|
Database |
PlatformImplBase.readModelFromDatabase(Connection connection,
String name,
String catalog,
String schema,
String[] tableTypes)
Reads the database model from the live database to which the given connection is pointing.
|
Database |
PlatformImplBase.readModelFromDatabase(String name)
Reads the database model from the live database as specified by the data source set for
this platform.
|
Database |
PlatformImplBase.readModelFromDatabase(String name,
String catalog,
String schema,
String[] tableTypes)
Reads the database model from the live database as specified by the data source set for
this platform.
|
| Modifier and Type | Method and Description |
|---|---|
void |
SqlBuilder.alterDatabase(Database currentModel,
Database desiredModel,
CreationParameters params)
Generates the DDL to modify an existing database so the schema matches
the specified database schema by using drops, modifications and additions.
|
void |
PlatformImplBase.alterTables(Connection connection,
Database desiredModel,
boolean continueOnError)
Alters the database schema so that it match the given model.
|
void |
PlatformImplBase.alterTables(Connection connection,
Database desiredModel,
CreationParameters params,
boolean continueOnError)
Alters the database schema so that it match the given model.
|
void |
PlatformImplBase.alterTables(Connection connection,
String catalog,
String schema,
String[] tableTypes,
Database desiredModel,
boolean continueOnError)
Alters the database schema so that it match the given model.
|
void |
PlatformImplBase.alterTables(Connection connection,
String catalog,
String schema,
String[] tableTypes,
Database desiredModel,
CreationParameters params,
boolean continueOnError)
Alters the database schema so that it match the given model.
|
void |
PlatformImplBase.alterTables(Database desiredDb,
boolean continueOnError)
Alters the database schema so that it match the given model.
|
void |
PlatformImplBase.alterTables(Database desiredDb,
CreationParameters params,
boolean continueOnError)
Alters the database schema so that it match the given model.
|
void |
PlatformImplBase.alterTables(String catalog,
String schema,
String[] tableTypes,
Database desiredModel,
boolean continueOnError)
Alters the database schema so that it match the given model.
|
void |
PlatformImplBase.alterTables(String catalog,
String schema,
String[] tableTypes,
Database desiredModel,
CreationParameters params,
boolean continueOnError)
Alters the database schema so that it match the given model.
|
protected String |
PlatformImplBase.createDeleteSql(Database model,
SqlDynaClass dynaClass,
SqlDynaProperty[] primaryKeys,
org.apache.commons.beanutils.DynaBean bean)
Creates the SQL for deleting an object of the given type.
|
void |
SqlBuilder.createExternalForeignKeys(Database database)
Creates the external foreignkey creation statements for all tables in the database.
|
void |
SqlBuilder.createExternalForeignKeys(Database database,
Table table)
Creates external foreignkey creation statements if necessary.
|
protected String |
PlatformImplBase.createInsertSql(Database model,
SqlDynaClass dynaClass,
SqlDynaProperty[] properties,
org.apache.commons.beanutils.DynaBean bean)
Creates the SQL for inserting an object of the given type.
|
protected ModelBasedResultSetIterator |
PlatformImplBase.createResultSetIterator(Database model,
ResultSet resultSet,
Table[] queryHints)
Creates an iterator over the given result set.
|
protected String |
PlatformImplBase.createSelectLastInsertIdSql(Database model,
SqlDynaClass dynaClass)
Creates the SQL for querying for the id generated by the last insert of an object of the given type.
|
void |
SqlBuilder.createTable(Database database,
Table table)
Outputs the DDL to create the table along with any non-external constraints as well
as with external primary keys and indices (but not foreign keys).
|
void |
SqlBuilder.createTable(Database database,
Table table,
Map parameters)
Outputs the DDL to create the table along with any non-external constraints as well
as with external primary keys and indices (but not foreign keys).
|
void |
PlatformImplBase.createTables(Connection connection,
Database model,
boolean dropTablesFirst,
boolean continueOnError)
Creates the tables defined in the database model.
|
void |
PlatformImplBase.createTables(Connection connection,
Database model,
CreationParameters params,
boolean dropTablesFirst,
boolean continueOnError)
Creates the tables defined in the database model.
|
void |
SqlBuilder.createTables(Database database)
Outputs the DDL required to drop and (re)create all tables in the database model.
|
void |
SqlBuilder.createTables(Database database,
boolean dropTables)
Outputs the DDL required to drop (if requested) and (re)create all tables in the database model.
|
void |
PlatformImplBase.createTables(Database model,
boolean dropTablesFirst,
boolean continueOnError)
Creates the tables defined in the database model.
|
void |
SqlBuilder.createTables(Database database,
CreationParameters params,
boolean dropTables)
Outputs the DDL required to drop (if requested) and (re)create all tables in the database model.
|
void |
PlatformImplBase.createTables(Database model,
CreationParameters params,
boolean dropTablesFirst,
boolean continueOnError)
Creates the tables defined in the database model.
|
protected void |
SqlBuilder.createTemporaryTable(Database database,
Table table,
Map parameters)
Outputs the DDL to create the given temporary table.
|
protected String |
PlatformImplBase.createUpdateSql(Database model,
SqlDynaClass dynaClass,
SqlDynaProperty[] primaryKeys,
SqlDynaProperty[] properties,
org.apache.commons.beanutils.DynaBean bean)
Creates the SQL for updating an object of the given type.
|
void |
PlatformImplBase.delete(Connection connection,
Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Deletes the row which maps to the given bean from the database.
|
void |
PlatformImplBase.delete(Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Deletes the given bean from the database, assuming the primary key values are specified.
|
void |
PlatformImplBase.dropTable(Connection connection,
Database model,
Table table,
boolean continueOnError)
Drops the specified table and all foreign keys pointing to it.
|
void |
SqlBuilder.dropTable(Database database,
Table table)
Outputs the DDL required to drop the given table.
|
void |
PlatformImplBase.dropTable(Database model,
Table table,
boolean continueOnError)
Drops the specified table and all foreign keys pointing to it.
|
void |
PlatformImplBase.dropTables(Connection connection,
Database model,
boolean continueOnError)
Drops the tables defined in the given database.
|
void |
SqlBuilder.dropTables(Database database)
Outputs the DDL required to drop the database.
|
void |
PlatformImplBase.dropTables(Database model,
boolean continueOnError)
Drops the tables defined in the given database.
|
protected void |
SqlBuilder.dropTemporaryTable(Database database,
Table table)
Outputs the DDL to drop the given temporary table.
|
List |
PlatformImplBase.fetch(Database model,
String sql)
Queries for a list of dyna beans representing rows of the given query.
|
List |
PlatformImplBase.fetch(Database model,
String sql,
Collection parameters)
Queries for a list of dyna beans representing rows of the given query.
|
List |
PlatformImplBase.fetch(Database model,
String sql,
Collection parameters,
int start,
int end)
Queries for a list of dyna beans representing rows of the given query.
|
List |
PlatformImplBase.fetch(Database model,
String sql,
Collection parameters,
Table[] queryHints)
Queries for a list of dyna beans representing rows of the given query.
|
List |
PlatformImplBase.fetch(Database model,
String sql,
Collection parameters,
Table[] queryHints,
int start,
int end)
Queries for a list of dyna beans representing rows of the given query.
|
List |
PlatformImplBase.fetch(Database model,
String sql,
int start,
int end)
Queries for a list of dyna beans representing rows of the given query.
|
List |
PlatformImplBase.fetch(Database model,
String sql,
Table[] queryHints)
Queries for a list of dyna beans representing rows of the given query.
|
List |
PlatformImplBase.fetch(Database model,
String sql,
Table[] queryHints,
int start,
int end)
Queries for a list of dyna beans representing rows of the given query.
|
String |
PlatformImplBase.getAlterTablesSql(Connection connection,
Database desiredModel)
Returns the SQL for altering the database schema so that it match the given model.
|
String |
PlatformImplBase.getAlterTablesSql(Connection connection,
Database desiredModel,
CreationParameters params)
Returns the SQL for altering the database schema so that it match the given model.
|
String |
PlatformImplBase.getAlterTablesSql(Connection connection,
String catalog,
String schema,
String[] tableTypes,
Database desiredModel)
Returns the SQL for altering the database schema so that it match the given model.
|
String |
PlatformImplBase.getAlterTablesSql(Connection connection,
String catalog,
String schema,
String[] tableTypes,
Database desiredModel,
CreationParameters params)
Returns the SQL for altering the database schema so that it match the given model.
|
String |
PlatformImplBase.getAlterTablesSql(Database desiredDb)
Returns the SQL for altering the database schema so that it match the given model.
|
String |
PlatformImplBase.getAlterTablesSql(Database desiredDb,
CreationParameters params)
Returns the SQL for altering the database schema so that it match the given model.
|
String |
PlatformImplBase.getAlterTablesSql(String catalog,
String schema,
String[] tableTypes,
Database desiredModel)
Returns the SQL for altering the database schema so that it match the given model.
|
String |
PlatformImplBase.getAlterTablesSql(String catalog,
String schema,
String[] tableTypes,
Database desiredModel,
CreationParameters params)
Returns the SQL for altering the database schema so that it match the given model.
|
String |
PlatformImplBase.getCreateTablesSql(Database model,
boolean dropTablesFirst,
boolean continueOnError)
Returns the SQL for creating the tables defined in the database model.
|
String |
PlatformImplBase.getCreateTablesSql(Database model,
CreationParameters params,
boolean dropTablesFirst,
boolean continueOnError)
Returns the SQL for creating the tables defined in the database model.
|
String |
PlatformImplBase.getDeleteSql(Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Returns the sql for deleting the given bean from the database.
|
String |
PlatformImplBase.getDropTableSql(Database model,
Table table,
boolean continueOnError)
Returns the SQL for dropping the given table and all foreign keys pointing to it.
|
String |
PlatformImplBase.getDropTablesSql(Database model,
boolean continueOnError)
Returns the SQL for dropping the tables defined in the given database.
|
String |
PlatformImplBase.getInsertSql(Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Returns the sql for inserting the given bean.
|
protected Table |
SqlBuilder.getRealTargetTableFor(Database targetModel,
Table sourceTable,
Table targetTable)
Creates the target table object that differs from the given target table only in the
indices.
|
protected Table |
SqlBuilder.getTemporaryTableFor(Database targetModel,
Table targetTable)
Creates a temporary table object that corresponds to the given table.
|
String |
PlatformImplBase.getUpdateSql(Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Returns the sql for updating the given bean in the database.
|
void |
PlatformImplBase.insert(Connection connection,
Database model,
Collection dynaBeans)
Inserts the given beans.
|
void |
PlatformImplBase.insert(Connection connection,
Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Inserts the bean.
|
void |
PlatformImplBase.insert(Database model,
Collection dynaBeans)
Inserts the given beans in the database, assuming the primary key values are specified.
|
void |
PlatformImplBase.insert(Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Inserts the given DynaBean in the database, assuming the primary key values are specified.
|
protected void |
PlatformImplBase.postprocessModelFromDatabase(Database model)
Allows the platform to postprocess the model just read from the database.
|
protected void |
SqlBuilder.processChange(Database currentModel,
Database desiredModel,
AddPrimaryKeyChange change)
Processes the addition of a primary key to a table.
|
protected void |
SqlBuilder.processChange(Database currentModel,
Database desiredModel,
CreationParameters params,
AddForeignKeyChange change)
Processes the change representing the addition of a foreign key.
|
protected void |
SqlBuilder.processChange(Database currentModel,
Database desiredModel,
CreationParameters params,
AddIndexChange change)
Processes the change representing the addition of an index.
|
protected void |
SqlBuilder.processChange(Database currentModel,
Database desiredModel,
CreationParameters params,
AddTableChange change)
Processes the change representing the addition of a table.
|
protected void |
SqlBuilder.processChange(Database currentModel,
Database desiredModel,
CreationParameters params,
ModelChange change)
This is a fall-through callback which generates a warning because a specific
change type wasn't handled.
|
protected void |
SqlBuilder.processChange(Database currentModel,
Database desiredModel,
CreationParameters params,
RemoveForeignKeyChange change)
Processes the change representing the removal of a foreign key.
|
protected void |
SqlBuilder.processChange(Database currentModel,
Database desiredModel,
CreationParameters params,
RemoveIndexChange change)
Processes the change representing the removal of an index.
|
protected void |
SqlBuilder.processChange(Database currentModel,
Database desiredModel,
CreationParameters params,
RemoveTableChange change)
Processes the change representing the removal of a table.
|
protected void |
SqlBuilder.processChanges(Database currentModel,
Database desiredModel,
List changes,
CreationParameters params)
Processes the changes.
|
protected void |
SqlBuilder.processTableStructureChanges(Database currentModel,
Database desiredModel,
CreationParameters params,
Collection changes)
Processes the changes to the structure of tables.
|
protected void |
SqlBuilder.processTableStructureChanges(Database currentModel,
Database desiredModel,
String tableName,
Map parameters,
List changes)
Processes the changes to the structure of a single table.
|
protected void |
SqlBuilder.processTableStructureChanges(Database currentModel,
Database desiredModel,
Table sourceTable,
Table targetTable,
Map parameters,
List changes)
Allows database-specific implementations to handle changes in a database
specific manner.
|
Iterator |
PlatformImplBase.query(Database model,
String sql)
Performs the given SQL query returning an iterator over the results.
|
Iterator |
PlatformImplBase.query(Database model,
String sql,
Collection parameters)
Performs the given parameterized SQL query returning an iterator over the results.
|
Iterator |
PlatformImplBase.query(Database model,
String sql,
Collection parameters,
Table[] queryHints)
Performs the given parameterized SQL query returning an iterator over the results.
|
Iterator |
PlatformImplBase.query(Database model,
String sql,
Table[] queryHints)
Performs the given SQL query returning an iterator over the results.
|
protected void |
JdbcModelReader.sortForeignKeys(Database model)
Sorts the foreign keys in the tables of the model.
|
void |
PlatformImplBase.store(Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Stores the given bean in the database, inserting it if there is no primary key
otherwise the bean is updated in the database.
|
void |
PlatformImplBase.update(Connection connection,
Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Updates the row which maps to the given bean.
|
void |
PlatformImplBase.update(Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Updates the given bean in the database, assuming the primary key values are specified.
|
protected void |
SqlBuilder.writeEmbeddedForeignKeysStmt(Database database,
Table table)
Writes the foreign key constraints inside a create table () clause.
|
protected void |
SqlBuilder.writeExternalForeignKeyCreateStmt(Database database,
Table table,
ForeignKey key)
Writes a single foreign key constraint using a alter table statement.
|
protected void |
SqlBuilder.writeTableCreationStmt(Database database,
Table table,
Map parameters)
Writes the table creation statement without the statement end.
|
| Constructor and Description |
|---|
ModelBasedResultSetIterator(PlatformImplBase platform,
Database model,
ResultSet resultSet,
Table[] queryHints,
boolean cleanUpAfterFinish)
Creates a new iterator.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
Db2Builder.processChange(Database currentModel,
Database desiredModel,
AddColumnChange change)
Processes the addition of a column to a table.
|
protected void |
Db2Builder.processChange(Database currentModel,
Database desiredModel,
PrimaryKeyChange change)
Processes the change of the primary key of a table.
|
protected void |
Db2Builder.processChange(Database currentModel,
Database desiredModel,
RemoveColumnChange change)
Processes the removal of a column from a table.
|
protected void |
Db2Builder.processChange(Database currentModel,
Database desiredModel,
RemovePrimaryKeyChange change)
Processes the removal of a primary key from a table.
|
protected void |
Db2Builder.processTableStructureChanges(Database currentModel,
Database desiredModel,
Table sourceTable,
Table targetTable,
Map parameters,
List changes)
Allows database-specific implementations to handle changes in a database
specific manner.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
DerbyBuilder.processChange(Database currentModel,
Database desiredModel,
AddColumnChange change)
Processes the addition of a column to a table.
|
protected void |
DerbyBuilder.processTableStructureChanges(Database currentModel,
Database desiredModel,
Table sourceTable,
Table targetTable,
Map parameters,
List changes)
Allows database-specific implementations to handle changes in a database
specific manner.
|
| Modifier and Type | Method and Description |
|---|---|
void |
FirebirdBuilder.createExternalForeignKeys(Database database)
Creates the external foreignkey creation statements for all tables in the database.
|
void |
FirebirdBuilder.createTable(Database database,
Table table,
Map parameters)
Outputs the DDL to create the table along with any non-external constraints as well
as with external primary keys and indices (but not foreign keys).
|
protected void |
FirebirdBuilder.processChange(Database currentModel,
Database desiredModel,
AddColumnChange change)
Processes the addition of a column to a table.
|
protected void |
FirebirdBuilder.processChange(Database currentModel,
Database desiredModel,
RemoveColumnChange change)
Processes the removal of a column from a table.
|
protected void |
FirebirdBuilder.processTableStructureChanges(Database currentModel,
Database desiredModel,
Table sourceTable,
Table targetTable,
Map parameters,
List changes)
Allows database-specific implementations to handle changes in a database
specific manner.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
HsqlDbBuilder.processChange(Database currentModel,
Database desiredModel,
AddColumnChange change)
Processes the addition of a column to a table.
|
protected void |
HsqlDbBuilder.processChange(Database currentModel,
Database desiredModel,
RemoveColumnChange change)
Processes the removal of a column from a table.
|
protected void |
HsqlDbBuilder.processTableStructureChanges(Database currentModel,
Database desiredModel,
Table sourceTable,
Table targetTable,
Map parameters,
List changes)
Allows database-specific implementations to handle changes in a database
specific manner.
|
| Modifier and Type | Method and Description |
|---|---|
void |
InterbaseBuilder.createTable(Database database,
Table table,
Map parameters)
Outputs the DDL to create the table along with any non-external constraints as well
as with external primary keys and indices (but not foreign keys).
|
protected void |
InterbaseBuilder.processChange(Database currentModel,
Database desiredModel,
AddColumnChange change)
Processes the addition of a column to a table.
|
protected void |
InterbaseBuilder.processChange(Database currentModel,
Database desiredModel,
RemoveColumnChange change)
Processes the removal of a column from a table.
|
protected void |
InterbaseBuilder.processTableStructureChanges(Database currentModel,
Database desiredModel,
Table sourceTable,
Table targetTable,
Map parameters,
List changes)
Allows database-specific implementations to handle changes in a database
specific manner.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
MaxDbBuilder.writeExternalForeignKeyCreateStmt(Database database,
Table table,
ForeignKey key)
Writes a single foreign key constraint using a alter table statement.
|
| Modifier and Type | Method and Description |
|---|---|
void |
MckoiBuilder.createTable(Database database,
Table table,
Map parameters)
Outputs the DDL to create the table along with any non-external constraints as well
as with external primary keys and indices (but not foreign keys).
|
protected void |
MckoiBuilder.processTableStructureChanges(Database currentModel,
Database desiredModel,
Table sourceTable,
Table targetTable,
Map parameters,
List changes)
Allows database-specific implementations to handle changes in a database
specific manner.
|
| Modifier and Type | Method and Description |
|---|---|
void |
MSSqlBuilder.createTable(Database database,
Table table,
Map parameters)
Outputs the DDL to create the table along with any non-external constraints as well
as with external primary keys and indices (but not foreign keys).
|
protected void |
MSSqlBuilder.processChange(Database currentModel,
Database desiredModel,
AddColumnChange change)
Processes the addition of a column to a table.
|
protected void |
MSSqlBuilder.processChange(Database currentModel,
Database desiredModel,
RemoveColumnChange change)
Processes the removal of a column from a table.
|
protected void |
MSSqlBuilder.processChange(Database currentModel,
Database desiredModel,
RemovePrimaryKeyChange change)
Processes the removal of a primary key from a table.
|
protected void |
MSSqlBuilder.processChanges(Database currentModel,
Database desiredModel,
List changes,
CreationParameters params)
Processes the changes.
|
protected void |
MSSqlBuilder.processTableStructureChanges(Database currentModel,
Database desiredModel,
Table sourceTable,
Table targetTable,
Map parameters,
List changes)
Allows database-specific implementations to handle changes in a database
specific manner.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
MySqlBuilder.processChange(Database currentModel,
Database desiredModel,
AddColumnChange change)
Processes the addition of a column to a table.
|
protected void |
MySqlBuilder.processChange(Database currentModel,
Database desiredModel,
PrimaryKeyChange change)
Processes the change of the primary key of a table.
|
protected void |
MySqlBuilder.processChange(Database currentModel,
Database desiredModel,
RemoveColumnChange change)
Processes the removal of a column from a table.
|
protected void |
MySqlBuilder.processChange(Database currentModel,
Database desiredModel,
RemovePrimaryKeyChange change)
Processes the removal of a primary key from a table.
|
protected void |
MySqlBuilder.processTableStructureChanges(Database currentModel,
Database desiredModel,
Table sourceTable,
Table targetTable,
Map parameters,
List changes)
Allows database-specific implementations to handle changes in a database
specific manner.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Oracle8Builder.createTable(Database database,
Table table,
Map parameters)
Outputs the DDL to create the table along with any non-external constraints as well
as with external primary keys and indices (but not foreign keys).
|
protected void |
Oracle8Builder.createTemporaryTable(Database database,
Table table,
Map parameters)
Outputs the DDL to create the given temporary table.
|
protected void |
Oracle8Builder.dropTemporaryTable(Database database,
Table table)
Outputs the DDL to drop the given temporary table.
|
protected void |
Oracle8Builder.processChange(Database currentModel,
Database desiredModel,
AddColumnChange change)
Processes the addition of a column to a table.
|
protected void |
Oracle8Builder.processChange(Database currentModel,
Database desiredModel,
RemoveColumnChange change)
Processes the removal of a column from a table.
|
protected void |
Oracle8Builder.processChange(Database currentModel,
Database desiredModel,
RemovePrimaryKeyChange change)
Processes the removal of a primary key from a table.
|
protected void |
Oracle8Builder.processTableStructureChanges(Database currentModel,
Database desiredModel,
Table sourceTable,
Table targetTable,
Map parameters,
List changes)
Allows database-specific implementations to handle changes in a database
specific manner.
|
| Modifier and Type | Method and Description |
|---|---|
void |
PostgreSqlBuilder.createTable(Database database,
Table table,
Map parameters)
Outputs the DDL to create the table along with any non-external constraints as well
as with external primary keys and indices (but not foreign keys).
|
protected void |
PostgreSqlBuilder.processChange(Database currentModel,
Database desiredModel,
AddColumnChange change)
Processes the addition of a column to a table.
|
protected void |
PostgreSqlBuilder.processChange(Database currentModel,
Database desiredModel,
RemoveColumnChange change)
Processes the removal of a column from a table.
|
protected void |
PostgreSqlBuilder.processTableStructureChanges(Database currentModel,
Database desiredModel,
Table sourceTable,
Table targetTable,
Map parameters,
List changes)
Allows database-specific implementations to handle changes in a database
specific manner.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
SapDbBuilder.processChange(Database currentModel,
Database desiredModel,
AddColumnChange change)
Processes the addition of a column to a table.
|
protected void |
SapDbBuilder.processChange(Database currentModel,
Database desiredModel,
ColumnDefaultValueChange change)
Processes the change of the default value of a column.
|
protected void |
SapDbBuilder.processChange(Database currentModel,
Database desiredModel,
ColumnRequiredChange change)
Processes the change of the required constraint of a column.
|
protected void |
SapDbBuilder.processChange(Database currentModel,
Database desiredModel,
RemoveColumnChange change)
Processes the removal of a column from a table.
|
protected void |
SapDbBuilder.processChange(Database currentModel,
Database desiredModel,
RemovePrimaryKeyChange change)
Processes the removal of a primary key from a table.
|
protected void |
SapDbBuilder.processTableStructureChanges(Database currentModel,
Database desiredModel,
Table sourceTable,
Table targetTable,
Map parameters,
List changes)
Allows database-specific implementations to handle changes in a database
specific manner.
|
protected void |
SapDbBuilder.writeExternalForeignKeyCreateStmt(Database database,
Table table,
ForeignKey key)
Writes a single foreign key constraint using a alter table statement.
|
| Modifier and Type | Method and Description |
|---|---|
void |
SybaseBuilder.createTable(Database database,
Table table,
Map parameters)
Outputs the DDL to create the table along with any non-external constraints as well
as with external primary keys and indices (but not foreign keys).
|
List |
SybasePlatform.fetch(Database model,
String sql,
Collection parameters,
Table[] queryHints,
int start,
int end)
Queries for a list of dyna beans representing rows of the given query.
|
List |
SybasePlatform.fetch(Database model,
String sql,
Table[] queryHints,
int start,
int end)
Queries for a list of dyna beans representing rows of the given query.
|
protected void |
SybaseBuilder.processChange(Database currentModel,
Database desiredModel,
AddColumnChange change)
Processes the addition of a column to a table.
|
protected void |
SybaseBuilder.processChange(Database currentModel,
Database desiredModel,
ColumnDefaultValueChange change)
Processes the change of the default value of a column.
|
protected void |
SybaseBuilder.processChange(Database currentModel,
Database desiredModel,
RemoveColumnChange change)
Processes the removal of a column from a table.
|
protected void |
SybaseBuilder.processChange(Database currentModel,
Database desiredModel,
RemovePrimaryKeyChange change)
Processes the removal of a primary key from a table.
|
protected void |
SybaseBuilder.processChanges(Database currentModel,
Database desiredModel,
List changes,
CreationParameters params)
Processes the changes.
|
protected void |
SybaseBuilder.processTableStructureChanges(Database currentModel,
Database desiredModel,
Table sourceTable,
Table targetTable,
Map parameters,
List changes)
Allows database-specific implementations to handle changes in a database
specific manner.
|
Iterator |
SybasePlatform.query(Database model,
String sql,
Collection parameters,
Table[] queryHints)
Performs the given parameterized SQL query returning an iterator over the results.
|
Iterator |
SybasePlatform.query(Database model,
String sql,
Table[] queryHints)
Performs the given SQL query returning an iterator over the results.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract Database |
DatabaseTaskBase.readModel()
Reads the database model on which the commands will work.
|
protected Database |
DatabaseToDdlTask.readModel()
Reads the database model on which the commands will work.
|
protected Database |
DdlToDatabaseTask.readModel()
Reads the database model on which the commands will work.
|
| Modifier and Type | Method and Description |
|---|---|
void |
WriteSchemaToFileCommand.execute(DatabaseTaskBase task,
Database model)
Executes this command.
|
abstract void |
Command.execute(DatabaseTaskBase task,
Database model)
Executes this command.
|
void |
WriteDataToFileCommand.execute(DatabaseTaskBase task,
Database model)
Executes this command.
|
void |
DropDatabaseCommand.execute(DatabaseTaskBase task,
Database model)
Executes this command.
|
void |
WriteDtdToFileCommand.execute(DatabaseTaskBase task,
Database model)
Executes this command.
|
void |
WriteSchemaSqlToFileCommand.execute(DatabaseTaskBase task,
Database model)
Executes this command.
|
void |
WriteDataToDatabaseCommand.execute(DatabaseTaskBase task,
Database model)
Executes this command.
|
void |
WriteSchemaToDatabaseCommand.execute(DatabaseTaskBase task,
Database model)
Executes this command.
|
void |
CreateDatabaseCommand.execute(DatabaseTaskBase task,
Database model)
Executes this command.
|
protected void |
DatabaseTaskBase.executeCommands(Database model)
Executes the commands.
|
protected CreationParameters |
DatabaseCommandWithCreationParameters.getFilteredParameters(Database model,
String platformName,
boolean isCaseSensitive)
Filters the parameters for the given model and platform.
|
| Modifier and Type | Method and Description |
|---|---|
void |
DatabaseTestHelper.assertHasSameData(Database model,
Platform origDbPlatform,
Platform testedDbPlatform)
Asserts that the data in the tables described by the given model is the same in the
database accessed by the second platform as is in the database accessed by the first platform.
|
void |
DatabaseTestHelper.assertHasSameData(String failureMsg,
Database model,
Platform origDbPlatform,
Platform testedDbPlatform)
Asserts that the data in the tables described by the given model is the same in the
database accessed by the second platform as is in the database accessed by the first platform.
|
Copyright © 2005-2013 Apache Software Foundation. All Rights Reserved.