/** * Does the descriptor and/or integration request Hibernate as the * {@link javax.persistence.spi.PersistenceProvider}? Note that in the case of no requested provider being named * we assume we are the provider (the calls got to us somehow...) * * @param persistenceUnit The {@code <persistence-unit/>} descriptor. * @param integration The integration values. * * @return {@code true} if Hibernate should be the provider; {@code false} otherwise. */ public static boolean isProvider(PersistenceUnitDescriptor persistenceUnit, Map integration) { // See if we (Hibernate) are the persistence provider return hibernateProviderNamesContain( extractRequestedProviderName( persistenceUnit, integration ) ); }
/** * Does the descriptor and/or integration request Hibernate as the * {@link javax.persistence.spi.PersistenceProvider}? Note that in the case of no requested provider being named * we assume we are the provider (the calls got to us somehow...) * * @param persistenceUnit The {@code <persistence-unit/>} descriptor. * @param integration The integration values. * * @return {@code true} if Hibernate should be the provider; {@code false} otherwise. */ public static boolean isProvider(PersistenceUnitDescriptor persistenceUnit, Map integration) { // See if we (Hibernate) are the persistence provider return hibernateProviderNamesContain( extractRequestedProviderName( persistenceUnit, integration ) ); }