View Javadoc
1   /**
2    * Copyright 2014 Internet2
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *   http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  /*
17   * @author mchyzer
18   * $Id: HibernateHandlerBean.java,v 1.1 2009-02-06 16:33:18 mchyzer Exp $
19   */
20  package edu.internet2.middleware.grouper.hibernate;
21  
22  
23  
24  /**
25   *
26   */
27  public class HibernateHandlerBean {
28    
29    /** if this is a new context, or using one that already existed */
30    private boolean newContext = false;
31    
32    /** if the caller will audit the transaction, if not, then you might want to */
33    private boolean callerWillCreateAudit = false;
34    
35    /** grouper session */
36    private HibernateSession hibernateSession;
37  
38    /**
39     * get grouper session
40     * @return grouper session
41     */
42    public HibernateSession getHibernateSession() {
43      return this.hibernateSession;
44    }
45  
46    /**
47     * 
48     * @param hibernateSession1
49     */
50    public void setHibernateSession(HibernateSession hibernateSession1) {
51      this.hibernateSession = hibernateSession1;
52    }
53  
54    /**
55     * if this is a new context, or using one that already existed
56     * @return if new context
57     */
58    public boolean isNewContext() {
59      return this.newContext;
60    }
61  
62    /**
63     * if this is a new context, or using one that already existed
64     * @param newContext1
65     */
66    public void setNewContext(boolean newContext1) {
67      this.newContext = newContext1;
68    }
69  
70    /**
71     * if this is a new context, or using one that already existed
72     * @return true if caller will audit transaction
73     */
74    public boolean isCallerWillCreateAudit() {
75      return this.callerWillCreateAudit;
76    }
77  
78    /**
79     * if this is a new context, or using one that already existed
80     * @param callerWillAuditTransaction1
81     */
82    public void setCallerWillCreateAudit(boolean callerWillAuditTransaction1) {
83      this.callerWillCreateAudit = callerWillAuditTransaction1;
84    } 
85  
86  
87  }