@EachProperty(value="jpa", primary="default") public class JpaConfiguration extends Object
Modifier and Type | Class and Description |
---|---|
static class |
JpaConfiguration.EntityScanConfiguration
The entity scan configuration.
|
Modifier | Constructor and Description |
---|---|
protected |
JpaConfiguration(io.micronaut.context.ApplicationContext applicationContext,
org.hibernate.integrator.spi.Integrator integrator) |
protected |
JpaConfiguration(io.micronaut.context.ApplicationContext applicationContext,
org.hibernate.integrator.spi.Integrator integrator,
JpaConfiguration.EntityScanConfiguration entityScanConfiguration) |
Modifier and Type | Method and Description |
---|---|
org.hibernate.boot.registry.StandardServiceRegistry |
buildStandardServiceRegistry(Map<String,Object> additionalSettings)
Builds the standard service registry.
|
protected org.hibernate.boot.registry.BootstrapServiceRegistryBuilder |
createBootstrapServiceRegistryBuilder(org.hibernate.integrator.spi.Integrator integrator,
ClassLoader classLoader)
Creates the default
BootstrapServiceRegistryBuilder . |
protected org.hibernate.boot.registry.StandardServiceRegistryBuilder |
createStandServiceRegistryBuilder(org.hibernate.boot.registry.BootstrapServiceRegistry bootstrapServiceRegistry)
Creates the standard service registry builder.
|
JpaConfiguration.EntityScanConfiguration |
getEntityScanConfiguration() |
String[] |
getPackagesToScan() |
Map<String,Object> |
getProperties() |
void |
setPackagesToScan(String... packagesToScan)
Sets the packages to scan.
|
void |
setProperties(Map<String,Object> jpaProperties)
Sets the JPA properties to be passed to the JPA implementation.
|
public static final String PREFIX
protected JpaConfiguration(io.micronaut.context.ApplicationContext applicationContext, @Nullable org.hibernate.integrator.spi.Integrator integrator)
applicationContext
- The application contextintegrator
- The Integrator
@Inject protected JpaConfiguration(io.micronaut.context.ApplicationContext applicationContext, @Nullable org.hibernate.integrator.spi.Integrator integrator, @Nullable JpaConfiguration.EntityScanConfiguration entityScanConfiguration)
applicationContext
- The application contextintegrator
- The Integrator
public JpaConfiguration.EntityScanConfiguration getEntityScanConfiguration()
public org.hibernate.boot.registry.StandardServiceRegistry buildStandardServiceRegistry(@Nullable Map<String,Object> additionalSettings)
additionalSettings
- Additional settings for the service registrypublic void setPackagesToScan(String... packagesToScan)
packagesToScan
- The packages to scanpublic String[] getPackagesToScan()
public final void setProperties(@MapFormat(transformation=FLAT,keyFormat=RAW) Map<String,Object> jpaProperties)
jpaProperties
- The JPA propertiesprotected org.hibernate.boot.registry.BootstrapServiceRegistryBuilder createBootstrapServiceRegistryBuilder(@Nullable org.hibernate.integrator.spi.Integrator integrator, ClassLoader classLoader)
BootstrapServiceRegistryBuilder
.integrator
- The integrator to use. Can be nullclassLoader
- The class loade rto useprotected org.hibernate.boot.registry.StandardServiceRegistryBuilder createStandServiceRegistryBuilder(org.hibernate.boot.registry.BootstrapServiceRegistry bootstrapServiceRegistry)
bootstrapServiceRegistry
- The BootstrapServiceRegistry
instanceStandardServiceRegistryBuilder
instance