View Javadoc
1   /**
2    * Copyright 2005-2016 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.kim.impl.role;
17  
18  import javax.persistence.Column;
19  import javax.persistence.Entity;
20  import javax.persistence.GeneratedValue;
21  import javax.persistence.Id;
22  import javax.persistence.Table;
23  import org.apache.commons.lang.StringUtils;
24  import org.kuali.rice.kim.impl.common.attribute.KimAttributeDataBo;
25  import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator;
26  
27  /**
28   * /**
29   * The column names have been used in a native query in RoleDaoOjb and will need to be modified if any changes to the
30   * column names are made here.
31   */
32  @Entity
33  @Table(name = "KRIM_ROLE_MBR_ATTR_DATA_T")
34  public class RoleMemberAttributeDataBo extends KimAttributeDataBo {
35  
36      @PortableSequenceGenerator(name = "KRIM_ATTR_DATA_ID_S")
37      @GeneratedValue(generator = "KRIM_ATTR_DATA_ID_S")
38      @Id
39      @Column(name = "ATTR_DATA_ID")
40      private String id;
41  
42      @Column(name = "ROLE_MBR_ID")
43      protected String assignedToId;
44  
45      @Override
46      public String getId() {
47          return id;
48      }
49  
50      @Override
51      public void setId(String id) {
52          this.id = id;
53      }
54  
55      @Override
56      public String getAssignedToId() {
57          return this.assignedToId;
58      }
59  
60      @Override
61      public void setAssignedToId(String roleMemberId) {
62          this.assignedToId = roleMemberId;
63      }
64  
65      public boolean equals(RoleMemberAttributeDataBo roleMemberAttributeDataBo) {
66          if (!StringUtils.equals(roleMemberAttributeDataBo.getKimTypeId(), getKimTypeId())) {
67              return false;
68          }
69          if (!StringUtils.equals(roleMemberAttributeDataBo.getKimAttributeId(), getKimAttributeId())) {
70              return false;
71          }
72          if (!StringUtils.equals(roleMemberAttributeDataBo.getAttributeValue(), getAttributeValue())) {
73              return false;
74          }
75          return true;
76      }
77  }