public interface SingularPersistenceConfiguration
PersistenceConfigurationProvider| Modifier and Type | Method and Description |
|---|---|
void |
configureHibernatePackagesToScan(PackageScanConfiguration packagesConfig)
Configure hibernates packages to scan in addition to the singular platform packages, ie: singular entities packages
is already configured by the platform.
|
default void |
configureHibernateProperties(Properties properties)
The properties of Hibernate.
|
void |
configureInitSQLScripts(List<String> scripts)
Method responsible to configure the list of scripts files that will be execute after the creation of Entities by Hibernate.
|
default void |
configureQueryReplacements(List<org.opensingular.lib.support.persistence.DatabaseObjectNameReplacement> replacements)
Method to configure the Schema or Catalog Replacement.
|
default String |
getActorTableScript()
A specific configuration of the Actor Table for the project.
|
default SingularDataBaseSuport |
getDatabaseSupport()
Method that returns a implmentation of interface SingularDataBaseSuport that should contains somo scripts of specific Dialect,
for example the creation of function, and the actor table script.
|
default DefaultH2DataSource |
getEmbeddedDataSource()
Must return a Pooled data source backed by H2 engine
Defaults to
DefaultH2DataSource pooled by HikariDataSource |
Class<? extends org.hibernate.dialect.Dialect> |
getHibernateDialect()
The Dialect used in Procjet.
|
default DataSource |
getNonEmbeddedDataSource()
Must return a Pooled data source.
|
void configureHibernatePackagesToScan(PackageScanConfiguration packagesConfig)
packagesConfig - A configuration class that contains a pre-populated list with singular default packages,
cleaning or removing pre-populated data in this list would led to platform malfunction.void configureInitSQLScripts(List<String> scripts)
scripts - The list of scripts paths.default void configureHibernateProperties(Properties properties)
properties - The properties of Hibernate.default void configureQueryReplacements(List<org.opensingular.lib.support.persistence.DatabaseObjectNameReplacement> replacements)
replacements - The list containing the Object with the replacements name.Class<? extends org.hibernate.dialect.Dialect> getHibernateDialect()
default String getActorTableScript()
default DefaultH2DataSource getEmbeddedDataSource()
DefaultH2DataSource pooled by HikariDataSourcedefault DataSource getNonEmbeddedDataSource()
DefaultJNDIDataSource pooled by HikariDataSourcedefault SingularDataBaseSuport getDatabaseSupport()
By default this method use the Dialect configuration and try to find a implementation in the SingularDataBaseEnum, if don't find it'll throw a exception, and the responsible of the project have to implement this method.
Copyright © 2019. All rights reserved.