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.kim.impl.role; 017 018import javax.persistence.Column; 019import javax.persistence.Entity; 020import javax.persistence.GeneratedValue; 021import javax.persistence.Id; 022import javax.persistence.Table; 023import org.apache.commons.lang.StringUtils; 024import org.kuali.rice.kim.impl.common.attribute.KimAttributeDataBo; 025import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator; 026 027/** 028 * /** 029 * The column names have been used in a native query in RoleDaoOjb and will need to be modified if any changes to the 030 * column names are made here. 031 */ 032@Entity 033@Table(name = "KRIM_ROLE_MBR_ATTR_DATA_T") 034public class RoleMemberAttributeDataBo extends KimAttributeDataBo { 035 036 @PortableSequenceGenerator(name = "KRIM_ATTR_DATA_ID_S") 037 @GeneratedValue(generator = "KRIM_ATTR_DATA_ID_S") 038 @Id 039 @Column(name = "ATTR_DATA_ID") 040 private String id; 041 042 @Column(name = "ROLE_MBR_ID") 043 protected String assignedToId; 044 045 @Override 046 public String getId() { 047 return id; 048 } 049 050 @Override 051 public void setId(String id) { 052 this.id = id; 053 } 054 055 @Override 056 public String getAssignedToId() { 057 return this.assignedToId; 058 } 059 060 @Override 061 public void setAssignedToId(String roleMemberId) { 062 this.assignedToId = roleMemberId; 063 } 064 065 public boolean equals(RoleMemberAttributeDataBo roleMemberAttributeDataBo) { 066 if (!StringUtils.equals(roleMemberAttributeDataBo.getKimTypeId(), getKimTypeId())) { 067 return false; 068 } 069 if (!StringUtils.equals(roleMemberAttributeDataBo.getKimAttributeId(), getKimAttributeId())) { 070 return false; 071 } 072 if (!StringUtils.equals(roleMemberAttributeDataBo.getAttributeValue(), getAttributeValue())) { 073 return false; 074 } 075 return true; 076 } 077}