From 25796448f6fb36652e2fa0633b0244e5b7d00168 Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Sun, 9 Oct 2011 07:55:38 +0000 Subject: [PATCH] Revert "removed double javadoc" This reverts commit 2d26c4992e6c7689f67a8e8410ca7d65909b8d01. --- .../SessionFactoryBuilderSupport.java | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/SessionFactoryBuilderSupport.java b/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/SessionFactoryBuilderSupport.java index 62522bcffd..c7c82d394c 100644 --- a/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/SessionFactoryBuilderSupport.java +++ b/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/SessionFactoryBuilderSupport.java @@ -497,6 +497,18 @@ public abstract class SessionFactoryBuilderSupportThe default implementation creates a new Configuration instance. + * A custom implementation could prepare the instance in a specific way, + * or use a custom Configuration subclass. + * @return the Configuration instance + * @throws HibernateException in case of Hibernate initialization errors + * @see org.hibernate.cfg.Configuration#Configuration() + */ /** * Instantiate and return an instance of the {@link Configuration} class * type for this builder. Subclasses may override in order to customize @@ -655,7 +667,7 @@ public abstract class SessionFactoryBuilderSupport() { @SuppressWarnings("deprecation") public Object doInHibernate(Session session) throws HibernateException, SQLException { - Dialect dialect = ((SessionFactoryImplementor) session.getSessionFactory()).getDialect(); + Dialect dialect = ((SessionFactoryImplementor)session.getSessionFactory()).getDialect(); String[] sql = configuration.generateSchemaCreationScript(dialect); executeSchemaScript(session.connection(), sql); return null; @@ -706,7 +718,7 @@ public abstract class SessionFactoryBuilderSupport() { @SuppressWarnings("deprecation") public Object doInHibernate(Session session) throws HibernateException, SQLException { - Dialect dialect = ((SessionFactoryImplementor) session.getSessionFactory()).getDialect(); + Dialect dialect = ((SessionFactoryImplementor)session.getSessionFactory()).getDialect(); DatabaseMetadata metadata = new DatabaseMetadata(session.connection(), dialect); configuration.validateSchema(dialect, metadata); return null; @@ -798,7 +810,7 @@ public abstract class SessionFactoryBuilderSupport() { @SuppressWarnings("deprecation") public Void doInHibernate(Session session) throws HibernateException, SQLException { - Dialect dialect = ((SessionFactoryImplementor) session.getSessionFactory()).getDialect(); + Dialect dialect = ((SessionFactoryImplementor)session.getSessionFactory()).getDialect(); String[] sql = configuration.generateDropSchemaScript(dialect); executeSchemaScript(session.connection(), sql); return null;