DbAccessor, ConnectionProviderpublic class Manager extends java.lang.Object implements DbAccessor
| Modifier and Type | Class | Description |
|---|---|---|
static class |
Manager.MigrationComparator |
| Modifier and Type | Method | Description |
|---|---|---|
void |
add(Migration... migrations) |
Add Migrations to the set..
|
void |
add(java.lang.Class<? extends Migration> aMigration) |
Add a Migration to the set.
|
void |
clear() |
Clear the set of migrations.
|
void |
doMigrations() |
Do migrations as needed.
|
void |
enableMigrations() |
Enable migration management in the database.
|
java.sql.Connection |
getConnection() |
Get a JDBC database connection.
|
ConnectionProvider |
getConnectionProvider() |
Gets connection provider.
|
static Manager |
getInstance() |
Gets the singleton instance.
|
java.util.Set<Migration> |
getMigrations() |
Gets the set of Migrations.
|
boolean |
migrated(java.lang.String first) |
Check if a migration has been performed.
|
boolean |
migrationsEnabled() |
Is migration management enabled in the database.
|
void |
setConnectionProvider(ConnectionProvider connectionProvider) |
Sets connection provider.
|
dbEnrich, dbExecute, dbFind, dbInsertGetGeneratedKeys, dbQuery, dbUpdate, streampublic static Manager getInstance()
public ConnectionProvider getConnectionProvider()
public void setConnectionProvider(ConnectionProvider connectionProvider)
connectionProvider - the connection providerpublic java.sql.Connection getConnection()
throws java.sql.SQLException
ConnectionProvidergetConnection in interface ConnectionProviderjava.sql.SQLException - if a connection can not be returnedpublic void add(java.lang.Class<? extends Migration> aMigration) throws java.lang.IllegalArgumentException
aMigration - the a migrationjava.lang.IllegalArgumentException - the illegal argument exceptionpublic void add(Migration... migrations)
migrations - the migrationpublic java.util.Set<Migration> getMigrations()
public void clear()
public boolean migrationsEnabled()
public void enableMigrations()
throws java.sql.SQLException
java.sql.SQLException - if the migration table can not be added to the database.public boolean migrated(java.lang.String first)
first - the firstpublic void doMigrations()