# 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
  Constructor
  Description
  `StDatabaseFactory()`
  The main database factory.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected com.io7m.lanark.core.RDottedName`
  `applicationId()`
  `protected org.slf4j.Logger`
  `logger()`
  `protected StDatabaseType`
  `onCreateDatabase(StDatabaseConfiguration configuration, DataSource source, List<StDatabaseQueryProviderType<?,?,?>> queryProviders, com.io7m.jmulticlose.core.CloseableCollectionType<com.io7m.darco.api.DDatabaseException> resources)`
  `protected void`
  `onEvent(String message)`
  `protected void`
  `onPostUpgrade(StDatabaseConfiguration configuration, Connection connection)`
  `protected List<StDatabaseQueryProviderType<?,?,?>>`
  `onRequireDatabaseQueryProviders()`
  `protected InputStream`
  `onRequireDatabaseSchemaXML()`
  `protected DataSource`
  `onTransformDataSourceForSetup(DataSource dataSource)`
  `protected DataSource`
  `onTransformDataSourceForUse(DataSource dataSource)`

  ### Methods inherited from class com.io7m.darco.postgres.DPQDatabaseFactory

  `kind, onRequireDatabaseSchemaArguments, open`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods 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:
      `applicationId` in class `com.io7m.darco.postgres.DPQDatabaseFactory<StDatabaseConfiguration,StDatabaseConnectionType,StDatabaseTransactionType,StDatabaseQueryProviderType<?,?,?>,StDatabaseType>`

  - ### logger

    protected org.slf4j.Logger logger()
    Specified by:
      `logger` in class `com.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:
      `onCreateDatabase` in class `com.io7m.darco.postgres.DPQDatabaseFactory<StDatabaseConfiguration,StDatabaseConnectionType,StDatabaseTransactionType,StDatabaseQueryProviderType<?,?,?>,StDatabaseType>`

  - ### onRequireDatabaseSchemaXML

    protected InputStream onRequireDatabaseSchemaXML()
    Specified by:
      `onRequireDatabaseSchemaXML` in class `com.io7m.darco.postgres.DPQDatabaseFactory<StDatabaseConfiguration,StDatabaseConnectionType,StDatabaseTransactionType,StDatabaseQueryProviderType<?,?,?>,StDatabaseType>`

  - ### onEvent

    protected void onEvent(String message)
    Specified by:
      `onEvent` in class `com.io7m.darco.postgres.DPQDatabaseFactory<StDatabaseConfiguration,StDatabaseConnectionType,StDatabaseTransactionType,StDatabaseQueryProviderType<?,?,?>,StDatabaseType>`

  - ### onTransformDataSourceForSetup

    protected DataSource onTransformDataSourceForSetup(DataSource dataSource)
    Specified by:
      `onTransformDataSourceForSetup` in class `com.io7m.darco.postgres.DPQDatabaseFactory<StDatabaseConfiguration,StDatabaseConnectionType,StDatabaseTransactionType,StDatabaseQueryProviderType<?,?,?>,StDatabaseType>`

  - ### onTransformDataSourceForUse

    protected DataSource onTransformDataSourceForUse(DataSource dataSource)
    Specified by:
      `onTransformDataSourceForUse` in class `com.io7m.darco.postgres.DPQDatabaseFactory<StDatabaseConfiguration,StDatabaseConnectionType,StDatabaseTransactionType,StDatabaseQueryProviderType<?,?,?>,StDatabaseType>`

  - ### onPostUpgrade

    protected void onPostUpgrade(StDatabaseConfiguration configuration, Connection connection) throws SQLException
    Specified by:
      `onPostUpgrade` in class `com.io7m.darco.postgres.DPQDatabaseFactory<StDatabaseConfiguration,StDatabaseConnectionType,StDatabaseTransactionType,StDatabaseQueryProviderType<?,?,?>,StDatabaseType>`
    Throws:
      `SQLException`

  - ### onRequireDatabaseQueryProviders

    protected List<StDatabaseQueryProviderType<?,?,?>> onRequireDatabaseQueryProviders()
    Specified by:
      `onRequireDatabaseQueryProviders` in class `com.io7m.darco.postgres.DPQDatabaseFactory<StDatabaseConfiguration,StDatabaseConnectionType,StDatabaseTransactionType,StDatabaseQueryProviderType<?,?,?>,StDatabaseType>`