Package com.google.inject.persist.jpa
Class JpaPersistModule
- java.lang.Object
-
- com.google.inject.AbstractModule
-
- com.google.inject.persist.PersistModule
-
- com.google.inject.persist.jpa.JpaPersistModule
-
- All Implemented Interfaces:
com.google.inject.Module
public final class JpaPersistModule extends PersistModule
JPA provider for guice persist.- Author:
- dhanji@gmail.com (Dhanji R. Prasanna)
-
-
Constructor Summary
Constructors Constructor Description JpaPersistModule(String jpaUnit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> JpaPersistModule
addFinder(Class<T> iface)
Adds an interface to this module to use as a dynamic finder.protected void
configurePersistence()
protected org.aopalliance.intercept.MethodInterceptor
getTransactionInterceptor()
JpaPersistModule
properties(Map<?,?> properties)
Configures the JPA persistence provider with a set of properties.-
Methods inherited from class com.google.inject.persist.PersistModule
configure
-
Methods inherited from class com.google.inject.AbstractModule
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
-
-
-
-
Constructor Detail
-
JpaPersistModule
public JpaPersistModule(String jpaUnit)
-
-
Method Detail
-
configurePersistence
protected void configurePersistence()
- Specified by:
configurePersistence
in classPersistModule
-
getTransactionInterceptor
protected org.aopalliance.intercept.MethodInterceptor getTransactionInterceptor()
- Specified by:
getTransactionInterceptor
in classPersistModule
-
properties
public JpaPersistModule properties(Map<?,?> properties)
Configures the JPA persistence provider with a set of properties.- Parameters:
properties
- A set of name value pairs that configure a JPA persistence provider as per the specification.- Since:
- 4.0 (since 3.0 with a parameter type of
java.util.Properties
)
-
addFinder
public <T> JpaPersistModule addFinder(Class<T> iface)
Adds an interface to this module to use as a dynamic finder.- Parameters:
iface
- Any interface type whose methods are all dynamic finders.
-
-