public interface Platform
| Modifier and Type | Method and Description |
|---|---|
void |
alterTables(Connection connection,
Database desiredDb,
boolean continueOnError)
Alters the database schema so that it match the given model.
|
void |
alterTables(Connection connection,
Database desiredDb,
CreationParameters params,
boolean continueOnError)
Alters the database schema so that it match the given model.
|
void |
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 |
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 |
alterTables(Database desiredDb,
boolean continueOnError)
Alters the database schema so that it match the given model.
|
void |
alterTables(Database desiredDb,
CreationParameters params,
boolean continueOnError)
Alters the database schema so that it match the given model.
|
void |
alterTables(String catalog,
String schema,
String[] tableTypes,
Database desiredDb,
boolean continueOnError)
Alters the database schema so that it match the given model.
|
void |
alterTables(String catalog,
String schema,
String[] tableTypes,
Database desiredDb,
CreationParameters params,
boolean continueOnError)
Alters the database schema so that it match the given model.
|
Connection |
borrowConnection()
Returns a (new) JDBC connection from the data source.
|
void |
createDatabase(String jdbcDriverClassName,
String connectionUrl,
String username,
String password,
Map parameters)
Creates the database specified by the given parameters.
|
void |
createTables(Connection connection,
Database model,
boolean dropTablesFirst,
boolean continueOnError)
Creates the tables defined in the database model.
|
void |
createTables(Connection connection,
Database model,
CreationParameters params,
boolean dropTablesFirst,
boolean continueOnError)
Creates the tables defined in the database model.
|
void |
createTables(Database model,
boolean dropTablesFirst,
boolean continueOnError)
Creates the tables defined in the database model.
|
void |
createTables(Database model,
CreationParameters params,
boolean dropTablesFirst,
boolean continueOnError)
Creates the tables defined in the database model.
|
void |
delete(Connection connection,
Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Deletes the row which maps to the given bean from the database.
|
void |
delete(Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Deletes the given bean from the database, assuming the primary key values are specified.
|
void |
dropDatabase(String jdbcDriverClassName,
String connectionUrl,
String username,
String password)
Drops the database specified by the given parameters.
|
void |
dropTable(Connection connection,
Database model,
Table table,
boolean continueOnError)
Drops the specified table and all foreign keys pointing to it.
|
void |
dropTable(Database model,
Table table,
boolean continueOnError)
Drops the specified table and all foreign keys pointing to it.
|
void |
dropTables(Connection connection,
Database model,
boolean continueOnError)
Drops the tables defined in the given database.
|
void |
dropTables(Database model,
boolean continueOnError)
Drops the tables defined in the given database.
|
int |
evaluateBatch(Connection connection,
String sql,
boolean continueOnError)
Executes a series of sql statements which must be seperated by the delimiter
configured as
PlatformInfo.getSqlCommandDelimiter() of the info object
of this platform. |
int |
evaluateBatch(String sql,
boolean continueOnError)
Executes a series of sql statements which must be seperated by the delimiter
configured as
PlatformInfo.getSqlCommandDelimiter() of the info object
of this platform. |
List |
fetch(Database model,
String sql)
Queries for a list of dyna beans representing rows of the given query.
|
List |
fetch(Database model,
String sql,
Collection parameters)
Queries for a list of dyna beans representing rows of the given query.
|
List |
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 |
fetch(Database model,
String sql,
Collection parameters,
Table[] queryHints)
Queries for a list of dyna beans representing rows of the given query.
|
List |
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 |
fetch(Database model,
String sql,
int start,
int end)
Queries for a list of dyna beans representing rows of the given query.
|
List |
fetch(Database model,
String sql,
Table[] queryHints)
Queries for a list of dyna beans representing rows of the given query.
|
List |
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 |
getAlterTablesSql(Connection connection,
Database desiredDb)
Returns the SQL for altering the database schema so that it match the given model.
|
String |
getAlterTablesSql(Connection connection,
Database desiredDb,
CreationParameters params)
Returns the SQL for altering the database schema so that it match the given model.
|
String |
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 |
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 |
getAlterTablesSql(Database desiredDb)
Returns the SQL for altering the database schema so that it match the given model.
|
String |
getAlterTablesSql(Database desiredDb,
CreationParameters params)
Returns the SQL for altering the database schema so that it match the given model.
|
String |
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 |
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 |
getCreateTablesSql(Database model,
boolean dropTablesFirst,
boolean continueOnError)
Returns the SQL for creating the tables defined in the database model.
|
String |
getCreateTablesSql(Database model,
CreationParameters params,
boolean dropTablesFirst,
boolean continueOnError)
Returns the SQL for creating the tables defined in the database model.
|
DataSource |
getDataSource()
Returns the data source that this platform uses to access the database.
|
String |
getDeleteSql(Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Returns the sql for deleting the given bean from the database.
|
String |
getDropTableSql(Database model,
Table table,
boolean continueOnError)
Returns the SQL for dropping the given table and all foreign keys pointing to it.
|
String |
getDropTablesSql(Database model,
boolean continueOnError)
Returns the SQL for dropping the tables defined in the given database.
|
String |
getInsertSql(Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Returns the sql for inserting the given bean.
|
JdbcModelReader |
getModelReader()
Returns the model reader (which reads a database model from a live database) for this platform.
|
String |
getName()
Returns the name of the database that this platform is for.
|
String |
getPassword()
Returns the password that this platform shall use to access the database.
|
PlatformInfo |
getPlatformInfo()
Returns the info object for this platform.
|
SqlBuilder |
getSqlBuilder()
Returns the sql builder for the this platform.
|
String |
getUpdateSql(Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Returns the sql for updating the given bean in the database.
|
String |
getUsername()
Returns the username that this platform shall use to access the database.
|
void |
insert(Connection connection,
Database model,
Collection dynaBeans)
Inserts the given beans.
|
void |
insert(Connection connection,
Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Inserts the bean.
|
void |
insert(Database model,
Collection dynaBeans)
Inserts the given beans in the database, assuming the primary key values are specified.
|
void |
insert(Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Inserts the given DynaBean in the database, assuming the primary key values are specified.
|
boolean |
isDelimitedIdentifierModeOn()
Determines whether delimited identifiers are used or normal SQL92 identifiers
(which may only contain alphanumerical characters and the underscore, must start
with a letter and cannot be a reserved keyword).
|
boolean |
isForeignKeysSorted()
Determines whether foreign keys of a table read from a live database
are alphabetically sorted.
|
boolean |
isIdentityOverrideOn()
Determines whether SQL insert statements can specify values for identity columns.
|
boolean |
isScriptModeOn()
Determines whether script mode is on.
|
boolean |
isSqlCommentsOn()
Determines whether SQL comments are generated.
|
Iterator |
query(Database model,
String sql)
Performs the given SQL query returning an iterator over the results.
|
Iterator |
query(Database model,
String sql,
Collection parameters)
Performs the given parameterized SQL query returning an iterator over the results.
|
Iterator |
query(Database model,
String sql,
Collection parameters,
Table[] queryHints)
Performs the given parameterized SQL query returning an iterator over the results.
|
Iterator |
query(Database model,
String sql,
Table[] queryHints)
Performs the given SQL query returning an iterator over the results.
|
Database |
readModelFromDatabase(Connection connection,
String name)
Reads the database model from the live database to which the given connection is pointing.
|
Database |
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 |
readModelFromDatabase(String name)
Reads the database model from the live database as specified by the data source set for
this platform.
|
Database |
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.
|
void |
returnConnection(Connection connection)
Closes the given JDBC connection (returns it back to the pool if the datasource is poolable).
|
void |
setDataSource(DataSource dataSource)
Sets the data source that this platform shall use to access the database.
|
void |
setDelimitedIdentifierModeOn(boolean delimitedIdentifierModeOn)
Specifies whether delimited identifiers are used or normal SQL92 identifiers.
|
void |
setForeignKeysSorted(boolean foreignKeysSorted)
Specifies whether foreign keys read from a live database, shall be
alphabetically sorted.
|
void |
setIdentityOverrideOn(boolean identityOverrideOn)
Specifies whether SQL insert statements can specify values for identity columns.
|
void |
setPassword(String password)
Sets the password that this platform shall use to access the database.
|
void |
setScriptModeOn(boolean scriptModeOn)
Specifies whether script mode is on.
|
void |
setSqlCommentsOn(boolean sqlCommentsOn)
Specifies whether SQL comments shall be generated.
|
void |
setUsername(String username)
Sets the username that this platform shall use to access the database.
|
void |
shutdownDatabase()
Performs a shutdown at the database.
|
void |
shutdownDatabase(Connection connection)
Performs a shutdown at the database.
|
void |
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 |
update(Connection connection,
Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Updates the row which maps to the given bean.
|
void |
update(Database model,
org.apache.commons.beanutils.DynaBean dynaBean)
Updates the given bean in the database, assuming the primary key values are specified.
|
String getName()
PlatformInfo getPlatformInfo()
SqlBuilder getSqlBuilder()
JdbcModelReader getModelReader()
DataSource getDataSource()
void setDataSource(DataSource dataSource)
dataSource - The data sourceString getUsername()
void setUsername(String username)
username - The usernameString getPassword()
void setPassword(String password)
password - The passwordboolean isScriptModeOn()
true if script mode is onvoid setScriptModeOn(boolean scriptModeOn)
scriptModeOn - true if script mode is onboolean isDelimitedIdentifierModeOn()
true if delimited identifiers are usedvoid setDelimitedIdentifierModeOn(boolean delimitedIdentifierModeOn)
delimitedIdentifierModeOn - true if delimited identifiers shall be usedboolean isSqlCommentsOn()
true if SQL comments shall be generatedvoid setSqlCommentsOn(boolean sqlCommentsOn)
sqlCommentsOn - true if SQL comments shall be generatedboolean isIdentityOverrideOn()
PlatformInfo.isIdentityOverrideAllowed()). If this is off, then the
insert methods will ignore values for identity columns.true if identity override is enabled (the default)void setIdentityOverrideOn(boolean identityOverrideOn)
PlatformInfo.isIdentityOverrideAllowed()). If this is off, then the
insert methods will ignore values for identity columns.identityOverrideOn - true if identity override is enabled (the default)boolean isForeignKeysSorted()
true if read foreign keys are sortedvoid setForeignKeysSorted(boolean foreignKeysSorted)
foreignKeysSorted - true if read foreign keys shall be sortedConnection borrowConnection() throws DatabaseOperationException
DatabaseOperationExceptionvoid returnConnection(Connection connection)
connection - The connectionint evaluateBatch(String sql, boolean continueOnError) throws DatabaseOperationException
PlatformInfo.getSqlCommandDelimiter() of the info object
of this platform.sql - The sql statements to executecontinueOnError - Whether to continue executing the sql commands when an error occurredDatabaseOperationExceptionint evaluateBatch(Connection connection, String sql, boolean continueOnError) throws DatabaseOperationException
PlatformInfo.getSqlCommandDelimiter() of the info object
of this platform.
TODO: consider outputting a collection of String or some kind of statement
object from the SqlBuilder instead of having to parse strings hereconnection - The connection to the databasesql - The sql statements to executecontinueOnError - Whether to continue executing the sql commands when an error occurredDatabaseOperationExceptionvoid shutdownDatabase()
throws DatabaseOperationException
DatabaseOperationExceptionvoid shutdownDatabase(Connection connection) throws DatabaseOperationException
connection - The connection to the databaseDatabaseOperationExceptionvoid createDatabase(String jdbcDriverClassName, String connectionUrl, String username, String password, Map parameters) throws DatabaseOperationException, UnsupportedOperationException
setDataSource(DataSource) because it is not possible to
retrieve the connection information from it without establishing a connection.jdbcDriverClassName - The jdbc driver class nameconnectionUrl - The url to connect to the database if it were already createdusername - The username for creating the databasepassword - The password for creating the databaseparameters - Additional parameters relevant to database creation (which are platform specific)DatabaseOperationExceptionUnsupportedOperationExceptionvoid dropDatabase(String jdbcDriverClassName, String connectionUrl, String username, String password) throws DatabaseOperationException, UnsupportedOperationException
setDataSource(DataSource) because it is not possible to
retrieve the connection information from it without establishing a connection.jdbcDriverClassName - The jdbc driver class nameconnectionUrl - The url to connect to the databaseusername - The username for creating the databasepassword - The password for creating the databaseDatabaseOperationExceptionUnsupportedOperationExceptionvoid createTables(Database model, boolean dropTablesFirst, boolean continueOnError) throws DatabaseOperationException
model - The database modeldropTablesFirst - Whether to drop the tables prior to creating them (anew)continueOnError - Whether to continue executing the sql commands when an error occurredDatabaseOperationExceptionvoid createTables(Connection connection, Database model, boolean dropTablesFirst, boolean continueOnError) throws DatabaseOperationException
connection - The connection to the databasemodel - The database modeldropTablesFirst - Whether to drop the tables prior to creating them (anew)continueOnError - Whether to continue executing the sql commands when an error occurredDatabaseOperationExceptionString getCreateTablesSql(Database model, boolean dropTablesFirst, boolean continueOnError)
model - The database modeldropTablesFirst - Whether to drop the tables prior to creating them (anew)continueOnError - Whether to continue executing the sql commands when an error occurredvoid createTables(Database model, CreationParameters params, boolean dropTablesFirst, boolean continueOnError) throws DatabaseOperationException
model - The database modelparams - The parameters used in the creationdropTablesFirst - Whether to drop the tables prior to creating them (anew)continueOnError - Whether to continue executing the sql commands when an error occurredDatabaseOperationExceptionvoid createTables(Connection connection, Database model, CreationParameters params, boolean dropTablesFirst, boolean continueOnError) throws DatabaseOperationException
connection - The connection to the databasemodel - The database modelparams - The parameters used in the creationdropTablesFirst - Whether to drop the tables prior to creating them (anew)continueOnError - Whether to continue executing the sql commands when an error occurredDatabaseOperationExceptionString getCreateTablesSql(Database model, CreationParameters params, boolean dropTablesFirst, boolean continueOnError)
model - The database modelparams - The parameters used in the creationdropTablesFirst - Whether to drop the tables prior to creating them (anew)continueOnError - Whether to continue executing the sql commands when an error occurredvoid alterTables(Database desiredDb, boolean continueOnError) throws DatabaseOperationException
desiredDb - The desired database schemacontinueOnError - Whether to continue with the next sql statement when an error occurredDatabaseOperationExceptionString getAlterTablesSql(Database desiredDb) throws DatabaseOperationException
desiredDb - The desired database schemaDatabaseOperationExceptionvoid alterTables(Database desiredDb, CreationParameters params, boolean continueOnError) throws DatabaseOperationException
desiredDb - The desired database schemaparams - The parameters used in the creationcontinueOnError - Whether to continue with the next sql statement when an error occurredDatabaseOperationExceptionString getAlterTablesSql(Database desiredDb, CreationParameters params) throws DatabaseOperationException
desiredDb - The desired database schemaparams - The parameters used in the creationDatabaseOperationExceptionvoid alterTables(String catalog, String schema, String[] tableTypes, Database desiredDb, boolean continueOnError) throws DatabaseOperationException
catalog - The catalog in the existing database to read (can be a pattern);
use null for the platform-specific default valueschema - The schema in the existing database to read (can be a pattern);
use null for the platform-specific default valuetableTypes - The table types to read from the existing database;
use null or an empty array for the platform-specific default valuedesiredDb - The desired database schemacontinueOnError - Whether to continue with the next sql statement when an error occurredDatabaseOperationExceptionString getAlterTablesSql(String catalog, String schema, String[] tableTypes, Database desiredDb) throws DatabaseOperationException
catalog - The catalog in the existing database to read (can be a pattern);
use null for the platform-specific default valueschema - The schema in the existing database to read (can be a pattern);
use null for the platform-specific default valuetableTypes - The table types to read from the existing database;
use null or an empty array for the platform-specific default valuedesiredDb - The desired database schemaDatabaseOperationExceptionvoid alterTables(String catalog, String schema, String[] tableTypes, Database desiredDb, CreationParameters params, boolean continueOnError) throws DatabaseOperationException
catalog - The catalog in the existing database to read (can be a pattern);
use null for the platform-specific default valueschema - The schema in the existing database to read (can be a pattern);
use null for the platform-specific default valuetableTypes - The table types to read from the existing database;
use null or an empty array for the platform-specific default valuedesiredDb - The desired database schemaparams - The parameters used in the creationcontinueOnError - Whether to continue with the next sql statement when an error occurredDatabaseOperationExceptionString getAlterTablesSql(String catalog, String schema, String[] tableTypes, Database desiredDb, CreationParameters params) throws DatabaseOperationException
catalog - The catalog in the existing database to read (can be a pattern);
use null for the platform-specific default valueschema - The schema in the existing database to read (can be a pattern);
use null for the platform-specific default valuetableTypes - The table types to read from the existing database;
use null or an empty array for the platform-specific default valuedesiredDb - The desired database schemaparams - The parameters used in the creationDatabaseOperationExceptionvoid alterTables(Connection connection, Database desiredDb, boolean continueOnError) throws DatabaseOperationException
connection - A connection to the existing database that shall be modifieddesiredDb - The desired database schemacontinueOnError - Whether to continue with the next sql statement when an error occurredDatabaseOperationExceptionString getAlterTablesSql(Connection connection, Database desiredDb) throws DatabaseOperationException
connection - A connection to the existing database that shall be modifieddesiredDb - The desired database schemaDatabaseOperationExceptionvoid alterTables(Connection connection, Database desiredDb, CreationParameters params, boolean continueOnError) throws DatabaseOperationException
connection - A connection to the existing database that shall be modifieddesiredDb - The desired database schemaparams - The parameters used in the creationcontinueOnError - Whether to continue with the next sql statement when an error occurredDatabaseOperationExceptionString getAlterTablesSql(Connection connection, Database desiredDb, CreationParameters params) throws DatabaseOperationException
connection - A connection to the existing database that shall be modifieddesiredDb - The desired database schemaparams - The parameters used in the creationDatabaseOperationExceptionvoid alterTables(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredDb, boolean continueOnError) throws DatabaseOperationException
connection - A connection to the existing database that shall be modifiedcatalog - The catalog in the existing database to read (can be a pattern);
use null for the platform-specific default valueschema - The schema in the existing database to read (can be a pattern);
use null for the platform-specific default valuetableTypes - The table types to read from the existing database;
use null or an empty array for the platform-specific default valuedesiredDb - The desired database schemacontinueOnError - Whether to continue with the next sql statement when an error occurredDatabaseOperationExceptionString getAlterTablesSql(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredDb) throws DatabaseOperationException
connection - A connection to the existing database that shall be modifiedcatalog - The catalog in the existing database to read (can be a pattern);
use null for the platform-specific default valueschema - The schema in the existing database to read (can be a pattern);
use null for the platform-specific default valuetableTypes - The table types to read from the existing database;
use null or an empty array for the platform-specific default valuedesiredDb - The desired database schemaDatabaseOperationExceptionvoid alterTables(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredDb, CreationParameters params, boolean continueOnError) throws DatabaseOperationException
connection - A connection to the existing database that shall be modifiedcatalog - The catalog in the existing database to read (can be a pattern);
use null for the platform-specific default valueschema - The schema in the existing database to read (can be a pattern);
use null for the platform-specific default valuetableTypes - The table types to read from the existing database;
use null or an empty array for the platform-specific default valuedesiredDb - The desired database schemaparams - The parameters used in the creationcontinueOnError - Whether to continue with the next sql statement when an error occurredDatabaseOperationExceptionString getAlterTablesSql(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredDb, CreationParameters params) throws DatabaseOperationException
connection - A connection to the existing database that shall be modifiedcatalog - The catalog in the existing database to read (can be a pattern);
use null for the platform-specific default valueschema - The schema in the existing database to read (can be a pattern);
use null for the platform-specific default valuetableTypes - The table types to read from the existing database;
use null or an empty array for the platform-specific default valuedesiredDb - The desired database schemaparams - The parameters used in the creationDatabaseOperationExceptionvoid dropTable(Database model, Table table, boolean continueOnError) throws DatabaseOperationException
model - The database modeltable - The table to dropcontinueOnError - Whether to continue executing the sql commands when an error occurredDatabaseOperationExceptionString getDropTableSql(Database model, Table table, boolean continueOnError)
model - The database modeltable - The table to dropcontinueOnError - Whether to continue executing the sql commands when an error occurredvoid dropTable(Connection connection, Database model, Table table, boolean continueOnError) throws DatabaseOperationException
connection - The connection to the databasemodel - The database modeltable - The table to dropcontinueOnError - Whether to continue executing the sql commands when an error occurredDatabaseOperationExceptionvoid dropTables(Database model, boolean continueOnError) throws DatabaseOperationException
model - The database modelcontinueOnError - Whether to continue executing the sql commands when an error occurredDatabaseOperationExceptionString getDropTablesSql(Database model, boolean continueOnError)
model - The database modelcontinueOnError - Whether to continue executing the sql commands when an error occurredvoid dropTables(Connection connection, Database model, boolean continueOnError) throws DatabaseOperationException
connection - The connection to the databasemodel - The database modelcontinueOnError - Whether to continue executing the sql commands when an error occurredDatabaseOperationExceptionIterator query(Database model, String sql) throws DatabaseOperationException
model - The database model to usesql - The sql query to performDatabaseOperationExceptionIterator query(Database model, String sql, Collection parameters) throws DatabaseOperationException
model - The database model to usesql - The sql query to performparameters - The query parameter valuesDatabaseOperationExceptionIterator query(Database model, String sql, Table[] queryHints) throws DatabaseOperationException
model - The database model to usesql - The sql query to performqueryHints - The tables that are queried (optional)DatabaseOperationExceptionIterator query(Database model, String sql, Collection parameters, Table[] queryHints) throws DatabaseOperationException
model - The database model to usesql - The sql query to performparameters - The query parameter valuesqueryHints - The tables that are queried (optional)DatabaseOperationExceptionList fetch(Database model, String sql) throws DatabaseOperationException
query(Database, String) method all beans will be
materialized and the connection will be closed before returning the beans.model - The database model to usesql - The sql queryDatabaseOperationExceptionList fetch(Database model, String sql, Collection parameters) throws DatabaseOperationException
query(Database, String, Collection) method
all beans will be materialized and the connection will be closed before
returning the beans.model - The database model to usesql - The parameterized queryparameters - The parameter valuesDatabaseOperationExceptionList fetch(Database model, String sql, Table[] queryHints) throws DatabaseOperationException
query(Database, String) method all beans will be
materialized and the connection will be closed before returning the beans.model - The database model to usesql - The sql queryqueryHints - The tables that are queried (optional)DatabaseOperationExceptionList fetch(Database model, String sql, Collection parameters, Table[] queryHints) throws DatabaseOperationException
query(Database, String, Collection) method
all beans will be materialized and the connection will be closed before
returning the beans.model - The database model to usesql - The parameterized queryparameters - The parameter valuesqueryHints - The tables that are queried (optional)DatabaseOperationExceptionList fetch(Database model, String sql, int start, int end) throws DatabaseOperationException
query(Database, String) method all beans will be
materialized and the connection will be closed before returning the beans.
Also, the two int parameters specify which rows of the result set to use.
If there are more rows than desired, they will be ignored (and not read
from the database).model - The database model to usesql - The sql querystart - Row number to start from (0 for first row)end - Row number to stop at (inclusively; -1 for last row)DatabaseOperationExceptionList fetch(Database model, String sql, Collection parameters, int start, int end) throws DatabaseOperationException
query(Database, String, Collection) method all
beans will be materialized and the connection will be closed before returning
the beans. Also, the two int parameters specify which rows of the result set
to use. If there are more rows than desired, they will be ignored (and not
read from the database).model - The database model to usesql - The parameterized sql queryparameters - The parameter valuesstart - Row number to start from (0 for first row)end - Row number to stop at (inclusively; -1 for last row)DatabaseOperationExceptionList fetch(Database model, String sql, Table[] queryHints, int start, int end) throws DatabaseOperationException
query(Database, String, Table[]) method all
beans will be materialized and the connection will be closed before
returning the beans. Also, the two int parameters specify which rows of
the result set to use. If there are more rows than desired, they will be
ignored (and not read from the database).model - The database model to usesql - The sql queryqueryHints - The tables that are queried (optional)start - Row number to start from (0 for first row)end - Row number to stop at (inclusively; -1 for last row)DatabaseOperationExceptionList fetch(Database model, String sql, Collection parameters, Table[] queryHints, int start, int end) throws DatabaseOperationException
query(Database, String, Collection, Table[])
method all beans will be materialized and the connection will be closed
before returning the beans. Also, the two int parameters specify which
rows of the result set to use. If there are more rows than desired, they
will be ignored (and not read from the database).model - The database model to usesql - The parameterized sql queryparameters - The parameter valuesqueryHints - The tables that are queried (optional)start - Row number to start from (0 for first row)end - Row number to stop at (inclusively; -1 for last row)DatabaseOperationExceptionvoid store(Database model, org.apache.commons.beanutils.DynaBean dynaBean) throws DatabaseOperationException
model - The database model to usedynaBean - The bean to storeDatabaseOperationExceptionString getInsertSql(Database model, org.apache.commons.beanutils.DynaBean dynaBean)
model - The database model to usedynaBean - The beanvoid insert(Database model, org.apache.commons.beanutils.DynaBean dynaBean) throws DatabaseOperationException
model - The database model to usedynaBean - The bean to insertDatabaseOperationExceptionvoid insert(Connection connection, Database model, org.apache.commons.beanutils.DynaBean dynaBean) throws DatabaseOperationException
connection - The database connectionmodel - The database model to usedynaBean - The beanDatabaseOperationExceptionvoid insert(Database model, Collection dynaBeans) throws DatabaseOperationException
model - The database model to usedynaBeans - The beans to insertDatabaseOperationExceptionvoid insert(Connection connection, Database model, Collection dynaBeans) throws DatabaseOperationException
connection - The database connectionmodel - The database model to usedynaBeans - The beansDatabaseOperationExceptionString getUpdateSql(Database model, org.apache.commons.beanutils.DynaBean dynaBean)
model - The database model to usedynaBean - The beanvoid update(Database model, org.apache.commons.beanutils.DynaBean dynaBean) throws DatabaseOperationException
model - The database model to usedynaBean - The beanDatabaseOperationExceptionvoid update(Connection connection, Database model, org.apache.commons.beanutils.DynaBean dynaBean) throws DatabaseOperationException
connection - The database connectionmodel - The database model to usedynaBean - The beanDatabaseOperationExceptionString getDeleteSql(Database model, org.apache.commons.beanutils.DynaBean dynaBean)
model - The database model to usedynaBean - The beanvoid delete(Database model, org.apache.commons.beanutils.DynaBean dynaBean) throws DatabaseOperationException
model - The database model to usedynaBean - The bean to deleteDatabaseOperationExceptionvoid delete(Connection connection, Database model, org.apache.commons.beanutils.DynaBean dynaBean) throws DatabaseOperationException
model - The database model to usedynaBean - The beanconnection - The database connectionDatabaseOperationExceptionDatabase readModelFromDatabase(String name) throws DatabaseOperationException
name - The name of the resulting database; null when the default name (the catalog)
is desired which might be null itself thoughDatabaseOperationException - If an error occurred during reading the modelDatabase readModelFromDatabase(String name, String catalog, String schema, String[] tableTypes) throws DatabaseOperationException
name - The name of the resulting database; null when the default name (the catalog)
is desired which might be null itself thoughcatalog - The catalog to access in the database; use null for the default valueschema - The schema to access in the database; use null for the default valuetableTypes - The table types to process; use null or an empty list for the default onesDatabaseOperationException - If an error occurred during reading the modelDatabase readModelFromDatabase(Connection connection, String name) throws DatabaseOperationException
connection - The connection to the databasename - The name of the resulting database; null when the default name (the catalog)
is desired which might be null itself thoughDatabaseOperationException - If an error occurred during reading the modelDatabase readModelFromDatabase(Connection connection, String name, String catalog, String schema, String[] tableTypes) throws DatabaseOperationException
connection - The connection to the databasename - The name of the resulting database; null when the default name (the catalog)
is desired which might be null itself thoughcatalog - The catalog to access in the database; use null for the default valueschema - The schema to access in the database; use null for the default valuetableTypes - The table types to process; use null or an empty list for the default onesDatabaseOperationException - If an error occurred during reading the modelCopyright © 2005-2013 Apache Software Foundation. All Rights Reserved.