Replace 'e.g.' with 'for example' in documentation and comments
Closes gh-33515
This commit is contained in:
committed by
Sam Brannen
parent
e55fe9077f
commit
8941e2876e
@@ -290,7 +290,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
|
||||
* {@link TransactionSynchronizationManager}
|
||||
* check preceding it).
|
||||
* <p>Default is "false", i.e. using a Spring-managed Session: taking the current
|
||||
* thread-bound Session if available (e.g. in an Open-Session-in-View scenario),
|
||||
* thread-bound Session if available (for example, in an Open-Session-in-View scenario),
|
||||
* creating a new Session for the current transaction otherwise.
|
||||
* <p>Switch this flag to "true" in order to enforce use of a Hibernate-managed Session.
|
||||
* Note that this requires {@link SessionFactory#getCurrentSession()}
|
||||
@@ -313,7 +313,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
|
||||
/**
|
||||
* Specify a callback for customizing every Hibernate {@code Session} resource
|
||||
* created for a new transaction managed by this {@code HibernateTransactionManager}.
|
||||
* <p>This enables convenient customizations for application purposes, e.g.
|
||||
* <p>This enables convenient customizations for application purposes, for example,
|
||||
* setting Hibernate filters.
|
||||
* @since 5.3
|
||||
* @see Session#enableFilter
|
||||
|
||||
@@ -385,7 +385,7 @@ public class LocalSessionFactoryBean extends HibernateExceptionTranslator
|
||||
|
||||
/**
|
||||
* Specify an asynchronous executor for background bootstrapping,
|
||||
* e.g. a {@link org.springframework.core.task.SimpleAsyncTaskExecutor}.
|
||||
* for example, a {@link org.springframework.core.task.SimpleAsyncTaskExecutor}.
|
||||
* <p>{@code SessionFactory} initialization will then switch into background
|
||||
* bootstrap mode, with a {@code SessionFactory} proxy immediately returned for
|
||||
* injection purposes instead of waiting for Hibernate's bootstrapping to complete.
|
||||
@@ -416,7 +416,7 @@ public class LocalSessionFactoryBean extends HibernateExceptionTranslator
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify a Hibernate {@link MetadataSources} service to use (e.g. reusing an
|
||||
* Specify a Hibernate {@link MetadataSources} service to use (for example, reusing an
|
||||
* existing one), potentially populated with a custom Hibernate bootstrap
|
||||
* {@link org.hibernate.service.ServiceRegistry} as well.
|
||||
* @since 4.3
|
||||
@@ -618,7 +618,7 @@ public class LocalSessionFactoryBean extends HibernateExceptionTranslator
|
||||
* of the SessionFactory instance, creating it via the given Configuration
|
||||
* object that got prepared by this LocalSessionFactoryBean.
|
||||
* <p>The default implementation invokes LocalSessionFactoryBuilder's buildSessionFactory.
|
||||
* A custom implementation could prepare the instance in a specific way (e.g. applying
|
||||
* A custom implementation could prepare the instance in a specific way (for example, applying
|
||||
* a custom ServiceRegistry) or use a custom SessionFactoryImpl subclass.
|
||||
* @param sfb a LocalSessionFactoryBuilder prepared by this LocalSessionFactoryBean
|
||||
* @return the SessionFactory instance
|
||||
|
||||
@@ -75,7 +75,7 @@ import org.springframework.util.ClassUtils;
|
||||
* adding {@link SpringSessionContext} as a default and providing convenient ways
|
||||
* to specify a JDBC {@link DataSource} and an application class loader.
|
||||
*
|
||||
* <p>This is designed for programmatic use, e.g. in {@code @Bean} factory methods;
|
||||
* <p>This is designed for programmatic use, for example, in {@code @Bean} factory methods;
|
||||
* consider using {@link LocalSessionFactoryBean} for XML bean definition files.
|
||||
* Typically combined with {@link HibernateTransactionManager} for declarative
|
||||
* transactions against the {@code SessionFactory} and its JDBC {@code DataSource}.
|
||||
@@ -159,7 +159,7 @@ public class LocalSessionFactoryBuilder extends Configuration {
|
||||
* @param dataSource the JDBC DataSource that the resulting Hibernate SessionFactory should be using
|
||||
* (may be {@code null})
|
||||
* @param resourceLoader the ResourceLoader to load application classes from
|
||||
* @param metadataSources the Hibernate MetadataSources service to use (e.g. reusing an existing one)
|
||||
* @param metadataSources the Hibernate MetadataSources service to use (for example, reusing an existing one)
|
||||
* @since 4.3
|
||||
*/
|
||||
public LocalSessionFactoryBuilder(
|
||||
@@ -392,7 +392,7 @@ public class LocalSessionFactoryBuilder extends Configuration {
|
||||
/**
|
||||
* Build the Hibernate {@code SessionFactory} through background bootstrapping,
|
||||
* using the given executor for a parallel initialization phase
|
||||
* (e.g. a {@link org.springframework.core.task.SimpleAsyncTaskExecutor}).
|
||||
* (for example, a {@link org.springframework.core.task.SimpleAsyncTaskExecutor}).
|
||||
* <p>{@code SessionFactory} initialization will then switch into background
|
||||
* bootstrap mode, with a {@code SessionFactory} proxy immediately returned for
|
||||
* injection purposes instead of waiting for Hibernate's bootstrapping to complete.
|
||||
|
||||
@@ -41,7 +41,7 @@ import org.springframework.util.ConcurrentReferenceHashMap;
|
||||
* <p>Auto-configured by {@link LocalSessionFactoryBean#setBeanFactory},
|
||||
* programmatically supported via {@link LocalSessionFactoryBuilder#setBeanContainer},
|
||||
* and manually configurable through a "hibernate.resource.beans.container" entry
|
||||
* in JPA properties, e.g.:
|
||||
* in JPA properties, for example:
|
||||
*
|
||||
* <pre class="code">
|
||||
* <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
|
||||
|
||||
@@ -80,7 +80,7 @@ import org.springframework.util.CollectionUtils;
|
||||
* interface, as autodetected by Spring's
|
||||
* {@link org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor},
|
||||
* for AOP-based translation of native exceptions to Spring DataAccessExceptions.
|
||||
* Hence, the presence of e.g. LocalEntityManagerFactoryBean automatically enables
|
||||
* Hence, the presence of, for example, LocalEntityManagerFactoryBean automatically enables
|
||||
* a PersistenceExceptionTranslationPostProcessor to translate JPA exceptions.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
@@ -301,7 +301,7 @@ public abstract class AbstractEntityManagerFactoryBean implements
|
||||
* by the exposed {@code EntityManagerFactory}.
|
||||
* <p>This is an alternative to a {@code JpaVendorAdapter}-level
|
||||
* {@code postProcessEntityManager} implementation, enabling convenient
|
||||
* customizations for application purposes, e.g. setting Hibernate filters.
|
||||
* customizations for application purposes, for example, setting Hibernate filters.
|
||||
* @since 5.3
|
||||
* @see JpaVendorAdapter#postProcessEntityManager
|
||||
* @see JpaTransactionManager#setEntityManagerInitializer
|
||||
@@ -312,7 +312,7 @@ public abstract class AbstractEntityManagerFactoryBean implements
|
||||
|
||||
/**
|
||||
* Specify an asynchronous executor for background bootstrapping,
|
||||
* e.g. a {@link org.springframework.core.task.SimpleAsyncTaskExecutor}.
|
||||
* for example, a {@link org.springframework.core.task.SimpleAsyncTaskExecutor}.
|
||||
* <p>{@code EntityManagerFactory} initialization will then switch into background
|
||||
* bootstrap mode, with a {@code EntityManagerFactory} proxy immediately returned for
|
||||
* injection purposes instead of waiting for the JPA provider's bootstrapping to complete.
|
||||
|
||||
@@ -123,7 +123,7 @@ public abstract class EntityManagerFactoryUtils {
|
||||
|
||||
/**
|
||||
* Obtain a JPA EntityManager from the given factory. Is aware of a corresponding
|
||||
* EntityManager bound to the current thread, e.g. when using JpaTransactionManager.
|
||||
* EntityManager bound to the current thread, for example, when using JpaTransactionManager.
|
||||
* <p>Note: Will return {@code null} if no thread-bound EntityManager found!
|
||||
* @param emf the EntityManagerFactory to create the EntityManager with
|
||||
* @return the EntityManager, or {@code null} if none found
|
||||
@@ -139,7 +139,7 @@ public abstract class EntityManagerFactoryUtils {
|
||||
|
||||
/**
|
||||
* Obtain a JPA EntityManager from the given factory. Is aware of a corresponding
|
||||
* EntityManager bound to the current thread, e.g. when using JpaTransactionManager.
|
||||
* EntityManager bound to the current thread, for example, when using JpaTransactionManager.
|
||||
* <p>Note: Will return {@code null} if no thread-bound EntityManager found!
|
||||
* @param emf the EntityManagerFactory to create the EntityManager with
|
||||
* @param properties the properties to be passed into the {@code createEntityManager}
|
||||
@@ -161,7 +161,7 @@ public abstract class EntityManagerFactoryUtils {
|
||||
|
||||
/**
|
||||
* Obtain a JPA EntityManager from the given factory. Is aware of a corresponding
|
||||
* EntityManager bound to the current thread, e.g. when using JpaTransactionManager.
|
||||
* EntityManager bound to the current thread, for example, when using JpaTransactionManager.
|
||||
* <p>Same as {@code getEntityManager}, but throwing the original PersistenceException.
|
||||
* @param emf the EntityManagerFactory to create the EntityManager with
|
||||
* @param properties the properties to be passed into the {@code createEntityManager}
|
||||
@@ -180,7 +180,7 @@ public abstract class EntityManagerFactoryUtils {
|
||||
|
||||
/**
|
||||
* Obtain a JPA EntityManager from the given factory. Is aware of a corresponding
|
||||
* EntityManager bound to the current thread, e.g. when using JpaTransactionManager.
|
||||
* EntityManager bound to the current thread, for example, when using JpaTransactionManager.
|
||||
* <p>Same as {@code getEntityManager}, but throwing the original PersistenceException.
|
||||
* @param emf the EntityManagerFactory to create the EntityManager with
|
||||
* @param properties the properties to be passed into the {@code createEntityManager}
|
||||
@@ -433,7 +433,7 @@ public abstract class EntityManagerFactoryUtils {
|
||||
|
||||
/**
|
||||
* Callback for resource cleanup at the end of a non-JPA transaction
|
||||
* (e.g. when participating in a JtaTransactionManager transaction),
|
||||
* (for example, when participating in a JtaTransactionManager transaction),
|
||||
* fully synchronized with the ongoing transaction.
|
||||
* @see org.springframework.transaction.jta.JtaTransactionManager
|
||||
*/
|
||||
|
||||
@@ -87,7 +87,7 @@ public interface JpaDialect extends PersistenceExceptionTranslator {
|
||||
/**
|
||||
* Prepare a JPA transaction, applying the specified semantics. Called by
|
||||
* EntityManagerFactoryUtils when enlisting an EntityManager in a JTA transaction
|
||||
* or a locally joined transaction (e.g. after upgrading an unsynchronized
|
||||
* or a locally joined transaction (for example, after upgrading an unsynchronized
|
||||
* EntityManager to a synchronized one).
|
||||
* <p>An implementation can apply the read-only flag as flush mode. In that case,
|
||||
* a transaction data object can be returned that holds the previous flush mode
|
||||
|
||||
@@ -45,7 +45,7 @@ public interface JpaVendorAdapter {
|
||||
|
||||
/**
|
||||
* Return the name of the persistence provider's root package
|
||||
* (e.g. "oracle.toplink.essentials"). Will be used for
|
||||
* (for example, "oracle.toplink.essentials"). Will be used for
|
||||
* excluding provider classes from temporary class overriding.
|
||||
* @since 2.5.2
|
||||
*/
|
||||
@@ -140,7 +140,7 @@ public interface JpaVendorAdapter {
|
||||
/**
|
||||
* Optional callback for post-processing the native EntityManager
|
||||
* before active use.
|
||||
* <p>This can be used for setting vendor-specific parameters, e.g.
|
||||
* <p>This can be used for setting vendor-specific parameters, for example,
|
||||
* Hibernate filters, on every new EntityManager.
|
||||
* @since 5.3
|
||||
*/
|
||||
|
||||
@@ -184,7 +184,7 @@ public class LocalContainerEntityManagerFactoryBean extends AbstractEntityManage
|
||||
* In particular, JPA providers may pick up annotated packages for provider-specific
|
||||
* annotations only when driven by {@code persistence.xml}. As of 4.1, Spring's
|
||||
* scan can detect annotated packages as well if supported by the given
|
||||
* {@link JpaVendorAdapter} (e.g. for Hibernate).
|
||||
* {@link JpaVendorAdapter} (for example, for Hibernate).
|
||||
* <p>If no explicit {@link #setMappingResources mapping resources} have been
|
||||
* specified in addition to these packages, Spring's setup looks for a default
|
||||
* {@code META-INF/orm.xml} file in the classpath, registering it as a mapping
|
||||
@@ -218,7 +218,7 @@ public class LocalContainerEntityManagerFactoryBean extends AbstractEntityManage
|
||||
* Can be used on its own or in combination with entity scanning in the classpath,
|
||||
* in both cases avoiding {@code persistence.xml}.
|
||||
* <p>Note that mapping resources must be relative to the classpath root,
|
||||
* e.g. "META-INF/mappings.xml" or "com/mycompany/repository/mappings.xml",
|
||||
* for example, "META-INF/mappings.xml" or "com/mycompany/repository/mappings.xml",
|
||||
* so that they can be loaded through {@code ClassLoader.getResource}.
|
||||
* <p>If no explicit mapping resources have been specified next to
|
||||
* {@link #setPackagesToScan packages to scan}, Spring's setup looks for a default
|
||||
|
||||
@@ -219,7 +219,7 @@ public class DefaultPersistenceUnitManager
|
||||
* In particular, JPA providers may pick up annotated packages for provider-specific
|
||||
* annotations only when driven by {@code persistence.xml}. As of 4.1, Spring's
|
||||
* scan can detect annotated packages as well if supported by the given
|
||||
* {@link org.springframework.orm.jpa.JpaVendorAdapter} (e.g. for Hibernate).
|
||||
* {@link org.springframework.orm.jpa.JpaVendorAdapter} (for example, for Hibernate).
|
||||
* <p>If no explicit {@link #setMappingResources mapping resources} have been
|
||||
* specified in addition to these packages, this manager looks for a default
|
||||
* {@code META-INF/orm.xml} file in the classpath, registering it as a mapping
|
||||
@@ -251,7 +251,7 @@ public class DefaultPersistenceUnitManager
|
||||
* Can be used on its own or in combination with entity scanning in the classpath,
|
||||
* in both cases avoiding {@code persistence.xml}.
|
||||
* <p>Note that mapping resources must be relative to the classpath root,
|
||||
* e.g. "META-INF/mappings.xml" or "com/mycompany/repository/mappings.xml",
|
||||
* for example, "META-INF/mappings.xml" or "com/mycompany/repository/mappings.xml",
|
||||
* so that they can be loaded through {@code ClassLoader.getResource}.
|
||||
* <p>If no explicit mapping resources have been specified next to
|
||||
* {@link #setPackagesToScan packages to scan}, this manager looks for a default
|
||||
|
||||
@@ -113,7 +113,7 @@ import org.springframework.util.StringUtils;
|
||||
* with the bean name used as fallback unit name if no deployed name found.
|
||||
* Typically, Spring's {@link org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean}
|
||||
* will be used for setting up such EntityManagerFactory beans. Alternatively,
|
||||
* such beans may also be obtained from JNDI, e.g. using the {@code jee:jndi-lookup}
|
||||
* such beans may also be obtained from JNDI, for example, using the {@code jee:jndi-lookup}
|
||||
* XML configuration element (with the bean name matching the requested unit name).
|
||||
* In both cases, the post-processor definition will look as simple as this:
|
||||
*
|
||||
|
||||
@@ -91,7 +91,7 @@ public abstract class AbstractJpaVendorAdapter implements JpaVendorAdapter {
|
||||
* <p><b>NOTE: Do not set this flag to 'true' while also setting JPA's
|
||||
* {@code jakarta.persistence.schema-generation.database.action} property.</b>
|
||||
* These two schema generation mechanisms - standard JPA versus provider-native -
|
||||
* are mutually exclusive, e.g. with Hibernate 5.
|
||||
* are mutually exclusive, for example, with Hibernate 5.
|
||||
* @see org.springframework.orm.jpa.AbstractEntityManagerFactoryBean#setJpaProperties
|
||||
*/
|
||||
public void setGenerateDdl(boolean generateDdl) {
|
||||
|
||||
@@ -53,7 +53,7 @@ import org.springframework.util.ClassUtils;
|
||||
* EntityManager interface, and adapts {@link AbstractJpaVendorAdapter}'s common
|
||||
* configuration settings. Also supports the detection of annotated packages (through
|
||||
* {@link org.springframework.orm.jpa.persistenceunit.SmartPersistenceUnitInfo#getManagedPackages()}),
|
||||
* e.g. containing Hibernate {@link org.hibernate.annotations.FilterDef} annotations,
|
||||
* for example, containing Hibernate {@link org.hibernate.annotations.FilterDef} annotations,
|
||||
* along with Spring-driven entity scanning which requires no {@code persistence.xml}
|
||||
* ({@link org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean#setPackagesToScan}).
|
||||
*
|
||||
@@ -103,7 +103,7 @@ public class HibernateJpaVendorAdapter extends AbstractJpaVendorAdapter {
|
||||
* new connection handling mode {@code DELAYED_ACQUISITION_AND_HOLD} in that case
|
||||
* unless a user-specified connection handling mode property indicates otherwise;
|
||||
* switch this flag to {@code false} to avoid that interference.
|
||||
* <p><b>NOTE: For a persistence unit with transaction type JTA e.g. on WebLogic,
|
||||
* <p><b>NOTE: For a persistence unit with transaction type JTA, for example, on WebLogic,
|
||||
* the connection release mode will never be altered from its provider default,
|
||||
* i.e. not be forced to {@code DELAYED_ACQUISITION_AND_HOLD} by this flag.</b>
|
||||
* Alternatively, set Hibernate's "hibernate.connection.handling_mode"
|
||||
|
||||
Reference in New Issue
Block a user