org.unitils.orm.common.spring
Interface OrmSpringSupport<ORMPU,ORMCONFOBJ>
- Type Parameters:
ORMPU
- Type of the persistence unitORMCONFOBJ
- Type of the configuration object
- All Known Implementing Classes:
- HibernateSpringSupport, JpaSpringSupport
public interface OrmSpringSupport<ORMPU,ORMCONFOBJ>
Defines the contract for implementations that retrieve an ORM persistence unit from the spring
ApplicationContext
that is configured for this class (if any)
- Author:
- Filip Neven, Tim Ducheyne
isPersistenceUnitConfiguredInSpring
boolean isPersistenceUnitConfiguredInSpring(Object testObject)
- Parameters:
testObject
- The test instance, not null
- Returns:
- True if an
ApplicationContext
is associated with the given test object,
and if a persistence unit of the type supported by this interface's implementation is available
getConfiguredPersistenceUnit
ConfiguredOrmPersistenceUnit<ORMPU,ORMCONFOBJ> getConfiguredPersistenceUnit(Object testObject)
- Parameters:
testObject
- The test instance, not null
- Returns:
- An instance of
ConfiguredOrmPersistenceUnit
that wraps the persistence unit and the
configuration object
Copyright © 2011. All Rights Reserved.