Class StDatabaseFactory
java.lang.Object
com.io7m.darco.postgres.DPQDatabaseFactory<StDatabaseConfiguration,StDatabaseConnectionType,StDatabaseTransactionType,StDatabaseQueryProviderType<?,?,?>,StDatabaseType>
com.io7m.stonesignal.server.database.StDatabaseFactory
- All Implemented Interfaces:
com.io7m.darco.api.DDatabaseFactoryType<StDatabaseConfiguration,,StDatabaseConnectionType, StDatabaseTransactionType, StDatabaseQueryProviderType<?, ?, ?>, StDatabaseType> StDatabaseFactoryType
public final class StDatabaseFactory
extends com.io7m.darco.postgres.DPQDatabaseFactory<StDatabaseConfiguration,StDatabaseConnectionType,StDatabaseTransactionType,StDatabaseQueryProviderType<?,?,?>,StDatabaseType>
implements StDatabaseFactoryType
The main database factory.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected com.io7m.lanark.core.RDottedNameprotected org.slf4j.Loggerlogger()protected StDatabaseTypeonCreateDatabase(StDatabaseConfiguration configuration, DataSource source, List<StDatabaseQueryProviderType<?, ?, ?>> queryProviders, com.io7m.jmulticlose.core.CloseableCollectionType<com.io7m.darco.api.DDatabaseException> resources) protected voidprotected voidonPostUpgrade(StDatabaseConfiguration configuration, Connection connection) protected List<StDatabaseQueryProviderType<?, ?, ?>> protected InputStreamprotected DataSourceonTransformDataSourceForSetup(DataSource dataSource) protected DataSourceonTransformDataSourceForUse(DataSource dataSource) Methods inherited from class com.io7m.darco.postgres.DPQDatabaseFactory
kind, onRequireDatabaseSchemaArguments, openMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.io7m.darco.api.DDatabaseFactoryType
kind, open
-
Constructor Details
-
StDatabaseFactory
public StDatabaseFactory()The main database factory.
-
-
Method Details
-
applicationId
protected com.io7m.lanark.core.RDottedName applicationId()- Specified by:
applicationIdin classcom.io7m.darco.postgres.DPQDatabaseFactory<StDatabaseConfiguration,StDatabaseConnectionType, StDatabaseTransactionType, StDatabaseQueryProviderType<?, ?, ?>, StDatabaseType>
-
logger
protected org.slf4j.Logger logger()- Specified by:
loggerin classcom.io7m.darco.postgres.DPQDatabaseFactory<StDatabaseConfiguration,StDatabaseConnectionType, StDatabaseTransactionType, StDatabaseQueryProviderType<?, ?, ?>, StDatabaseType>
-
onCreateDatabase
protected StDatabaseType onCreateDatabase(StDatabaseConfiguration configuration, DataSource source, List<StDatabaseQueryProviderType<?, ?, ?>> queryProviders, com.io7m.jmulticlose.core.CloseableCollectionType<com.io7m.darco.api.DDatabaseException> resources) - Specified by:
onCreateDatabasein classcom.io7m.darco.postgres.DPQDatabaseFactory<StDatabaseConfiguration,StDatabaseConnectionType, StDatabaseTransactionType, StDatabaseQueryProviderType<?, ?, ?>, StDatabaseType>
-
onRequireDatabaseSchemaXML
- Specified by:
onRequireDatabaseSchemaXMLin classcom.io7m.darco.postgres.DPQDatabaseFactory<StDatabaseConfiguration,StDatabaseConnectionType, StDatabaseTransactionType, StDatabaseQueryProviderType<?, ?, ?>, StDatabaseType>
-
onEvent
- Specified by:
onEventin classcom.io7m.darco.postgres.DPQDatabaseFactory<StDatabaseConfiguration,StDatabaseConnectionType, StDatabaseTransactionType, StDatabaseQueryProviderType<?, ?, ?>, StDatabaseType>
-
onTransformDataSourceForSetup
- Specified by:
onTransformDataSourceForSetupin classcom.io7m.darco.postgres.DPQDatabaseFactory<StDatabaseConfiguration,StDatabaseConnectionType, StDatabaseTransactionType, StDatabaseQueryProviderType<?, ?, ?>, StDatabaseType>
-
onTransformDataSourceForUse
- Specified by:
onTransformDataSourceForUsein classcom.io7m.darco.postgres.DPQDatabaseFactory<StDatabaseConfiguration,StDatabaseConnectionType, StDatabaseTransactionType, StDatabaseQueryProviderType<?, ?, ?>, StDatabaseType>
-
onPostUpgrade
protected void onPostUpgrade(StDatabaseConfiguration configuration, Connection connection) throws SQLException - Specified by:
onPostUpgradein classcom.io7m.darco.postgres.DPQDatabaseFactory<StDatabaseConfiguration,StDatabaseConnectionType, StDatabaseTransactionType, StDatabaseQueryProviderType<?, ?, ?>, StDatabaseType> - Throws:
SQLException
-
onRequireDatabaseQueryProviders
- Specified by:
onRequireDatabaseQueryProvidersin classcom.io7m.darco.postgres.DPQDatabaseFactory<StDatabaseConfiguration,StDatabaseConnectionType, StDatabaseTransactionType, StDatabaseQueryProviderType<?, ?, ?>, StDatabaseType>
-