Class AbstractHibernatePackageModule
java.lang.Object
com.foreach.across.core.context.AbstractAcrossEntity
com.foreach.across.core.AcrossModule
com.foreach.across.modules.hibernate.AbstractHibernatePackageModule
- All Implemented Interfaces:
com.foreach.across.core.context.AcrossEntity
,com.foreach.across.core.context.AcrossModuleEntity
- Direct Known Subclasses:
AcrossHibernateJpaModule
,AcrossHibernateModule
public abstract class AbstractHibernatePackageModule
extends com.foreach.across.core.AcrossModule
-
Field Summary
Fields inherited from class com.foreach.across.core.AcrossModule
CURRENT_MODULE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addHibernatePackageProvider
(HibernatePackageProvider... hibernatePackageProvider) Create the specific settings implementation instance for property binding.Get the datasource associated directly with this module.The initial name of the datasource bean that the entity manager should use.Returns the set of HibernatePackageProvider instances configured directly on this module.boolean
If true this module will scan other modules to see if they implement the HibernatePackageConfiguringModule interface.void
setDataSource
(DataSource dataSource) Set the datasource that all entities managed by this module should use.void
setDataSourceName
(String dataSourceName) The initial name of the datasource bean that the entity manager should use.void
setHibernatePackageProviders
(Set<HibernatePackageProvider> hibernatePackageProviders) void
setHibernateProperties
(Map<String, String> hibernateProperties) void
setHibernateProperty
(String name, String value) protected final void
setPropertiesPrefix
(String propertiesPrefix) Set a custom properties prefix that should be used for this module.void
setScanForHibernatePackages
(boolean scanForHibernatePackages) Methods inherited from class com.foreach.across.core.AcrossModule
addApplicationContextConfigurer, addApplicationContextConfigurer, addInstallerContextConfigurer, addInstallerContextConfigurer, addPropertySources, addPropertySources, addRuntimeDependency, equals, expose, expose, exposeClass, getApplicationContextConfigurers, getContext, getDescription, getExposeFilter, getExposeTransformer, getExtensionTargets, getInstallerContextConfigurers, getInstallers, getInstallerScanPackages, getInstallerSettings, getModuleConfigurationScanPackages, getName, getResourcesKey, getRuntimeDependencies, getVersionInfo, hashCode, isEnabled, prepareForBootstrap, registerDefaultApplicationContextConfigurers, registerDefaultInstallerContextConfigurers, setContext, setEnabled, setExposeFilter, setExposeTransformer, setInstallerSettings, toString
Methods inherited from class com.foreach.across.core.context.AbstractAcrossEntity
addPropertySources, getAcrossApplicationContextHolder, getProperties, hasApplicationContext, setAcrossApplicationContextHolder, setProperties, setProperty
-
Constructor Details
-
AbstractHibernatePackageModule
public AbstractHibernatePackageModule()
-
-
Method Details
-
getPropertiesPrefix
- Returns:
- prefix for the properties that should be considered when configuring this module
-
setPropertiesPrefix
Set a custom properties prefix that should be used for this module. Defaults to the uncapitalized module name when unspecified. Should be set during constructor of a custom module.- Parameters:
propertiesPrefix
- to use
-
getDataSource
Get the datasource associated directly with this module.- Returns:
- Datasource associated with this module.
-
setDataSource
Set the datasource that all entities managed by this module should use.- Parameters:
dataSource
- Datasource associated with this module.
-
getHibernatePackageProviders
Returns the set of HibernatePackageProvider instances configured directly on this module.- Returns:
- Set of configured HibernatePackageProviders.
-
setHibernatePackageProviders
-
addHibernatePackageProvider
-
isScanForHibernatePackages
public boolean isScanForHibernatePackages()If true this module will scan other modules to see if they implement the HibernatePackageConfiguringModule interface.- Returns:
- True if modules will be scanned and activated automatically.
- See Also:
-
setScanForHibernatePackages
public void setScanForHibernatePackages(boolean scanForHibernatePackages) -
createSettings
Create the specific settings implementation instance for property binding. Override this method if a module wants to use an extended settings class.- Returns:
- a new instance for property binding
-
getHibernateProperties
-
setHibernateProperties
-
setHibernateProperty
-
getDataSourceName
The initial name of the datasource bean that the entity manager should use. Can be overridden using properties and any explicitly attached instance (setDataSource(DataSource)
) will always take precedence. -
setDataSourceName
The initial name of the datasource bean that the entity manager should use. Can be overridden using properties and any explicitly attached instance (setDataSource(DataSource)
) will always take precedence.
-