View Javadoc

1   /**
2    * Copyright 2005-2013 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.krad.bo;
17  
18  import javax.persistence.Entity;
19  import javax.persistence.Table;
20  import javax.persistence.Transient;
21  import javax.persistence.UniqueConstraint;
22  
23  
24  /**
25   * Ad Hoc Route Workgroup Business Object
26   *
27   * @author Kuali Rice Team (rice.collab@kuali.org)
28   */
29  //@IdClass(org.kuali.rice.krad.bo.AdHocRouteWorkgroupId.class)
30  @Entity
31  @Table(name="KRNS_ADHOC_RTE_ACTN_RECIP_T",uniqueConstraints= {
32          @UniqueConstraint(name="KRNS_ADHOC_RTE_ACTN_RECIP_TC0",columnNames="OBJ_ID")
33  })
34  public class AdHocRouteWorkgroup extends AdHocRouteRecipient {
35      private static final long serialVersionUID = 1L;
36  
37      @Transient
38      private String recipientNamespaceCode;
39  
40      @Transient
41      private String recipientName;
42  
43      public AdHocRouteWorkgroup() {
44          setType(WORKGROUP_TYPE);
45      }
46  
47      @Override
48      public void setType(Integer type) {
49          if (!WORKGROUP_TYPE.equals(type)) {
50              throw new IllegalArgumentException("cannot change type to " + type);
51          }
52          super.setType(type);
53      }
54  
55      @Override
56      public String getName() {
57          return "";
58      }
59  
60      public String getRecipientNamespaceCode() {
61          return this.recipientNamespaceCode;
62      }
63  
64      public String getRecipientName() {
65          return this.recipientName;
66      }
67  
68      public void setRecipientNamespaceCode(String recipientNamespaceCode) {
69          this.recipientNamespaceCode = recipientNamespaceCode;
70      }
71  
72      public void setRecipientName(String recipientName) {
73          this.recipientName = recipientName;
74      }
75  }