View Javadoc
1   /**
2    * Copyright 2005-2015 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.krad.data.jpa.PortableSequenceGenerator;
19  import org.kuali.rice.krms.api.repository.type.KrmsAttributeDefinitionContract;
20  
21  import javax.persistence.Column;
22  import javax.persistence.Entity;
23  import javax.persistence.FetchType;
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 java.io.Serializable;
30  
31  @Entity
32  @Table(name = "KRMS_TERM_RSLVR_ATTR_T")
33  public class TermResolverAttributeBo extends BaseAttributeBo implements Serializable {
34  
35      private static final long serialVersionUID = 1l;
36  
37      @PortableSequenceGenerator(name = "KRMS_TERM_RSLVR_ATTR_S")
38      @GeneratedValue(generator = "KRMS_TERM_RSLVR_ATTR_S")
39      @Id
40      @Column(name = "TERM_RSLVR_ATTR_ID")
41      private String id;
42  
43      @Column(name = "TERM_RSLVR_ID")
44      private String termResolverId;
45  
46      @ManyToOne(fetch= FetchType.LAZY)
47      @JoinColumn(name = "ATTR_DEFN_ID", referencedColumnName = "ATTR_DEFN_ID")
48      private KrmsAttributeDefinitionBo attributeDefinition;
49  
50      @Override
51      public KrmsAttributeDefinitionContract getAttributeDefinition() {
52          return attributeDefinition;
53      }
54  
55      public void setAttributeDefinition(KrmsAttributeDefinitionBo attributeDefinition) {
56          this.attributeDefinition = attributeDefinition;
57      }
58  
59      public String getTermResolverId() {
60          return termResolverId;
61      }
62  
63      public void setTermResolverId(String termResolverId) {
64          this.termResolverId = termResolverId;
65      }
66  
67      @Override
68      public String getId() {
69          return id;
70      }
71  
72      public void setId(String id) {
73          this.id = id;
74      }
75  }