org.unitils.database.transaction.impl
Interface UnitilsTransactionManagementConfiguration


public interface UnitilsTransactionManagementConfiguration

Defines the contract for suppliers of a spring PlatformTransactionManager of a specific subtype, suitable for a given test object. E.g. if some ORM persistence unit was configured on the test, a PlatformTransactionManager that can offer transactional behavior for such a persistence unit is supplied.

Author:
Filip Neven, Tim Ducheyne

Method Summary
 Integer getPreference()
           
 org.springframework.transaction.PlatformTransactionManager getSpringPlatformTransactionManager(Object testObject)
          Returns a PlatformTransactionManager that can provide transactional behavior for the given test object.
 boolean isApplicableFor(Object testObject)
           
 boolean isTransactionalResourceAvailable(Object testObject)
           
 

Method Detail

isApplicableFor

boolean isApplicableFor(Object testObject)
Parameters:
testObject - The test object, not null
Returns:
True if this implementation is able to supply a suitable PlatformTransactionManager for the given test object

getSpringPlatformTransactionManager

org.springframework.transaction.PlatformTransactionManager getSpringPlatformTransactionManager(Object testObject)
Returns a PlatformTransactionManager that can provide transactional behavior for the given test object. May only be invoked if isApplicableFor(Object) returns true for this test object.

Parameters:
testObject - The test object, not null
Returns:
A PlatformTransactionManager that can provide transactional behavior for the given test object.

isTransactionalResourceAvailable

boolean isTransactionalResourceAvailable(Object testObject)

getPreference

Integer getPreference()


Copyright © 2011. All Rights Reserved.