public class JpaModule extends AbstractModule
Modifier and Type | Class and Description |
---|---|
static class |
JpaModule.Initializer |
Constructor and Description |
---|
JpaModule(String jpaUnit)
Create a new instance of the
JpaModule with the given persistence
unit name with autoscan and autostart enabled. |
JpaModule(String jpaUnit,
boolean autoscan,
boolean autostart)
Create new instance of the
JpaModule with the given persistence
unit name. |
Modifier and Type | Method and Description |
---|---|
protected void |
configure() |
JpaModule |
properties(Properties properties)
Configures the JPA persistence provider with a set of properties.
|
JpaModule |
scan(String pkg) |
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
public JpaModule(String jpaUnit, boolean autoscan, boolean autostart)
JpaModule
with the given persistence
unit name.
If autoscan is true then a custom Hibernate scanner will be used to scan
all the classpath entries for Entity classes.
If autostart is true then the PersistService
will be started
automatically.jpaUnit
- the persistence unit nameautoscan
- whether to enable autoscanautostart
- whether to automatically start persistence servicepublic JpaModule properties(Properties properties)
properties
- A set of name value pairs that configure a JPA persistence
provider as per the specification.protected void configure()
configure
in class AbstractModule