ludc
2025-01-16 986aa62ed00bee39363bab41b4eeb8259d446efd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/**
 * 
 */
package com.vci.server.base.persistence.dao;
 
import java.sql.Connection;
import java.sql.SQLException;
 
import org.hibernate.HibernateException;
 
/**
 * Hibernate 回调参数 默认执行行为对象
 * <p>默认</>
 * <ui>
 * <li>isCloseSession() true </li>
 * <li>isSubmitSession() true</li>  
 * </ul>
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2012</p>
 * <p>Company: VCI</p>
 * @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;
    }
 
 
    /**
     * 执行
     * <p>Description: </p>
     * @author xchao
     * @time 2013-5-29
     * @return
     */
    @Override
    public Object execute(Connection connection) throws HibernateException, SQLException {
        // TODO Auto-generated method stub
        return null;
    }
 
    /**
     * 执行
     * <p>Description: </p>
     * @author xchao
     * @time 2013-5-29
     * @return
     */
    @Override
    public Object execute() throws HibernateException {
        // TODO Auto-generated method stub
        return null;
    }
 
    /**
     * 设置 在回调函数执行完毕后,是否需要关闭Session
     * <p>Description: </p>
     * @author xchao
     * @time 2013-5-29
     * @return
     */
    @Override
    public void setCloseSession(boolean closeSession) {
        this.closeSession = closeSession;
    }
 
    /**
     * 返回 在回调函数执行完毕后,是否需要关闭Session
     * <p>Description: </p>
     * @author xchao
     * @time 2013-5-29
     * @return
     */
    @Override
    public boolean isCloseSession() {
        return this.closeSession;
    }
    
    /**
     * 设置 在回调函数执行完毕后,是否需要提交事务
     * <p>Description: </p>
     * @author xchao
     * @time 2013-5-29
     * @param submitSession
     */
    @Override
    public void setCommitSession(boolean commitSession) {
        this.commitSession = commitSession;
    }
    
    /**
     * 返回 在回调函数执行完毕后,是否需要提交事务
     * <p>Description: </p>
     * @author xchao
     * @time 2013-5-29
     * @param submitSession
     */
    @Override
    public boolean isCommitSession() {
        return this.commitSession;
    }
 
}