Skip to content

Commit 2579644

Browse files
committed
Revert "removed double javadoc"
This reverts commit 2d26c49.
1 parent 0d43023 commit 2579644

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/SessionFactoryBuilderSupport.java

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,18 @@ private void initializeConfigurationIfNecessary() {
497497
}
498498
}
499499

500+
/**
501+
* Subclasses can override this method to perform custom initialization
502+
* of the Configuration instance used for SessionFactory creation.
503+
* The properties of this Builder will be applied to
504+
* the Configuration object that gets returned here.
505+
* <p>The default implementation creates a new Configuration instance.
506+
* A custom implementation could prepare the instance in a specific way,
507+
* or use a custom Configuration subclass.
508+
* @return the Configuration instance
509+
* @throws HibernateException in case of Hibernate initialization errors
510+
* @see org.hibernate.cfg.Configuration#Configuration()
511+
*/
500512
/**
501513
* Instantiate and return an instance of the {@link Configuration} class
502514
* type for this builder. Subclasses may override in order to customize
@@ -655,7 +667,7 @@ public void createDatabaseSchema() throws DataAccessException {
655667
new HibernateCallback<Object>() {
656668
@SuppressWarnings("deprecation")
657669
public Object doInHibernate(Session session) throws HibernateException, SQLException {
658-
Dialect dialect = ((SessionFactoryImplementor) session.getSessionFactory()).getDialect();
670+
Dialect dialect = ((SessionFactoryImplementor)session.getSessionFactory()).getDialect();
659671
String[] sql = configuration.generateSchemaCreationScript(dialect);
660672
executeSchemaScript(session.connection(), sql);
661673
return null;
@@ -706,7 +718,7 @@ public void updateDatabaseSchema() throws DataAccessException {
706718
public Void doInHibernate(Session session) throws HibernateException, SQLException {
707719
@SuppressWarnings("deprecation")
708720
Connection conn = session.connection();
709-
Dialect dialect = ((SessionFactoryImplementor) session.getSessionFactory()).getDialect();
721+
Dialect dialect = ((SessionFactoryImplementor)session.getSessionFactory()).getDialect();
710722
DatabaseMetadata metadata = new DatabaseMetadata(conn, dialect);
711723
String[] sql = configuration.generateSchemaUpdateScript(dialect, metadata);
712724
executeSchemaScript(conn, sql);
@@ -756,7 +768,7 @@ public void validateDatabaseSchema() throws DataAccessException {
756768
new HibernateCallback<Object>() {
757769
@SuppressWarnings("deprecation")
758770
public Object doInHibernate(Session session) throws HibernateException, SQLException {
759-
Dialect dialect = ((SessionFactoryImplementor) session.getSessionFactory()).getDialect();
771+
Dialect dialect = ((SessionFactoryImplementor)session.getSessionFactory()).getDialect();
760772
DatabaseMetadata metadata = new DatabaseMetadata(session.connection(), dialect);
761773
configuration.validateSchema(dialect, metadata);
762774
return null;
@@ -798,7 +810,7 @@ public void dropDatabaseSchema() throws DataAccessException {
798810
new HibernateCallback<Object>() {
799811
@SuppressWarnings("deprecation")
800812
public Void doInHibernate(Session session) throws HibernateException, SQLException {
801-
Dialect dialect = ((SessionFactoryImplementor) session.getSessionFactory()).getDialect();
813+
Dialect dialect = ((SessionFactoryImplementor)session.getSessionFactory()).getDialect();
802814
String[] sql = configuration.generateDropSchemaScript(dialect);
803815
executeSchemaScript(session.connection(), sql);
804816
return null;

0 commit comments

Comments
 (0)