@@ -0,0 +1,3103 @@
+/*%0A * Copyright (c) 2005-2009 Grameen Foundation USA%0A * All rights reserved.%0A * %0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A * %0A *     http://www.apache.org/licenses/LICENSE-2.0%0A * %0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or%0A * implied. See the License for the specific language governing%0A * permissions and limitations under the License.%0A * %0A * See also http://www.apache.org/licenses/LICENSE-2.0.html for an%0A * explanation of the license and how it is applied.    %0A */%0A%0Apackage org.mifos.framework.hibernate.helper;%0A%0Aimport java.sql.Connection;%0A%0Aimport org.hibernate.HibernateException;%0Aimport org.hibernate.Session;%0Aimport org.hibernate.SessionFactory;%0Aimport org.hibernate.Transaction;%0Aimport org.mifos.framework.components.audit.util.helpers.AuditInterceptor;%0Aimport org.mifos.framework.exceptions.HibernateProcessException;%0A%0Apublic class HibernateUtil %7B%0A%0A    public void setThreadLocal(SessionHolder holder) %7B%0A        StaticHibernateUtil.setThreadLocal(holder);%0A    %7D%0A    %0A    public void resetDatabase() %7B%0A        StaticHibernateUtil.resetDatabase();%0A    %7D%0A%0A    public Session openSession() throws HibernateProcessException %7B%0A        return StaticHibernateUtil.openSession();%0A    %7D%0A%0A    public void closeSession(Session session) throws HibernateProcessException %7B%0A        StaticHibernateUtil.closeSession(session);%0A    %7D%0A%0A    public SessionFactory getSessionFactory() %7B%0A        return StaticHibernateUtil.getSessionFactory();%0A    %7D%0A%0A    public Session openSession(Connection connection) %7B%0A        return StaticHibernateUtil.openSession(connection);%0A    %7D%0A%0A    public Session getSessionTL() %7B%0A        return StaticHibernateUtil.getSessionTL();%0A    %7D%0A%0A    public AuditInterceptor getInterceptor() %7B%0A        return StaticHibernateUtil.getInterceptor();%0A    %7D%0A%0A    public Transaction startTransaction() %7B%0A        return StaticHibernateUtil.startTransaction();%0A    %7D%0A%0A    public Transaction getTransaction() %7B%0A        return StaticHibernateUtil.getTransaction();%0A    %7D%0A%0A    public void closeSession() %7B%0A        StaticHibernateUtil.closeSession();%0A    %7D%0A%0A    public void flushAndCloseSession() %7B%0A        StaticHibernateUtil.flushAndCloseSession();%0A    %7D%0A%0A    public void flushAndClearSession() %7B%0A        StaticHibernateUtil.flushAndClearSession();%0A    %7D%0A%0A    public SessionHolder getSessionHolder() %7B%0A        return StaticHibernateUtil.getSessionHolder();%0A    %7D%0A%0A    public SessionHolder getOrCreateSessionHolder() throws HibernateException %7B%0A        return StaticHibernateUtil.getOrCreateSessionHolder();%0A    %7D%0A%0A    public boolean isSessionOpen() %7B%0A        return StaticHibernateUtil.isSessionOpen();%0A    %7D%0A%0A    public void commitTransaction() %7B%0A        StaticHibernateUtil.commitTransaction();%0A    %7D%0A%0A    public void rollbackTransaction() %7B%0A        StaticHibernateUtil.rollbackTransaction();%0A    %7D%0A%0A%7D%0A

Work on story 1460, make HibernateUtil a non-static class Completed tasks 1468, 1469, 1470 to create a HibernateUtil that delegates to StaticHibernateUtil * Added non-static HibernateUtil