001/** 002 * Copyright 2005-2017 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.bo.ui; 017 018import javax.persistence.Column; 019import javax.persistence.Entity; 020import javax.persistence.GeneratedValue; 021import javax.persistence.Id; 022import javax.persistence.Table; 023import javax.persistence.Transient; 024 025import org.apache.commons.lang.StringUtils; 026import org.kuali.rice.kim.api.services.KimApiServiceLocator; 027import org.kuali.rice.kim.impl.type.KimTypeBo; 028import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator; 029 030/** 031 * This is a description of what this class does - shyu don't forget to fill this in. 032 * 033 * @author Kuali Rice Team (rice.collab@kuali.org) 034 * 035 */ 036@Entity 037@Table(name = "KRIM_PND_GRP_PRNCPL_MT") 038public class PersonDocumentGroup extends KimDocumentBoActivatableToFromEditableBase { 039 040 private static final long serialVersionUID = -1551337026170706411L; 041 042 @PortableSequenceGenerator(name = "KRIM_GRP_MBR_ID_S") 043 @GeneratedValue(generator = "KRIM_GRP_MBR_ID_S") 044 @Id 045 @Column(name = "GRP_MBR_ID") 046 protected String groupMemberId; 047 048 @Column(name = "GRP_TYPE") 049 protected String groupType; 050 051 @Column(name = "GRP_ID") 052 protected String groupId; 053 054 @Column(name = "GRP_NM") 055 protected String groupName; 056 057 @Column(name = "NMSPC_CD") 058 protected String namespaceCode; 059 060 @Column(name = "PRNCPL_ID") 061 protected String principalId; 062 063 @Transient 064 protected transient KimTypeBo kimGroupType; 065 066 @Transient 067 protected String kimTypeId; 068 069 public String getGroupId() { 070 return this.groupId; 071 } 072 073 public void setGroupId(String groupId) { 074 this.groupId = groupId; 075 } 076 077 public String getGroupName() { 078 return this.groupName; 079 } 080 081 public void setGroupName(String groupName) { 082 this.groupName = groupName; 083 } 084 085 public KimTypeBo getKimGroupType() { 086 if (StringUtils.isNotBlank(getKimTypeId())) { 087 if (kimGroupType == null || (!StringUtils.equals(kimGroupType.getId(), kimTypeId))) { 088 kimGroupType = KimTypeBo.from(KimApiServiceLocator.getKimTypeInfoService().getKimType(kimTypeId)); 089 } 090 } 091 return kimGroupType; 092 } 093 094 public String getKimTypeId() { 095 return this.kimTypeId; 096 } 097 098 public void setKimTypeId(String kimTypeId) { 099 this.kimTypeId = kimTypeId; 100 } 101 102 public String getGroupMemberId() { 103 return this.groupMemberId; 104 } 105 106 public void setGroupMemberId(String groupMemberId) { 107 this.groupMemberId = groupMemberId; 108 } 109 110 public String getPrincipalId() { 111 return this.principalId; 112 } 113 114 public void setPrincipalId(String principalId) { 115 this.principalId = principalId; 116 } 117 118 public String getGroupType() { 119 return this.groupType; 120 } 121 122 public void setGroupType(String groupType) { 123 this.groupType = groupType; 124 } 125 126 public String getNamespaceCode() { 127 return this.namespaceCode; 128 } 129 130 public void setNamespaceCode(String namespaceCode) { 131 this.namespaceCode = namespaceCode; 132 } 133}