Class ReactiveProviderChecker
java.lang.Object
org.hibernate.reactive.provider.impl.ReactiveProviderChecker
Helper for handling checks to see whether ReactivePersistenceProvider is the requested
PersistenceProvider.
Copied and adapted from ProviderChecker.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringextractRequestedProviderName(org.hibernate.jpa.boot.spi.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(org.hibernate.jpa.boot.spi.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...)
-
Method Details
-
isProvider
public static boolean isProvider(org.hibernate.jpa.boot.spi.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...)- Parameters:
persistenceUnit- The<persistence-unit/>descriptor.integration- The integration values.- Returns:
trueif Hibernate should be the provider;falseotherwise.
-
hibernateProviderNamesContain
Is the requested provider name one of the recognized Hibernate provider names?- Parameters:
requestedProviderName- The requested provider name to check against the recognized Hibernate names.- Returns:
trueif Hibernate should be the provider;falseotherwise.
-
extractRequestedProviderName
public static String extractRequestedProviderName(org.hibernate.jpa.boot.spi.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.- Parameters:
persistenceUnit- The<persistence-unit/>descriptor.integration- The integration values.- Returns:
- The extracted provider name, or
nullif none found.
-