mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-06-02 17:35:18 +00:00
abstraction. Configurations to match. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3286 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
43 lines
941 B
Java
43 lines
941 B
Java
/**
|
|
*
|
|
*/
|
|
package org.alfresco.repo.avm.hibernate;
|
|
|
|
import java.sql.SQLException;
|
|
|
|
import org.hibernate.HibernateException;
|
|
import org.hibernate.Session;
|
|
import org.springframework.orm.hibernate3.HibernateCallback;
|
|
|
|
/**
|
|
* This is a wrapper around HibernateTxnCallback implementation.
|
|
* @author britt
|
|
*/
|
|
public class HibernateCallbackWrapper implements HibernateCallback
|
|
{
|
|
/**
|
|
* The HibernateTxnCallback to execute.
|
|
*/
|
|
private HibernateTxnCallback fCallback;
|
|
|
|
/**
|
|
* Make one up.
|
|
* @param callback
|
|
*/
|
|
public HibernateCallbackWrapper(HibernateTxnCallback callback)
|
|
{
|
|
fCallback = callback;
|
|
}
|
|
|
|
/**
|
|
* Call the HibernateTxnCallback internally.
|
|
* @param session The Hibernate Session.
|
|
*/
|
|
public Object doInHibernate(Session session) throws HibernateException,
|
|
SQLException
|
|
{
|
|
fCallback.perform(session);
|
|
return null;
|
|
}
|
|
}
|