View Javadoc
1   /**
2    * Copyright 2005-2016 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.kim.impl.common.template;
17  
18  import javax.persistence.Column;
19  import javax.persistence.Convert;
20  import javax.persistence.MappedSuperclass;
21  
22  import org.kuali.rice.kim.api.common.template.TemplateContract;
23  import org.kuali.rice.krad.bo.DataObjectBase;
24  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
25  import org.kuali.rice.krad.data.jpa.converters.BooleanYNConverter;
26  import org.kuali.rice.krad.data.provider.annotation.BusinessKey;
27  
28  @MappedSuperclass
29  public abstract class TemplateBo extends PersistableBusinessObjectBase implements TemplateContract {
30  
31      private static final long serialVersionUID = 1L;
32  
33      @Column(name="NMSPC_CD",nullable=false)
34      @BusinessKey
35      protected String namespaceCode;
36  
37      @Column(name="NM",nullable=false)
38      @BusinessKey
39      protected String name;
40  
41      @Column(name="DESC_TXT", length=400)
42      protected String description;
43  
44      @Column(name="KIM_TYP_ID")
45      protected String kimTypeId;
46  
47      @Column(name="ACTV_IND")
48      @Convert(converter = BooleanYNConverter.class)
49      protected boolean active;
50  
51      @Override
52      public String getNamespaceCode() {
53          return namespaceCode;
54      }
55  
56      public void setNamespaceCode(String namespaceCode) {
57          this.namespaceCode = namespaceCode;
58      }
59  
60      @Override
61      public String getName() {
62          return name;
63      }
64  
65      public void setName(String name) {
66          this.name = name;
67      }
68  
69      @Override
70      public String getDescription() {
71          return description;
72      }
73  
74      public void setDescription(String description) {
75          this.description = description;
76      }
77  
78      @Override
79      public String getKimTypeId() {
80          return kimTypeId;
81      }
82  
83      public void setKimTypeId(String kimTypeId) {
84          this.kimTypeId = kimTypeId;
85      }
86  
87      @Override
88      public boolean isActive() {
89          return active;
90      }
91  
92      public void setActive(boolean active) {
93          this.active = active;
94      }
95  }