001/**
002 * Copyright 2005-2014 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.rice.krms.impl.repository;
017
018import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator;
019import org.kuali.rice.krms.api.repository.type.KrmsAttributeDefinitionContract;
020
021import javax.persistence.Column;
022import javax.persistence.Entity;
023import javax.persistence.FetchType;
024import javax.persistence.GeneratedValue;
025import javax.persistence.Id;
026import javax.persistence.JoinColumn;
027import javax.persistence.ManyToOne;
028import javax.persistence.Table;
029import java.io.Serializable;
030
031@Entity
032@Table(name = "KRMS_TERM_RSLVR_ATTR_T")
033public class TermResolverAttributeBo extends BaseAttributeBo implements Serializable {
034
035    private static final long serialVersionUID = 1l;
036
037    @PortableSequenceGenerator(name = "KRMS_TERM_RSLVR_ATTR_S")
038    @GeneratedValue(generator = "KRMS_TERM_RSLVR_ATTR_S")
039    @Id
040    @Column(name = "TERM_RSLVR_ATTR_ID")
041    private String id;
042
043    @Column(name = "TERM_RSLVR_ID")
044    private String termResolverId;
045
046    @ManyToOne(fetch= FetchType.LAZY)
047    @JoinColumn(name = "ATTR_DEFN_ID", referencedColumnName = "ATTR_DEFN_ID")
048    private KrmsAttributeDefinitionBo attributeDefinition;
049
050    @Override
051    public KrmsAttributeDefinitionContract getAttributeDefinition() {
052        return attributeDefinition;
053    }
054
055    public void setAttributeDefinition(KrmsAttributeDefinitionBo attributeDefinition) {
056        this.attributeDefinition = attributeDefinition;
057    }
058
059    public String getTermResolverId() {
060        return termResolverId;
061    }
062
063    public void setTermResolverId(String termResolverId) {
064        this.termResolverId = termResolverId;
065    }
066
067    @Override
068    public String getId() {
069        return id;
070    }
071
072    public void setId(String id) {
073        this.id = id;
074    }
075}