Fix and improve Javadoc in spring-orm

See gh-28796
This commit is contained in:
Marc Wrobel
2022-07-12 13:48:23 +02:00
committed by Sam Brannen
parent cfb39acc97
commit ac06d1dfa9
10 changed files with 17 additions and 17 deletions

View File

@@ -142,7 +142,7 @@ public class OpenSessionInViewInterceptor implements AsyncWebRequestInterceptor
}
/**
* Unbind the Hibernate {@code Session} from the thread and close it).
* Unbind the Hibernate {@code Session} from the thread and close it.
* @see TransactionSynchronizationManager
*/
@Override

View File

@@ -218,10 +218,10 @@ public abstract class AbstractEntityManagerFactoryBean implements
}
/**
* Allow Map access to the JPA properties to be passed to the persistence
* Allow {@code Map} access to the JPA properties to be passed to the persistence
* provider, with the option to add or override specific entries.
* <p>Useful for specifying entries directly, for example via
* "jpaPropertyMap[myKey]".
* {@code jpaPropertyMap[myKey]}.
*/
public Map<String, Object> getJpaPropertyMap() {
return this.jpaPropertyMap;

View File

@@ -131,9 +131,9 @@ public abstract class EntityManagerFactoryAccessor implements BeanFactoryAware {
}
/**
* Allow Map access to the JPA properties to be passed to the persistence
* Allow {@code Map} access to the JPA properties to be passed to the persistence
* provider, with the option to add or override specific entries.
* <p>Useful for specifying entries directly, for example via "jpaPropertyMap[myKey]".
* <p>Useful for specifying entries directly, for example via {@code jpaPropertyMap[myKey]}.
*/
public Map<String, Object> getJpaPropertyMap() {
return this.jpaPropertyMap;

View File

@@ -37,7 +37,7 @@ public interface EntityManagerProxy extends EntityManager {
* raw EntityManager.
* <p>In case of a shared ("transactional") EntityManager, this will be
* the raw EntityManager that is currently associated with the transaction.
* Outside of a transaction, an IllegalStateException will be thrown.
* Outside a transaction, an IllegalStateException will be thrown.
* @return the underlying raw EntityManager (never {@code null})
* @throws IllegalStateException if no underlying EntityManager is available
*/

View File

@@ -50,7 +50,7 @@ import org.springframework.util.ConcurrentReferenceHashMap;
* Delegate for creating a variety of {@link javax.persistence.EntityManager}
* proxies that follow the JPA spec's semantics for "extended" EntityManagers.
*
* <p>Supports several different variants of "extended" EntityManagers:
* <p>Supports several variants of "extended" EntityManagers:
* in particular, an "application-managed extended EntityManager", as defined
* by {@link javax.persistence.EntityManagerFactory#createEntityManager()},
* as well as a "container-managed extended EntityManager", as defined by

View File

@@ -228,9 +228,9 @@ public class JpaTransactionManager extends AbstractPlatformTransactionManager
}
/**
* Allow Map access to the JPA properties to be passed to the persistence
* Allow {@code Map} access to the JPA properties to be passed to the persistence
* provider, with the option to add or override specific entries.
* <p>Useful for specifying entries directly, for example via "jpaPropertyMap[myKey]".
* <p>Useful for specifying entries directly, for example via {@code jpaPropertyMap[myKey]}.
*/
public Map<String, Object> getJpaPropertyMap() {
return this.jpaPropertyMap;

View File

@@ -66,7 +66,7 @@ public interface JpaVendorAdapter {
* 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
* (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.

View File

@@ -119,7 +119,7 @@ public class ApplicationManagedEntityManagerIntegrationTests extends AbstractEnt
doInstantiateAndSave(em);
setComplete();
endTransaction(); // Should rollback
endTransaction(); // Should roll back
assertThat(countRowsInTable(em, "person")).as("Tx must have committed back").isEqualTo(1);
// Now clean up the database
@@ -139,7 +139,7 @@ public class ApplicationManagedEntityManagerIntegrationTests extends AbstractEnt
EntityManager em = entityManagerFactory.createEntityManager();
em.joinTransaction();
doInstantiateAndSave(em);
endTransaction(); // Should rollback
endTransaction(); // Should roll back
assertThat(countRowsInTable(em, "person")).as("Tx must have been rolled back").isEqualTo(0);
}
@@ -150,7 +150,7 @@ public class ApplicationManagedEntityManagerIntegrationTests extends AbstractEnt
doInstantiateAndSave(em);
setComplete();
endTransaction(); // Should rollback
endTransaction(); // Should roll back
assertThat(countRowsInTable(em, "person")).as("Tx must have committed back").isEqualTo(1);
// Now clean up the database

View File

@@ -139,7 +139,7 @@ public class ContainerManagedEntityManagerIntegrationTests extends AbstractEntit
doInstantiateAndSave(em);
setComplete();
endTransaction(); // Should rollback
endTransaction(); // Should roll back
assertThat(countRowsInTable(em, "person")).as("Tx must have committed back").isEqualTo(1);
// Now clean up the database
@@ -150,7 +150,7 @@ public class ContainerManagedEntityManagerIntegrationTests extends AbstractEntit
public void testRollbackOccurs() {
EntityManager em = createContainerManagedEntityManager();
doInstantiateAndSave(em);
endTransaction(); // Should rollback
endTransaction(); // Should roll back
assertThat(countRowsInTable(em, "person")).as("Tx must have been rolled back").isEqualTo(0);
}
@@ -159,7 +159,7 @@ public class ContainerManagedEntityManagerIntegrationTests extends AbstractEntit
EntityManager em = createContainerManagedEntityManager();
doInstantiateAndSave(em);
setComplete();
endTransaction(); // Should rollback
endTransaction(); // Should roll back
assertThat(countRowsInTable(em, "person")).as("Tx must have committed back").isEqualTo(1);
// Now clean up the database

View File

@@ -31,7 +31,7 @@ import org.springframework.beans.testfixture.beans.TestBean;
import org.springframework.context.ApplicationContext;
/**
* Simple JavaBean domain object representing an person.
* Simple JavaBean domain object representing a person.
*
* @author Rod Johnson
*/