Coverage Report - org.kuali.rice.kim.bo.role.impl.RolePermissionImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
RolePermissionImpl
0%
0/22
N/A
1
 
 1  
 /*
 2  
  * Copyright 2007-2008 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.bo.role.impl;
 17  
 
 18  
 import java.util.LinkedHashMap;
 19  
 
 20  
 import javax.persistence.CascadeType;
 21  
 import javax.persistence.Column;
 22  
 import javax.persistence.Entity;
 23  
 import javax.persistence.FetchType;
 24  
 import javax.persistence.Id;
 25  
 import javax.persistence.JoinColumn;
 26  
 import javax.persistence.OneToOne;
 27  
 import javax.persistence.Table;
 28  
 
 29  
 import org.kuali.rice.kns.bo.Inactivateable;
 30  
 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
 31  
 
 32  
 /**
 33  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 34  
  */
 35  
 @Entity
 36  
 @Table(name="KRIM_ROLE_PERM_T")
 37  0
 public class RolePermissionImpl extends PersistableBusinessObjectBase implements Inactivateable{
 38  
 
 39  
         private static final long serialVersionUID = 1L;
 40  
         
 41  
         @Id
 42  
         @Column(name="ROLE_PERM_ID")
 43  
         protected String rolePermissionId;
 44  
         @Column(name="ROLE_ID")
 45  
         protected String roleId;
 46  
         @Column(name="PERM_ID")
 47  
         protected String permissionId;
 48  
         
 49  
         @Column(name="ACTV_IND")
 50  
         protected boolean active;
 51  
 
 52  
         @OneToOne(targetEntity=KimPermissionImpl.class, fetch = FetchType.LAZY, cascade = { CascadeType.ALL })
 53  
         @JoinColumn(name = "PERM_ID", insertable = false, updatable = false)
 54  
         protected KimPermissionImpl kimPermission;
 55  
         
 56  
         public KimPermissionImpl getPermission() {
 57  0
                 return kimPermission;
 58  
         }
 59  
 
 60  
         public String getPermissionId() {
 61  0
                 return permissionId;
 62  
         }
 63  
         
 64  
         public String getRoleId() {
 65  0
                 return roleId;
 66  
         }
 67  
 
 68  
         public String getRolePermissionId() {
 69  0
                 return rolePermissionId;
 70  
         }
 71  
 
 72  
         public void setPermissionId(String permissionId) {
 73  0
                 this.permissionId = permissionId;
 74  0
         }
 75  
 
 76  
         public void setRoleId(String roleId) {
 77  0
                 this.roleId = roleId;
 78  0
         }
 79  
 
 80  
         /**
 81  
          * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
 82  
          */
 83  
         @SuppressWarnings("unchecked")
 84  
         @Override
 85  
         protected LinkedHashMap toStringMapper() {
 86  0
                 LinkedHashMap m = new LinkedHashMap();
 87  0
                 m.put( "rolePermissionId", rolePermissionId );
 88  0
                 m.put( "roleId", roleId );
 89  0
                 m.put( "permissionId", permissionId );
 90  0
                 return m;
 91  
         }
 92  
 
 93  
         public boolean isActive() {
 94  0
                 return this.active;
 95  
         }
 96  
 
 97  
         public void setActive(boolean active) {
 98  0
                 this.active = active;
 99  0
         }
 100  
 
 101  
         public void setRolePermissionId(String rolePermissionId) {
 102  0
                 this.rolePermissionId = rolePermissionId;
 103  0
         }
 104  
 
 105  
         /**
 106  
          * @return the kimPermission
 107  
          */
 108  
         public KimPermissionImpl getKimPermission() {
 109  0
                 return this.kimPermission;
 110  
         }
 111  
 
 112  
         /**
 113  
          * @param kimPermission the kimPermission to set
 114  
          */
 115  
         public void setKimPermission(KimPermissionImpl kimPermission) {
 116  0
                 this.kimPermission = kimPermission;
 117  0
         }
 118  
 
 119  
 }