Browse Source

Polish documentation in Hibernate support classes

This commit fixes some minor typos in Hibernate support classes.
pull/229/head
Sam Brannen 12 years ago
parent
commit
220d2311c7
  1. 12
      spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/HibernateTransactionManager.java
  2. 3
      spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/LocalSessionFactoryBean.java
  3. 10
      spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateTransactionManager.java
  4. 4
      spring-orm/src/main/java/org/springframework/orm/hibernate3/SessionFactoryUtils.java

12
spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/HibernateTransactionManager.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2013 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.
@ -150,8 +150,8 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana @@ -150,8 +150,8 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
* The DataSource should match the one used by the Hibernate SessionFactory:
* for example, you could specify the same JNDI DataSource for both.
* <p>If the SessionFactory was configured with LocalDataSourceConnectionProvider,
* i.e. by Spring's SessionFactoryBuilder with a specified "dataSource",
* the DataSource will be auto-detected: You can still explictly specify the
* i.e. by Spring's LocalSessionFactoryBean with a specified "dataSource",
* the DataSource will be auto-detected: You can still explicitly specify the
* DataSource, but you don't need to in this case.
* <p>A transactional JDBC Connection for this DataSource will be provided to
* application code accessing this DataSource directly via DataSourceUtils
@ -188,7 +188,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana @@ -188,7 +188,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
/**
* Set whether to autodetect a JDBC DataSource used by the Hibernate SessionFactory,
* if set via SessionFactoryBuilder's {@code setDataSource}. Default is "true".
* if set via LocalSessionFactoryBean's {@code setDataSource}. Default is "true".
* <p>Can be turned off to deliberately ignore an available DataSource, in order
* to not expose Hibernate transactions as JDBC transactions for that DataSource.
* @see #setDataSource
@ -358,7 +358,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana @@ -358,7 +358,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
}
if (definition.isReadOnly() && txObject.isNewSession()) {
// Just set to NEVER in case of a new Session for this transaction.
// Just set to MANUAL in case of a new Session for this transaction.
session.setFlushMode(FlushMode.MANUAL);
}
@ -586,7 +586,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana @@ -586,7 +586,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 occured
* @param ex HibernateException that occurred
* @return a corresponding DataAccessException
* @see SessionFactoryUtils#convertHibernateAccessException
*/

3
spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/LocalSessionFactoryBean.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2013 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.
@ -58,6 +58,7 @@ import org.springframework.core.io.support.ResourcePatternUtils; @@ -58,6 +58,7 @@ import org.springframework.core.io.support.ResourcePatternUtils;
* @since 3.1
* @see #setDataSource
* @see #setPackagesToScan
* @see LocalSessionFactoryBuilder
*/
public class LocalSessionFactoryBean extends HibernateExceptionTranslator
implements FactoryBean<SessionFactory>, ResourceLoaderAware, InitializingBean, DisposableBean {

10
spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateTransactionManager.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2013 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.
@ -196,7 +196,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana @@ -196,7 +196,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
* for example, you could specify the same JNDI DataSource for both.
* <p>If the SessionFactory was configured with LocalDataSourceConnectionProvider,
* i.e. by Spring's LocalSessionFactoryBean with a specified "dataSource",
* the DataSource will be auto-detected: You can still explictly specify the
* the DataSource will be auto-detected: You can still explicitly specify the
* DataSource, but you don't need to in this case.
* <p>A transactional JDBC Connection for this DataSource will be provided to
* application code accessing this DataSource directly via DataSourceUtils
@ -527,7 +527,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana @@ -527,7 +527,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
}
if (definition.isReadOnly() && txObject.isNewSession()) {
// Just set to NEVER in case of a new Session for this transaction.
// Just set to MANUAL in case of a new Session for this transaction.
session.setFlushMode(FlushMode.MANUAL);
}
@ -779,7 +779,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana @@ -779,7 +779,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 occured
* @param ex HibernateException that occurred
* @return a corresponding DataAccessException
* @see SessionFactoryUtils#convertHibernateAccessException
* @see #setJdbcExceptionTranslator
@ -798,7 +798,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana @@ -798,7 +798,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
* Convert the given Hibernate JDBCException to an appropriate exception
* from the {@code org.springframework.dao} hierarchy, using the
* given SQLExceptionTranslator.
* @param ex Hibernate JDBCException that occured
* @param ex Hibernate JDBCException that occurred
* @param translator the SQLExceptionTranslator to use
* @return a corresponding DataAccessException
*/

4
spring-orm/src/main/java/org/springframework/orm/hibernate3/SessionFactoryUtils.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2013 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.
@ -621,7 +621,7 @@ public abstract class SessionFactoryUtils { @@ -621,7 +621,7 @@ public abstract class SessionFactoryUtils {
/**
* Convert the given HibernateException to an appropriate exception
* from the {@code org.springframework.dao} hierarchy.
* @param ex HibernateException that occured
* @param ex HibernateException that occurred
* @return the corresponding DataAccessException instance
* @see HibernateAccessor#convertHibernateAccessException
* @see HibernateTransactionManager#convertHibernateAccessException

Loading…
Cancel
Save