View Javadoc
1   /**
2    * Copyright 2005-2014 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  @Entity
30  @Table(name="KRNS_ADHOC_RTE_ACTN_RECIP_T",uniqueConstraints= {
31          @UniqueConstraint(name="KRNS_ADHOC_RTE_ACTN_RECIP_TC0",columnNames="OBJ_ID")
32  })
33  public class AdHocRouteWorkgroup extends AdHocRouteRecipient {
34      private static final long serialVersionUID = 1L;
35  
36      @Transient
37      private String recipientNamespaceCode;
38  
39      @Transient
40      private String recipientName;
41  
42      /**
43       * Sets type to {@link #WORKGROUP_TYPE}.
44       */
45      public AdHocRouteWorkgroup() {
46          setType(WORKGROUP_TYPE);
47      }
48  
49      @Override
50      public void setType(Integer type) {
51          if (!WORKGROUP_TYPE.equals(type)) {
52              throw new IllegalArgumentException("cannot change type to " + type);
53          }
54          super.setType(type);
55      }
56  
57      @Override
58      public String getName() {
59          return "";
60      }
61  
62      /**
63       * Gets recipient namespace code.
64       * @return namespace code
65       */
66      public String getRecipientNamespaceCode() {
67          return this.recipientNamespaceCode;
68      }
69  
70      /**
71       * Gets recipient name.
72       *
73       * @return recipient name
74       */
75      public String getRecipientName() {
76          return this.recipientName;
77      }
78  
79      /**
80       * Setter for {@link #getRecipientNamespaceCode()}.
81       *
82       * @param recipientNamespaceCode recipient namespace code
83       */
84      public void setRecipientNamespaceCode(String recipientNamespaceCode) {
85          this.recipientNamespaceCode = recipientNamespaceCode;
86      }
87  
88      /**
89       * Setter for {@link #recipientName}.
90       *
91       * @param recipientName recipient name
92       */
93      public void setRecipientName(String recipientName) {
94          this.recipientName = recipientName;
95      }
96  }