org.loom.persistence
Class PackagesPersistenceUnitPostProcessor
java.lang.Object
org.loom.persistence.PackagesPersistenceUnitPostProcessor
- All Implemented Interfaces:
- org.springframework.orm.jpa.persistenceunit.PersistenceUnitPostProcessor
public class PackagesPersistenceUnitPostProcessor
- extends java.lang.Object
- implements org.springframework.orm.jpa.persistenceunit.PersistenceUnitPostProcessor
Adds persistent classes found in the specified packages to your JPA config.
Method Summary |
void |
afterPropertiesSet()
|
void |
postProcessPersistenceUnitInfo(org.springframework.orm.jpa.persistenceunit.MutablePersistenceUnitInfo unit)
Search for persistent classes under the configured folders and register them
in the persistence unit. |
void |
setPackages(java.lang.String[] packages)
|
void |
setProvider(org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider provider)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PackagesPersistenceUnitPostProcessor
public PackagesPersistenceUnitPostProcessor()
postProcessPersistenceUnitInfo
public void postProcessPersistenceUnitInfo(org.springframework.orm.jpa.persistenceunit.MutablePersistenceUnitInfo unit)
- Search for persistent classes under the configured folders and register them
in the persistence unit.
- Specified by:
postProcessPersistenceUnitInfo
in interface org.springframework.orm.jpa.persistenceunit.PersistenceUnitPostProcessor
afterPropertiesSet
@PostConstruct
public void afterPropertiesSet()
setProvider
public void setProvider(org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider provider)
setPackages
public void setPackages(java.lang.String[] packages)