类 ProviderChecker
- java.lang.Object
-
- org.hibernate.jpa.boot.spi.ProviderChecker
-
public final class ProviderChecker extends Object
Helper for handling checks to see whether Hibernate is the requestedPersistenceProvider- 作者:
- Steve Ebersole
-
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static StringextractRequestedProviderName(PersistenceUnitDescriptor persistenceUnit, Map integration)Extract the requested persistence provider name using the algorithm Hibernate uses.static booleanhibernateProviderNamesContain(String requestedProviderName)Is the requested provider name one of the recognized Hibernate provider names?static booleanisProvider(PersistenceUnitDescriptor persistenceUnit, Map integration)Does the descriptor and/or integration request Hibernate as thePersistenceProvider?
-
-
-
方法详细资料
-
isProvider
public static boolean isProvider(PersistenceUnitDescriptor persistenceUnit, Map integration)
Does the descriptor and/or integration request Hibernate as thePersistenceProvider? Note that in the case of no requested provider being named we assume we are the provider (the calls got to us somehow...)- 参数:
persistenceUnit- The<persistence-unit/>descriptor.integration- The integration values.- 返回:
trueif Hibernate should be the provider;falseotherwise.
-
hibernateProviderNamesContain
public static boolean hibernateProviderNamesContain(String requestedProviderName)
Is the requested provider name one of the recognized Hibernate provider names?- 参数:
requestedProviderName- The requested provider name to check against the recognized Hibernate names.- 返回:
trueif Hibernate should be the provider;falseotherwise.
-
extractRequestedProviderName
public static String extractRequestedProviderName(PersistenceUnitDescriptor persistenceUnit, Map integration)
Extract the requested persistence provider name using the algorithm Hibernate uses. Namely, a provider named in the 'integration' map (under the key '"javax.persistence.provider"') is preferred, as per-spec, over value specified in persistence unit.- 参数:
persistenceUnit- The<persistence-unit/>descriptor.integration- The integration values.- 返回:
- The extracted provider name, or
nullif none found.
-
-