Skip to content

Commit 220d231

Browse files
committed
Polish documentation in Hibernate support classes
This commit fixes some minor typos in Hibernate support classes.
1 parent ae0c34b commit 220d231

File tree

4 files changed

+15
-14
lines changed

4 files changed

+15
-14
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2013 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -150,8 +150,8 @@ public SessionFactory getSessionFactory() {
150150
* The DataSource should match the one used by the Hibernate SessionFactory:
151151
* for example, you could specify the same JNDI DataSource for both.
152152
* <p>If the SessionFactory was configured with LocalDataSourceConnectionProvider,
153-
* i.e. by Spring's SessionFactoryBuilder with a specified "dataSource",
154-
* the DataSource will be auto-detected: You can still explictly specify the
153+
* i.e. by Spring's LocalSessionFactoryBean with a specified "dataSource",
154+
* the DataSource will be auto-detected: You can still explicitly specify the
155155
* DataSource, but you don't need to in this case.
156156
* <p>A transactional JDBC Connection for this DataSource will be provided to
157157
* application code accessing this DataSource directly via DataSourceUtils
@@ -188,7 +188,7 @@ public DataSource getDataSource() {
188188

189189
/**
190190
* Set whether to autodetect a JDBC DataSource used by the Hibernate SessionFactory,
191-
* if set via SessionFactoryBuilder's {@code setDataSource}. Default is "true".
191+
* if set via LocalSessionFactoryBean's {@code setDataSource}. Default is "true".
192192
* <p>Can be turned off to deliberately ignore an available DataSource, in order
193193
* to not expose Hibernate transactions as JDBC transactions for that DataSource.
194194
* @see #setDataSource
@@ -358,7 +358,7 @@ protected void doBegin(Object transaction, TransactionDefinition definition) {
358358
}
359359

360360
if (definition.isReadOnly() && txObject.isNewSession()) {
361-
// Just set to NEVER in case of a new Session for this transaction.
361+
// Just set to MANUAL in case of a new Session for this transaction.
362362
session.setFlushMode(FlushMode.MANUAL);
363363
}
364364

@@ -586,7 +586,7 @@ protected boolean isSameConnectionForEntireSession(Session session) {
586586
* from the {@code org.springframework.dao} hierarchy.
587587
* <p>Will automatically apply a specified SQLExceptionTranslator to a
588588
* Hibernate JDBCException, else rely on Hibernate's default translation.
589-
* @param ex HibernateException that occured
589+
* @param ex HibernateException that occurred
590590
* @return a corresponding DataAccessException
591591
* @see SessionFactoryUtils#convertHibernateAccessException
592592
*/

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2013 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -58,6 +58,7 @@
5858
* @since 3.1
5959
* @see #setDataSource
6060
* @see #setPackagesToScan
61+
* @see LocalSessionFactoryBuilder
6162
*/
6263
public class LocalSessionFactoryBean extends HibernateExceptionTranslator
6364
implements FactoryBean<SessionFactory>, ResourceLoaderAware, InitializingBean, DisposableBean {

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2013 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -196,7 +196,7 @@ public SessionFactory getSessionFactory() {
196196
* for example, you could specify the same JNDI DataSource for both.
197197
* <p>If the SessionFactory was configured with LocalDataSourceConnectionProvider,
198198
* i.e. by Spring's LocalSessionFactoryBean with a specified "dataSource",
199-
* the DataSource will be auto-detected: You can still explictly specify the
199+
* the DataSource will be auto-detected: You can still explicitly specify the
200200
* DataSource, but you don't need to in this case.
201201
* <p>A transactional JDBC Connection for this DataSource will be provided to
202202
* application code accessing this DataSource directly via DataSourceUtils
@@ -527,7 +527,7 @@ protected void doBegin(Object transaction, TransactionDefinition definition) {
527527
}
528528

529529
if (definition.isReadOnly() && txObject.isNewSession()) {
530-
// Just set to NEVER in case of a new Session for this transaction.
530+
// Just set to MANUAL in case of a new Session for this transaction.
531531
session.setFlushMode(FlushMode.MANUAL);
532532
}
533533

@@ -779,7 +779,7 @@ protected boolean isSameConnectionForEntireSession(Session session) {
779779
* from the {@code org.springframework.dao} hierarchy.
780780
* <p>Will automatically apply a specified SQLExceptionTranslator to a
781781
* Hibernate JDBCException, else rely on Hibernate's default translation.
782-
* @param ex HibernateException that occured
782+
* @param ex HibernateException that occurred
783783
* @return a corresponding DataAccessException
784784
* @see SessionFactoryUtils#convertHibernateAccessException
785785
* @see #setJdbcExceptionTranslator
@@ -798,7 +798,7 @@ else if (GenericJDBCException.class.equals(ex.getClass())) {
798798
* Convert the given Hibernate JDBCException to an appropriate exception
799799
* from the {@code org.springframework.dao} hierarchy, using the
800800
* given SQLExceptionTranslator.
801-
* @param ex Hibernate JDBCException that occured
801+
* @param ex Hibernate JDBCException that occurred
802802
* @param translator the SQLExceptionTranslator to use
803803
* @return a corresponding DataAccessException
804804
*/

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2013 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -621,7 +621,7 @@ public static void applyTransactionTimeout(Criteria criteria, SessionFactory ses
621621
/**
622622
* Convert the given HibernateException to an appropriate exception
623623
* from the {@code org.springframework.dao} hierarchy.
624-
* @param ex HibernateException that occured
624+
* @param ex HibernateException that occurred
625625
* @return the corresponding DataAccessException instance
626626
* @see HibernateAccessor#convertHibernateAccessException
627627
* @see HibernateTransactionManager#convertHibernateAccessException

0 commit comments

Comments
 (0)