@EachProperty(value="jpa",
primary="default")
public class JpaConfiguration
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
JpaConfiguration.EntityScanConfiguration
The entity scan configuration.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PREFIX |
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(java.util.Map<java.lang.String,java.lang.Object> additionalSettings)
Builds the standard service registry.
|
protected org.hibernate.boot.registry.BootstrapServiceRegistryBuilder |
createBootstrapServiceRegistryBuilder(org.hibernate.integrator.spi.Integrator integrator,
java.lang.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() |
java.lang.String[] |
getPackagesToScan() |
java.util.Map<java.lang.String,java.lang.Object> |
getProperties() |
void |
setPackagesToScan(java.lang.String... packagesToScan)
Sets the packages to scan.
|
void |
setProperties(java.util.Map<java.lang.String,java.lang.Object> jpaProperties)
Sets the JPA properties to be passed to the JPA implementation.
|
public static final java.lang.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
entityScanConfiguration
- The entity scan configurationpublic JpaConfiguration.EntityScanConfiguration getEntityScanConfiguration()
public org.hibernate.boot.registry.StandardServiceRegistry buildStandardServiceRegistry(@Nullable java.util.Map<java.lang.String,java.lang.Object> additionalSettings)
additionalSettings
- Additional settings for the service registrypublic void setPackagesToScan(java.lang.String... packagesToScan)
packagesToScan
- The packages to scanpublic java.lang.String[] getPackagesToScan()
public final void setProperties(@MapFormat(transformation=FLAT,keyFormat=RAW) java.util.Map<java.lang.String,java.lang.Object> jpaProperties)
jpaProperties
- The JPA propertiespublic java.util.Map<java.lang.String,java.lang.Object> getProperties()
protected org.hibernate.boot.registry.BootstrapServiceRegistryBuilder createBootstrapServiceRegistryBuilder(@Nullable org.hibernate.integrator.spi.Integrator integrator, java.lang.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