Example usage for org.hibernate.jpa.boot.spi ProviderChecker extractRequestedProviderName

List of usage examples for org.hibernate.jpa.boot.spi ProviderChecker extractRequestedProviderName

Introduction

In this page you can find the example usage for org.hibernate.jpa.boot.spi ProviderChecker extractRequestedProviderName.

Prototype

public static String extractRequestedProviderName(PersistenceUnitDescriptor persistenceUnit, Map integration) 

Source Link

Document

Extract the requested persistence provider name using the algorithm Hibernate uses.

Usage

From source file:org.babyfish.hibernate.jpa.HibernatePersistenceProvider.java

License:Open Source License

public static boolean isProvider(PersistenceUnitDescriptor persistenceUnit, Map<?, ?> integration) {
    if (ProviderChecker.isProvider(persistenceUnit, integration)) {
        return true;
    }//from   w ww  . j  a  va2s .  c o  m
    String providerClassName = ProviderChecker.extractRequestedProviderName(persistenceUnit, integration);
    return HibernatePersistenceProvider.class.getName().equals(providerClassName);
}