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.krad.labs; 017 018import org.kuali.rice.kim.api.identity.principal.PrincipalContract; 019import org.kuali.rice.krad.bo.DataObjectBase; 020import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator; 021import org.kuali.rice.krad.data.jpa.converters.BooleanYNConverter; 022 023import javax.persistence.Column; 024import javax.persistence.Convert; 025import javax.persistence.Entity; 026import javax.persistence.GeneratedValue; 027import javax.persistence.Id; 028import javax.persistence.Table; 029import javax.persistence.Transient; 030@Entity 031@Table(name = "KRIM_PRNCPL_T") 032 033public class LabsUserControl extends DataObjectBase implements PrincipalContract { 034 035 @Transient 036 private String myPrincipalName; 037 @Transient 038 private String myPersonName; 039 040 private static final long serialVersionUID = 1L; 041 042 @PortableSequenceGenerator(name = "KRIM_PRNCPL_ID_S") 043 @GeneratedValue(generator = "KRIM_PRNCPL_ID_S") 044 @Id 045 @Column(name = "PRNCPL_ID") 046 private String principalId; 047 048 @Column(name = "PRNCPL_NM") 049 private String principalName; 050 051 @Column(name = "ENTITY_ID") 052 private String entityId; 053 054 @Column(name = "PRNCPL_PSWD") 055 private String password; 056 057 @Column(name = "ACTV_IND") 058 @Convert(converter = BooleanYNConverter.class) 059 private boolean active; 060 061 @Override 062 public String getPrincipalId() { 063 return principalId; 064 } 065 066 public void setPrincipalId(String principalId) { 067 this.principalId = principalId; 068 } 069 070 @Override 071 public String getPrincipalName() { 072 return principalName; 073 } 074 075 public void setPrincipalName(String principalName) { 076 this.principalName = principalName; 077 } 078 079 @Override 080 public String getEntityId() { 081 return entityId; 082 } 083 084 public void setEntityId(String entityId) { 085 this.entityId = entityId; 086 } 087 088 public String getPassword() { 089 return password; 090 } 091 092 public void setPassword(String password) { 093 this.password = password; 094 } 095 096 public boolean getActive() { 097 return active; 098 } 099 100 @Override 101 public boolean isActive() { 102 return active; 103 } 104 105 public void setActive(boolean active) { 106 this.active = active; 107 } 108 109 public String getMyPrincipalName() { 110 return myPrincipalName; 111 } 112 113 public void setMyPrincipalName(String myPrincipalName) { 114 this.myPrincipalName = myPrincipalName; 115 } 116 117 public String getMyPersonName() { 118 return myPersonName; 119 } 120 121 public void setMyPersonName(String myPersonName) { 122 this.myPersonName = myPersonName; 123 } 124}