View Javadoc
1   /**
2    * Copyright 2005-2014 The Kuali Foundation
3    *
4    * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
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  package org.kuali.rice.krms.impl.repository;
17  
18  import org.kuali.rice.core.api.mo.common.Versioned;
19  import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator;
20  
21  import javax.persistence.CascadeType;
22  import javax.persistence.Column;
23  import javax.persistence.Entity;
24  import javax.persistence.GeneratedValue;
25  import javax.persistence.Id;
26  import javax.persistence.JoinColumn;
27  import javax.persistence.ManyToOne;
28  import javax.persistence.Table;
29  import javax.persistence.Version;
30  import java.io.Serializable;
31  
32  @Entity
33  @Table(name = "KRMS_CNTXT_VLD_ACTN_TYP_T")
34  public class ContextValidActionBo implements Versioned, Serializable {
35  
36      private static final long serialVersionUID = 1l;
37  
38      @PortableSequenceGenerator(name = "KRMS_CNTXT_VLD_ACTN_TYP_S")
39      @GeneratedValue(generator = "KRMS_CNTXT_VLD_ACTN_TYP_S")
40      @Id
41      @Column(name = "CNTXT_VLD_ACTN_ID")
42      private String id;
43  
44      @Column(name = "CNTXT_ID")
45      private String contextId;
46  
47      @Column(name = "ACTN_TYP_ID")
48      private String actionTypeId;
49  
50      @Column(name = "VER_NBR")
51      @Version
52      private Long versionNumber;
53  
54      @ManyToOne(targetEntity = KrmsTypeBo.class, cascade = { CascadeType.REFRESH })
55      @JoinColumn(name = "ACTN_TYP_ID", referencedColumnName = "TYP_ID", insertable = false, updatable = false)
56      private KrmsTypeBo actionType;
57  
58      public String getId() {
59          return id;
60      }
61  
62      public void setId(String id) {
63          this.id = id;
64      }
65  
66      public String getContextId() {
67          return contextId;
68      }
69  
70      public void setContextId(String contextId) {
71          this.contextId = contextId;
72      }
73  
74      public String getActionTypeId() {
75          return actionTypeId;
76      }
77  
78      public void setActionTypeId(String actionTypeId) {
79          this.actionTypeId = actionTypeId;
80      }
81  
82      public Long getVersionNumber() {
83          return versionNumber;
84      }
85  
86      public void setVersionNumber(Long versionNumber) {
87          this.versionNumber = versionNumber;
88      }
89  
90      public KrmsTypeBo getActionType() {
91          return actionType;
92      }
93  
94      public void setActionType(KrmsTypeBo actionType) {
95          this.actionType = actionType;
96      }
97  }