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
  • Constructor Details

    • AbstractHibernatePackageModule

      public AbstractHibernatePackageModule()
  • Method Details

    • getPropertiesPrefix

      public String getPropertiesPrefix()
      Returns:
      prefix for the properties that should be considered when configuring this module
    • setPropertiesPrefix

      protected final void setPropertiesPrefix(String propertiesPrefix)
      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

      public DataSource getDataSource()
      Get the datasource associated directly with this module.
      Returns:
      Datasource associated with this module.
    • setDataSource

      public void setDataSource(DataSource dataSource)
      Set the datasource that all entities managed by this module should use.
      Parameters:
      dataSource - Datasource associated with this module.
    • getHibernatePackageProviders

      public Set<HibernatePackageProvider> getHibernatePackageProviders()
      Returns the set of HibernatePackageProvider instances configured directly on this module.
      Returns:
      Set of configured HibernatePackageProviders.
    • setHibernatePackageProviders

      public void setHibernatePackageProviders(Set<HibernatePackageProvider> hibernatePackageProviders)
    • addHibernatePackageProvider

      public void addHibernatePackageProvider(HibernatePackageProvider... hibernatePackageProvider)
    • 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

      public AcrossHibernateModuleSettings 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

      public Map<String,String> getHibernateProperties()
    • setHibernateProperties

      public void setHibernateProperties(Map<String,String> hibernateProperties)
    • setHibernateProperty

      public void setHibernateProperty(String name, String value)
    • getDataSourceName

      public String 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

      public void setDataSourceName(String dataSourceName)
      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.