|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.inject.AbstractModule
com.wideplay.warp.persist.spi.AbstractPersistenceModule
public abstract class AbstractPersistenceModule
Base module for persistence strategies that holds a bunch of utility methods for easier configuration.
Constructor Summary | |
---|---|
protected |
AbstractPersistenceModule(PersistenceConfiguration configuration,
Class<? extends Annotation> unitAnnotation)
|
Method Summary | ||
---|---|---|
protected void |
bindFinderInterceptor(MethodInterceptor finderInterceptor)
Binds a finder interceptor with support for multiple modules. |
|
protected void |
bindTransactionalDynamicAccessors(MethodInterceptor finderInterceptor,
MethodInterceptor txInterceptor)
Binds the finder and transaction interceptor for use with Dynamic Accessors. |
|
protected void |
bindTransactionInterceptor(MethodInterceptor txInterceptor)
Bind the transaction interceptor. |
|
protected
|
bindWithUnitAnnotation(Class<T> tClass)
Bind with an optional unit annotation type, which is a binding annotation used only in multimodules mode and specified in the constructor of this class. |
|
protected abstract void |
configure()
To be implemented by subclasses. |
|
protected boolean |
inMultiModulesMode()
|
|
protected
|
keyWithUnitAnnotation(Class<T> clazz)
Generates a key for the given class, with an optional unit annotation (multimodules mode). |
|
protected boolean |
unitOfWorkRequest()
|
Methods inherited from class com.google.inject.AbstractModule |
---|
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindScope, configure, convertToTypes, currentStage, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.wideplay.warp.persist.spi.PersistenceModule |
---|
visit |
Methods inherited from interface com.google.inject.Module |
---|
configure |
Constructor Detail |
---|
protected AbstractPersistenceModule(PersistenceConfiguration configuration, Class<? extends Annotation> unitAnnotation)
configuration
- the non-null
PersistenceConfiguration obtained from
PersistenceStrategy.getBindings(PersistenceConfiguration)
.unitAnnotation
- the unit annotation or null
if there is noneMethod Detail |
---|
protected abstract void configure()
configure
in class com.google.inject.AbstractModule
AbstractModule.configure()
protected <T> com.google.inject.binder.LinkedBindingBuilder<T> bindWithUnitAnnotation(Class<T> tClass)
tClass
- the type to bind
protected void bindTransactionalDynamicAccessors(MethodInterceptor finderInterceptor, MethodInterceptor txInterceptor)
finderInterceptor
- the finder interceptor to bind for dynamic accessorstxInterceptor
- the transaction interceptor to use for transactional dynamic accessorsprotected void bindTransactionInterceptor(MethodInterceptor txInterceptor)
txInterceptor
- the transaction interceptor to bindprotected void bindFinderInterceptor(MethodInterceptor finderInterceptor)
@Finder(unit=UserAnnotation.class)
.
finderInterceptor
- the finder interceptor to bindprotected boolean inMultiModulesMode()
protected boolean unitOfWorkRequest()
UnitOfWork.REQUEST
was configured or notprotected <T> com.google.inject.Key<T> keyWithUnitAnnotation(Class<T> clazz)
T
- the bound typeclazz
- the type to bind
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |