001/**
002 * Copyright 2005-2016 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.krad.bo;
017
018import javax.persistence.Entity;
019import javax.persistence.IdClass;
020import javax.persistence.Table;
021import javax.persistence.Transient;
022
023
024/**
025 * Ad Hoc Route Workgroup Business Object
026 *
027 * @author Kuali Rice Team (rice.collab@kuali.org)
028 */
029@IdClass(org.kuali.rice.krad.bo.AdHocRouteWorkgroupId.class)
030@Entity
031@Table(name="KRNS_ADHOC_RTE_ACTN_RECIP_T")
032public class AdHocRouteWorkgroup extends AdHocRouteRecipient {
033    private static final long serialVersionUID = 1L;
034
035    @Transient
036    private String recipientNamespaceCode;
037
038    @Transient
039    private String recipientName;
040
041    public AdHocRouteWorkgroup() {
042        setType(WORKGROUP_TYPE);
043    }
044
045    @Override
046    public void setType(Integer type) {
047        if (!WORKGROUP_TYPE.equals(type)) {
048            throw new IllegalArgumentException("cannot change type to " + type);
049        }
050        super.setType(type);
051    }
052
053    @Override
054    public String getName() {
055        return "";
056    }
057
058    public String getRecipientNamespaceCode() {
059        return this.recipientNamespaceCode;
060    }
061
062    public String getRecipientName() {
063        return this.recipientName;
064    }
065
066    public void setRecipientNamespaceCode(String recipientNamespaceCode) {
067        this.recipientNamespaceCode = recipientNamespaceCode;
068    }
069
070    public void setRecipientName(String recipientName) {
071        this.recipientName = recipientName;
072    }
073}