/** * Return a Map of vendor-specific JPA properties for the given persistence * unit, typically based on settings in this JpaVendorAdapter instance. * <p>Note that there might be further JPA properties defined on the * EntityManagerFactory bean, which might potentially override individual * JPA property values specified here. * <p>This implementation delegates to {@link #getJpaPropertyMap()} for * non-unit-dependent properties. Effectively, this PersistenceUnitInfo-based * variant only needs to be implemented if there is an actual need to react * to unit-specific characteristics such as the transaction type. * <p><b>NOTE:</b> This variant will only be invoked in case of Java EE style * container bootstrapping where a {@link PersistenceUnitInfo} is present * (i.e. {@link LocalContainerEntityManagerFactoryBean}. In case of simple * Java SE style bootstrapping via {@link javax.persistence.Persistence} * (i.e. {@link LocalEntityManagerFactoryBean}), the parameter-less * {@link #getJpaPropertyMap()} variant will be called directly. * @param pui the PersistenceUnitInfo for the current persistence unit * @return a Map of JPA properties, as accepted by the standard JPA bootstrap * facilities, or an empty Map if there are no properties to expose * @since 4.3.13 * @see PersistenceUnitInfo#getTransactionType() * @see javax.persistence.spi.PersistenceProvider#createContainerEntityManagerFactory(PersistenceUnitInfo, Map) */ default Map<String, ?> getJpaPropertyMap(PersistenceUnitInfo pui) { return getJpaPropertyMap(); }
/** * Return a Map of vendor-specific JPA properties for the given persistence * unit, typically based on settings in this JpaVendorAdapter instance. * <p>Note that there might be further JPA properties defined on the * EntityManagerFactory bean, which might potentially override individual * JPA property values specified here. * <p>This implementation delegates to {@link #getJpaPropertyMap()} for * non-unit-dependent properties. Effectively, this PersistenceUnitInfo-based * variant only needs to be implemented if there is an actual need to react * to unit-specific characteristics such as the transaction type. * <p><b>NOTE:</b> This variant will only be invoked in case of Java EE style * container bootstrapping where a {@link PersistenceUnitInfo} is present * (i.e. {@link LocalContainerEntityManagerFactoryBean}. In case of simple * Java SE style bootstrapping via {@link javax.persistence.Persistence} * (i.e. {@link LocalEntityManagerFactoryBean}), the parameter-less * {@link #getJpaPropertyMap()} variant will be called directly. * @param pui the PersistenceUnitInfo for the current persistence unit * @return a Map of JPA properties, as accepted by the standard JPA bootstrap * facilities, or an empty Map if there are no properties to expose * @since 4.3.13 * @see PersistenceUnitInfo#getTransactionType() * @see javax.persistence.spi.PersistenceProvider#createContainerEntityManagerFactory(PersistenceUnitInfo, Map) */ default Map<String, ?> getJpaPropertyMap(PersistenceUnitInfo pui) { return getJpaPropertyMap(); }
Map<String, ?> vendorPropertyMap = (pui != null ? jpaVendorAdapter.getJpaPropertyMap(pui) : jpaVendorAdapter.getJpaPropertyMap()); if (!CollectionUtils.isEmpty(vendorPropertyMap)) { vendorPropertyMap.forEach((key, value) -> {
Map<String, ?> vendorPropertyMap = (pui != null ? jpaVendorAdapter.getJpaPropertyMap(pui) : jpaVendorAdapter.getJpaPropertyMap()); if (!CollectionUtils.isEmpty(vendorPropertyMap)) { vendorPropertyMap.forEach((key, value) -> {
props.putAll(factory.getJpaVendorAdapter().getJpaPropertyMap()); props.putAll(factory.getJpaPropertyMap());