Fix javadoc checkstyle issues
Fix checkstyle violations for javadoc. Issue: SPR-16968
This commit is contained in:
committed by
Juergen Hoeller
parent
032096d699
commit
e0480f75ac
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,6 +29,7 @@ import org.springframework.lang.Nullable;
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 4.2
|
||||
* @param <T> the result type
|
||||
* @see HibernateTemplate
|
||||
* @see HibernateTransactionManager
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -62,7 +62,7 @@ public class HibernateExceptionTranslator implements PersistenceExceptionTransla
|
||||
/**
|
||||
* Convert the given HibernateException to an appropriate exception from the
|
||||
* {@code org.springframework.dao} hierarchy.
|
||||
* @param ex HibernateException that occurred
|
||||
* @param ex the HibernateException that occurred
|
||||
* @return a corresponding DataAccessException
|
||||
* @see SessionFactoryUtils#convertHibernateAccessException
|
||||
*/
|
||||
|
||||
@@ -69,7 +69,7 @@ import org.springframework.util.ReflectionUtils;
|
||||
*
|
||||
* <p><b>NOTE: Hibernate access code can also be coded against the native Hibernate
|
||||
* {@link Session}. Hence, for newly started projects, consider adopting the standard
|
||||
* Hibernate style of coding against {@link SessionFactory#getCurrentSession()}.</b>
|
||||
* Hibernate style of coding against {@link SessionFactory#getCurrentSession()}.
|
||||
* Alternatively, use {@link #execute(HibernateCallback)} with Java 8 lambda code blocks
|
||||
* against the callback-provided {@code Session} which results in elegant code as well,
|
||||
* decoupled from the Hibernate Session lifecycle. The remaining operations on this
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -145,7 +145,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
|
||||
|
||||
/**
|
||||
* Create a new HibernateTransactionManager instance.
|
||||
* @param sessionFactory SessionFactory to manage transactions for
|
||||
* @param sessionFactory the SessionFactory to manage transactions for
|
||||
*/
|
||||
public HibernateTransactionManager(SessionFactory sessionFactory) {
|
||||
this.sessionFactory = sessionFactory;
|
||||
@@ -777,7 +777,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
|
||||
* from the {@code org.springframework.dao} hierarchy.
|
||||
* <p>Will automatically apply a specified SQLExceptionTranslator to a
|
||||
* Hibernate JDBCException, else rely on Hibernate's default translation.
|
||||
* @param ex HibernateException that occurred
|
||||
* @param ex the HibernateException that occurred
|
||||
* @return a corresponding DataAccessException
|
||||
* @see SessionFactoryUtils#convertHibernateAccessException
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -351,8 +351,8 @@ public class LocalSessionFactoryBean extends HibernateExceptionTranslator
|
||||
* then block until Hibernate's bootstrapping completed, if not ready by then.
|
||||
* For maximum benefit, make sure to avoid early {@code SessionFactory} calls
|
||||
* in init methods of related beans, even for metadata introspection purposes.
|
||||
* @see LocalSessionFactoryBuilder#buildSessionFactory(AsyncTaskExecutor)
|
||||
* @since 4.3
|
||||
* @see LocalSessionFactoryBuilder#buildSessionFactory(AsyncTaskExecutor)
|
||||
*/
|
||||
public void setBootstrapExecutor(AsyncTaskExecutor bootstrapExecutor) {
|
||||
this.bootstrapExecutor = bootstrapExecutor;
|
||||
@@ -526,7 +526,7 @@ public class LocalSessionFactoryBean extends HibernateExceptionTranslator
|
||||
* <p>The default implementation invokes LocalSessionFactoryBuilder's buildSessionFactory.
|
||||
* A custom implementation could prepare the instance in a specific way (e.g. applying
|
||||
* a custom ServiceRegistry) or use a custom SessionFactoryImpl subclass.
|
||||
* @param sfb LocalSessionFactoryBuilder prepared by this LocalSessionFactoryBean
|
||||
* @param sfb a LocalSessionFactoryBuilder prepared by this LocalSessionFactoryBean
|
||||
* @return the SessionFactory instance
|
||||
* @see LocalSessionFactoryBuilder#buildSessionFactory
|
||||
*/
|
||||
|
||||
@@ -216,7 +216,7 @@ public abstract class SessionFactoryUtils {
|
||||
/**
|
||||
* Convert the given HibernateException to an appropriate exception
|
||||
* from the {@code org.springframework.dao} hierarchy.
|
||||
* @param ex HibernateException that occurred
|
||||
* @param ex the HibernateException that occurred
|
||||
* @return the corresponding DataAccessException instance
|
||||
* @see HibernateExceptionTranslator#convertHibernateAccessException
|
||||
* @see HibernateTransactionManager#convertHibernateAccessException
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -77,6 +77,9 @@ import org.springframework.web.filter.OncePerRequestFilter;
|
||||
*/
|
||||
public class OpenSessionInViewFilter extends OncePerRequestFilter {
|
||||
|
||||
/**
|
||||
* The default bean name used for the session factory.
|
||||
*/
|
||||
public static final String DEFAULT_SESSION_FACTORY_BEAN_NAME = "sessionFactory";
|
||||
|
||||
private String sessionFactoryBeanName = DEFAULT_SESSION_FACTORY_BEAN_NAME;
|
||||
|
||||
@@ -91,7 +91,7 @@ public abstract class AbstractEntityManagerFactoryBean implements
|
||||
FactoryBean<EntityManagerFactory>, BeanClassLoaderAware, BeanFactoryAware, BeanNameAware,
|
||||
InitializingBean, DisposableBean, EntityManagerFactoryInfo, PersistenceExceptionTranslator, Serializable {
|
||||
|
||||
/** Logger available to subclasses */
|
||||
/** Logger available to subclasses. */
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
@Nullable
|
||||
@@ -125,15 +125,15 @@ public abstract class AbstractEntityManagerFactoryBean implements
|
||||
@Nullable
|
||||
private String beanName;
|
||||
|
||||
/** Raw EntityManagerFactory as returned by the PersistenceProvider */
|
||||
/** Raw EntityManagerFactory as returned by the PersistenceProvider. */
|
||||
@Nullable
|
||||
private EntityManagerFactory nativeEntityManagerFactory;
|
||||
|
||||
/** Future for lazily initializing raw target EntityManagerFactory */
|
||||
/** Future for lazily initializing raw target EntityManagerFactory. */
|
||||
@Nullable
|
||||
private Future<EntityManagerFactory> nativeEntityManagerFactoryFuture;
|
||||
|
||||
/** Exposed client-level EntityManagerFactory proxy */
|
||||
/** Exposed client-level EntityManagerFactory proxy. */
|
||||
@Nullable
|
||||
private EntityManagerFactory entityManagerFactory;
|
||||
|
||||
@@ -505,7 +505,7 @@ public abstract class AbstractEntityManagerFactoryBean implements
|
||||
/**
|
||||
* Subclasses must implement this method to create the EntityManagerFactory
|
||||
* that will be returned by the {@code getObject()} method.
|
||||
* @return EntityManagerFactory instance returned by this FactoryBean
|
||||
* @return the EntityManagerFactory instance returned by this FactoryBean
|
||||
* @throws PersistenceException if the EntityManager cannot be created
|
||||
*/
|
||||
protected abstract EntityManagerFactory createNativeEntityManagerFactory() throws PersistenceException;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -43,7 +43,7 @@ import org.springframework.util.CollectionUtils;
|
||||
*/
|
||||
public abstract class EntityManagerFactoryAccessor implements BeanFactoryAware {
|
||||
|
||||
/** Logger available to subclasses */
|
||||
/** Logger available to subclasses. */
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -125,7 +125,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.
|
||||
* <p>Note: Will return {@code null} if no thread-bound EntityManager found!
|
||||
* @param emf EntityManagerFactory to create the EntityManager with
|
||||
* @param emf the EntityManagerFactory to create the EntityManager with
|
||||
* @return the EntityManager, or {@code null} if none found
|
||||
* @throws DataAccessResourceFailureException if the EntityManager couldn't be obtained
|
||||
* @see JpaTransactionManager
|
||||
@@ -141,7 +141,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.
|
||||
* <p>Note: Will return {@code null} if no thread-bound EntityManager found!
|
||||
* @param emf EntityManagerFactory to create the EntityManager with
|
||||
* @param emf the EntityManagerFactory to create the EntityManager with
|
||||
* @param properties the properties to be passed into the {@code createEntityManager}
|
||||
* call (may be {@code null})
|
||||
* @return the EntityManager, or {@code null} if none found
|
||||
@@ -163,7 +163,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.
|
||||
* <p>Same as {@code getEntityManager}, but throwing the original PersistenceException.
|
||||
* @param emf EntityManagerFactory to create the EntityManager with
|
||||
* @param emf the EntityManagerFactory to create the EntityManager with
|
||||
* @param properties the properties to be passed into the {@code createEntityManager}
|
||||
* call (may be {@code null})
|
||||
* @return the EntityManager, or {@code null} if none found
|
||||
@@ -182,7 +182,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.
|
||||
* <p>Same as {@code getEntityManager}, but throwing the original PersistenceException.
|
||||
* @param emf EntityManagerFactory to create the EntityManager with
|
||||
* @param emf the EntityManagerFactory to create the EntityManager with
|
||||
* @param properties the properties to be passed into the {@code createEntityManager}
|
||||
* call (may be {@code null})
|
||||
* @param synchronizedWithTransaction whether to automatically join ongoing
|
||||
@@ -329,7 +329,7 @@ public abstract class EntityManagerFactoryUtils {
|
||||
* Apply the current transaction timeout, if any, to the given JPA Query object.
|
||||
* <p>This method sets the JPA 2.0 query hint "javax.persistence.query.timeout" accordingly.
|
||||
* @param query the JPA Query object
|
||||
* @param emf JPA EntityManagerFactory that the Query was created for
|
||||
* @param emf the JPA EntityManagerFactory that the Query was created for
|
||||
*/
|
||||
public static void applyTransactionTimeout(Query query, EntityManagerFactory emf) {
|
||||
EntityManagerHolder emHolder = (EntityManagerHolder) TransactionSynchronizationManager.getResource(emf);
|
||||
|
||||
@@ -157,8 +157,8 @@ public abstract class ExtendedEntityManagerCreator {
|
||||
* transactions (according to the JPA 2.1 SynchronizationType rules)
|
||||
* @return a container-managed EntityManager that expects container-driven lifecycle
|
||||
* management but may opt out of automatic transaction synchronization
|
||||
* @see javax.persistence.EntityManagerFactory#createEntityManager(java.util.Map)
|
||||
* @since 4.0
|
||||
* @see javax.persistence.EntityManagerFactory#createEntityManager(java.util.Map)
|
||||
*/
|
||||
public static EntityManager createContainerManagedEntityManager(
|
||||
EntityManagerFactory emf, @Nullable Map<?, ?> properties, boolean synchronizedWithTransaction) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -138,7 +138,7 @@ public class JpaTransactionManager extends AbstractPlatformTransactionManager
|
||||
|
||||
/**
|
||||
* Create a new JpaTransactionManager instance.
|
||||
* @param emf EntityManagerFactory to manage transactions for
|
||||
* @param emf the EntityManagerFactory to manage transactions for
|
||||
*/
|
||||
public JpaTransactionManager(EntityManagerFactory emf) {
|
||||
this();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -168,7 +168,7 @@ public class LocalContainerEntityManagerFactoryBean extends AbstractEntityManage
|
||||
* <p>Default is none. Specify packages to search for autodetection of your entity
|
||||
* classes in the classpath. This is analogous to Spring's component-scan feature
|
||||
* ({@link org.springframework.context.annotation.ClassPathBeanDefinitionScanner}).
|
||||
* <p><p>Note: There may be limitations in comparison to regular JPA scanning.</b>
|
||||
* <p><b>Note: There may be limitations in comparison to regular JPA scanning.</b>
|
||||
* 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
|
||||
@@ -301,10 +301,10 @@ public class LocalContainerEntityManagerFactoryBean extends AbstractEntityManage
|
||||
* on it.
|
||||
* <p><b>NOTE:</b> As of Spring 2.5, the context's default LoadTimeWeaver (defined
|
||||
* as bean with name "loadTimeWeaver") will be picked up automatically, if available,
|
||||
* removing the need for LoadTimeWeaver configuration on each affected target bean.</b>
|
||||
* removing the need for LoadTimeWeaver configuration on each affected target bean.
|
||||
* Consider using the {@code context:load-time-weaver} XML tag for creating
|
||||
* such a shared LoadTimeWeaver (autodetecting the environment by default).
|
||||
* <p><b>NOTE: Only applied if no external PersistenceUnitManager specified.</b>
|
||||
* <p><b>NOTE:</b> Only applied if no external PersistenceUnitManager specified.
|
||||
* Otherwise, the external {@link #setPersistenceUnitManager PersistenceUnitManager}
|
||||
* is responsible for the weaving configuration.
|
||||
* @see org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver
|
||||
|
||||
@@ -127,7 +127,7 @@ public abstract class SharedEntityManagerCreator {
|
||||
|
||||
/**
|
||||
* Create a transactional EntityManager proxy for the given EntityManagerFactory.
|
||||
* @param emf EntityManagerFactory to obtain EntityManagers from as needed
|
||||
* @param emf the EntityManagerFactory to obtain EntityManagers from as needed
|
||||
* @param properties the properties to be passed into the
|
||||
* {@code createEntityManager} call (may be {@code null})
|
||||
* @param entityManagerInterfaces the interfaces to be implemented by the
|
||||
@@ -142,7 +142,7 @@ public abstract class SharedEntityManagerCreator {
|
||||
|
||||
/**
|
||||
* Create a transactional EntityManager proxy for the given EntityManagerFactory.
|
||||
* @param emf EntityManagerFactory to obtain EntityManagers from as needed
|
||||
* @param emf the EntityManagerFactory to obtain EntityManagers from as needed
|
||||
* @param properties the properties to be passed into the
|
||||
* {@code createEntityManager} call (may be {@code null})
|
||||
* @param synchronizedWithTransaction whether to automatically join ongoing
|
||||
|
||||
@@ -109,6 +109,9 @@ public class DefaultPersistenceUnitManager
|
||||
*/
|
||||
public static final String ORIGINAL_DEFAULT_PERSISTENCE_UNIT_ROOT_LOCATION = "classpath:";
|
||||
|
||||
/**
|
||||
* Default persistence unit name.
|
||||
*/
|
||||
public static final String ORIGINAL_DEFAULT_PERSISTENCE_UNIT_NAME = "default";
|
||||
|
||||
|
||||
@@ -223,7 +226,7 @@ public class DefaultPersistenceUnitManager
|
||||
* may live next to regularly defined units originating from {@code persistence.xml}.
|
||||
* Its name is determined by {@link #setDefaultPersistenceUnitName}: by default,
|
||||
* it's simply "default".
|
||||
* <p><p>Note: There may be limitations in comparison to regular JPA scanning.</b>
|
||||
* <p><b>Note: There may be limitations in comparison to regular JPA scanning.</b>
|
||||
* 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -230,7 +230,7 @@ public class HibernateJpaDialect extends DefaultJpaDialect {
|
||||
/**
|
||||
* Convert the given HibernateException to an appropriate exception
|
||||
* from the {@code org.springframework.dao} hierarchy.
|
||||
* @param ex HibernateException that occurred
|
||||
* @param ex the HibernateException that occurred
|
||||
* @return the corresponding DataAccessException instance
|
||||
*/
|
||||
protected DataAccessException convertHibernateAccessException(HibernateException ex) {
|
||||
|
||||
Reference in New Issue
Block a user