com.wideplay.warp.persist
Interface TransactionStrategyBuilder

All Superinterfaces:
PersistenceModuleBuilder

public interface TransactionStrategyBuilder
extends PersistenceModuleBuilder

Created with IntelliJ IDEA. On: 2/06/2007

Since:
1.0
Author:
Dhanji R. Prasanna (dhanji@gmail.com)

Method Summary
 TransactionStrategyBuilder addAccessor(java.lang.Class<?> daoInterface)
           
 PersistenceModuleBuilder forAll(com.google.inject.matcher.Matcher<? super java.lang.Class<?>> classMatcher)
          This is a convenience method, and defaults to using the method matcher: Matchers.annotatedWith(Transactional.class).
 PersistenceModuleBuilder forAll(com.google.inject.matcher.Matcher<? super java.lang.Class<?>> classMatcher, com.google.inject.matcher.Matcher<? super java.lang.reflect.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).
 TransactionStrategyBuilder transactedWith(TransactionStrategy transactionStrategy)
           
 
Methods inherited from interface com.wideplay.warp.persist.PersistenceModuleBuilder
buildModule
 

Method Detail

transactedWith

TransactionStrategyBuilder transactedWith(TransactionStrategy transactionStrategy)
Parameters:
transactionStrategy - One of the enum TransactionStrategy. See warp-persist website for details. By default TransactionStrategy.LOCAL is set.
Returns:
Returns the next step in the builder chain

forAll

PersistenceModuleBuilder forAll(com.google.inject.matcher.Matcher<? super java.lang.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

PersistenceModuleBuilder forAll(com.google.inject.matcher.Matcher<? super java.lang.Class<?>> classMatcher,
                                com.google.inject.matcher.Matcher<? super java.lang.reflect.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(java.lang.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