/** * */ package com.vci.server.base.persistence.dao; import java.sql.Connection; import java.sql.SQLException; import org.hibernate.HibernateException; /** * Hibernate 回调参数 默认执行行为对象 *

默认 * *

  • isCloseSession() true
  • *
  • isSubmitSession() true
  • * *

    Title:

    *

    Description:

    *

    Copyright: Copyright (c) 2012

    *

    Company: VCI

    * @author xchao * @time 2013-5-29 * @version 1.0 */ public class DefaultHiberanteCallbackExtV5 implements HibernateCallbackExtV5 { /** * 回调执行完成后,默认关闭Session */ private boolean closeSession = true; /** * 回调执行完毕后,默认提交Session */ private boolean commitSession = true; /** * */ public DefaultHiberanteCallbackExtV5() { this(true, true); } public DefaultHiberanteCallbackExtV5(boolean closeSession, boolean commitSession) { super(); this.closeSession = closeSession; this.commitSession = commitSession; } /** * 执行 *

    Description:

    * @author xchao * @time 2013-5-29 * @return */ @Override public Object execute(Connection connection) throws HibernateException, SQLException { // TODO Auto-generated method stub return null; } /** * 执行 *

    Description:

    * @author xchao * @time 2013-5-29 * @return */ @Override public Object execute() throws HibernateException { // TODO Auto-generated method stub return null; } /** * 设置 在回调函数执行完毕后,是否需要关闭Session *

    Description:

    * @author xchao * @time 2013-5-29 * @return */ @Override public void setCloseSession(boolean closeSession) { this.closeSession = closeSession; } /** * 返回 在回调函数执行完毕后,是否需要关闭Session *

    Description:

    * @author xchao * @time 2013-5-29 * @return */ @Override public boolean isCloseSession() { return this.closeSession; } /** * 设置 在回调函数执行完毕后,是否需要提交事务 *

    Description:

    * @author xchao * @time 2013-5-29 * @param submitSession */ @Override public void setCommitSession(boolean commitSession) { this.commitSession = commitSession; } /** * 返回 在回调函数执行完毕后,是否需要提交事务 *

    Description:

    * @author xchao * @time 2013-5-29 * @param submitSession */ @Override public boolean isCommitSession() { return this.commitSession; } }