com.wideplay.warp.persist
Interface TransactionStrategyBuilder

All Superinterfaces:
PersistenceModuleBuilder
All Known Implementing Classes:
PersistenceServiceBuilderImpl

public interface TransactionStrategyBuilder
extends PersistenceModuleBuilder

Since:
1.0

Method Summary
 TransactionStrategyBuilder addAccessor(Class<?> daoInterface)
           
 TransactionStrategyBuilder forAll(com.google.inject.matcher.Matcher<? super Class<?>> classMatcher)
          This is a convenience method, and defaults to using the method matcher: Matchers.annotatedWith(Transactional.class).
 TransactionStrategyBuilder forAll(com.google.inject.matcher.Matcher<? super Class<?>> classMatcher, com.google.inject.matcher.Matcher<? super Method> methodMatcher)
          Note that if you do not have an @Transactional annotation present on transactional methods, and use a Matcher.any() for methods, warp-persist will assume default rollbackOn and exceptOn clauses (as though @Transactional were present but with no attributes specified).
 
Methods inherited from interface com.wideplay.warp.persist.PersistenceModuleBuilder
buildModule
 

Method Detail

forAll

TransactionStrategyBuilder forAll(com.google.inject.matcher.Matcher<? super Class<?>> classMatcher)
This is a convenience method, and defaults to using the method matcher: Matchers.annotatedWith(Transactional.class).

Parameters:
classMatcher - A Matcher on classes to watch for transactional methods
Returns:
Returns the next step in the builder chain

forAll

TransactionStrategyBuilder forAll(com.google.inject.matcher.Matcher<? super Class<?>> classMatcher,
                                  com.google.inject.matcher.Matcher<? super Method> methodMatcher)
Note that if you do not have an @Transactional annotation present on transactional methods, and use a Matcher.any() for methods, warp-persist will assume default rollbackOn and exceptOn clauses (as though @Transactional were present but with no attributes specified).

Parameters:
classMatcher - A Matcher on classes to watch for transactional methods
methodMatcher - A Matcher on methods
Returns:
Returns the next step in the builder chain

addAccessor

TransactionStrategyBuilder addAccessor(Class<?> daoInterface)
Parameters:
daoInterface - An interface with some methods (typically all) that are annotated with @Finder. Warp-persist will automagically create method bodies and provide an instance when you inject this interface anywhere in your setup. Note that you are *not* allowed to provide your own implementation/binding for such interfaces. Binding errors will result if you try. Also accepts abstract classes, with one or more abstract methods marked @Finder.
Returns:
Returns the next step in the builder chain