Package play.db.jpa

Class DefaultJPAConfig

  • All Implemented Interfaces:
    JPAConfig

    public class DefaultJPAConfig
    extends java.lang.Object
    implements JPAConfig
    Default JPA configuration.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static JPAConfig from​(java.util.Map<java.lang.String,​java.lang.String> map)
      Create a default JPA configuration from a map of names to unit names.
      static JPAConfig of​(java.lang.String name, java.lang.String unitName)
      Create a default JPA configuration with the given name and unit name.
      static JPAConfig of​(java.lang.String n1, java.lang.String u1, java.lang.String n2, java.lang.String u2)
      Create a default JPA configuration with the given names and unit names.
      static JPAConfig of​(java.lang.String n1, java.lang.String u1, java.lang.String n2, java.lang.String u2, java.lang.String n3, java.lang.String u3)
      Create a default JPA configuration with the given names and unit names.
      java.util.Set<JPAConfig.PersistenceUnit> persistenceUnits()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • of

        public static JPAConfig of​(java.lang.String name,
                                   java.lang.String unitName)
        Create a default JPA configuration with the given name and unit name.
        Parameters:
        name - the name for the entity manager factory
        unitName - the persistence unit name as used in `persistence.xml`
        Returns:
        a default JPA configuration
      • of

        public static JPAConfig of​(java.lang.String n1,
                                   java.lang.String u1,
                                   java.lang.String n2,
                                   java.lang.String u2)
        Create a default JPA configuration with the given names and unit names.
        Parameters:
        n1 - Name of the first entity manager factory
        u1 - Name of the first unit
        n2 - Name of the second entity manager factory
        u2 - Name of the second unit
        Returns:
        a default JPA configuration with the provided persistence units.
      • of

        public static JPAConfig of​(java.lang.String n1,
                                   java.lang.String u1,
                                   java.lang.String n2,
                                   java.lang.String u2,
                                   java.lang.String n3,
                                   java.lang.String u3)
        Create a default JPA configuration with the given names and unit names.
        Parameters:
        n1 - Name of the first entity manager factory
        u1 - Name of the first unit
        n2 - Name of the second entity manager factory
        u2 - Name of the second unit
        n3 - Name of the third entity manager factory
        u3 - Name of the third unit
        Returns:
        a default JPA configuration with the provided persistence units.
      • from

        public static JPAConfig from​(java.util.Map<java.lang.String,​java.lang.String> map)
        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