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