org.springframework.orm.jpa.persistenceunit

Interface PersistenceUnitManager

    • Method Detail

      • obtainDefaultPersistenceUnitInfo

        PersistenceUnitInfo obtainDefaultPersistenceUnitInfo()
                                                      throws java.lang.IllegalStateException
        Obtain the default PersistenceUnitInfo from this manager.
        Returns:
        the PersistenceUnitInfo (never null)
        Throws:
        java.lang.IllegalStateException - if there is no default PersistenceUnitInfo defined or it has already been obtained
      • obtainPersistenceUnitInfo

        PersistenceUnitInfo obtainPersistenceUnitInfo(java.lang.String persistenceUnitName)
                                               throws java.lang.IllegalArgumentException,
                                                      java.lang.IllegalStateException
        Obtain the specified PersistenceUnitInfo from this manager.
        Parameters:
        persistenceUnitName - the name of the desired persistence unit
        Returns:
        the PersistenceUnitInfo (never null)
        Throws:
        java.lang.IllegalArgumentException - if no PersistenceUnitInfo with the given name is defined
        java.lang.IllegalStateException - if the PersistenceUnitInfo with the given name has already been obtained