Package play.db.jpa
Class DefaultJPAConfig
java.lang.Object
play.db.jpa.DefaultJPAConfig
- All Implemented Interfaces:
JPAConfig
Default JPA configuration.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface play.db.jpa.JPAConfig
JPAConfig.PersistenceUnit -
Constructor Summary
ConstructorsConstructorDescriptionDefaultJPAConfig(Set<JPAConfig.PersistenceUnit> persistenceUnits) DefaultJPAConfig(JPAConfig.PersistenceUnit... persistenceUnits) -
Method Summary
Modifier and TypeMethodDescriptionstatic JPAConfigCreate a default JPA configuration from a map of names to unit names.static JPAConfigCreate a default JPA configuration with the given name and unit name.static JPAConfigCreate a default JPA configuration with the given names and unit names.static JPAConfigCreate a default JPA configuration with the given names and unit names.
-
Constructor Details
-
DefaultJPAConfig
-
DefaultJPAConfig
-
-
Method Details
-
persistenceUnits
- Specified by:
persistenceUnitsin interfaceJPAConfig
-
of
Create a default JPA configuration with the given name and unit name.- Parameters:
name- the name for the entity manager factoryunitName- the persistence unit name as used in `persistence.xml`- Returns:
- a default JPA configuration
-
of
Create a default JPA configuration with the given names and unit names.- Parameters:
n1- Name of the first entity manager factoryu1- Name of the first unitn2- Name of the second entity manager factoryu2- Name of the second unit- Returns:
- a default JPA configuration with the provided persistence units.
-
of
Create a default JPA configuration with the given names and unit names.- Parameters:
n1- Name of the first entity manager factoryu1- Name of the first unitn2- Name of the second entity manager factoryu2- Name of the second unitn3- Name of the third entity manager factoryu3- Name of the third unit- Returns:
- a default JPA configuration with the provided persistence units.
-
from
Create a default JPA configuration from a map of names to unit names.- Parameters:
map- Map of entity manager factory names to unit names- Returns:
- a JPAConfig configured with the provided mapping
-