Package lu.kbra.pclib.db.base
Class DataBase
java.lang.Object
lu.kbra.pclib.db.base.DataBase
- Direct Known Subclasses:
DeferredDataBase
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DataBaseConnectorprotected DataBaseEntryUtilsprotected final Stringprotected DataBaseStructureprotected Stringprotected final List<AbstractDBTable<? extends DataBaseEntry>>protected final List<AbstractDBView<? extends DataBaseEntry>> -
Constructor Summary
ConstructorsConstructorDescriptionDataBase(DataBaseConnector connector, String name) DataBase(DataBaseConnector connector, String name, Map<String, Object> baseHints, DataBaseEntryUtils dbEntryUtils) DataBase(DataBaseConnector connector, String name, DataBaseEntryUtils dbEntryUtils) -
Method Summary
Modifier and TypeMethodDescriptionprotected Connectionconnect()create()drop()booleanexists()Deprecated.protected DataBasevoidmigrate(Collection<? extends DataBaseMigration> migrations) voidmigrate(Collection<? extends DataBaseMigration> migrations, Collection<AbstractDBTable> tables, SchemaMigrationOptions schemaOptions) voidmigrateTables(Collection<AbstractDBTable> tables, SchemaMigrationOptions schemaOptions) <B extends AbstractDBTable<T>,T extends DataBaseEntry>
voidregisterTable(B table) <B extends AbstractDBView<T>,T extends DataBaseEntry>
voidregisterView(B view) voidrequestHook(SQLRequestType type, Object query) voidsetMigrationSchemaName(String migrationSchemaName) toString()void
-
Field Details
-
connector
-
dataBaseEntryUtils
-
dataBaseName
-
migrationSchemaName
-
dataBaseStructure
-
tables
-
views
-
-
Constructor Details
-
DataBase
-
DataBase
-
DataBase
public DataBase(DataBaseConnector connector, String name, Map<String, Object> baseHints, DataBaseEntryUtils dbEntryUtils)
-
-
Method Details
-
registerTable
-
registerView
-
create
- Throws:
DBException
-
createTransaction
-
drop
- Throws:
DBException
-
exists
- Throws:
DBException
-
getConnectionSupplier
Deprecated. -
migrate
- Throws:
DBException
-
migrate
public void migrate(Collection<? extends DataBaseMigration> migrations, Collection<AbstractDBTable> tables, SchemaMigrationOptions schemaOptions) throws DBException - Throws:
DBException
-
migrateTables
public void migrateTables(Collection<AbstractDBTable> tables, SchemaMigrationOptions schemaOptions) throws DBException - Throws:
DBException
-
requestHook
-
setMigrationSchemaName
-
updateDataBaseConnector
- Throws:
DBException
-
connect
- Throws:
DBException
-
createConnection
- Throws:
DBException
-
getDataBase
-
toString
-