Coverage Report - org.kuali.rice.kim.bo.role.impl.RoleResponsibilityImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
RoleResponsibilityImpl
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 responsibilitys and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.rice.kim.bo.role.impl;
 17  
 
 18  
 import org.hibernate.annotations.Type;
 19  
 import org.kuali.rice.kim.bo.role.RoleResponsibility;
 20  
 import org.kuali.rice.kim.bo.role.dto.RoleResponsibilityInfo;
 21  
 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
 22  
 
 23  
 import javax.persistence.*;
 24  
 
 25  
 /**
 26  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 27  
  */
 28  
 @Entity
 29  
 @Table(name="KRIM_ROLE_RSP_T")
 30  0
 public class RoleResponsibilityImpl extends PersistableBusinessObjectBase implements RoleResponsibility {
 31  
         private static final long serialVersionUID = 1L;
 32  
         
 33  
         @Id
 34  
         @Column(name="ROLE_RSP_ID")
 35  
         protected String roleResponsibilityId;
 36  
         @Column(name="ROLE_ID")
 37  
         protected String roleId;
 38  
         @Column(name="RSP_ID")
 39  
         protected String responsibilityId;
 40  
         @Type(type="yes_no")
 41  
         @Column(name="ACTV_IND")
 42  
         protected boolean active;
 43  
         
 44  
         @ManyToOne(targetEntity=KimResponsibilityImpl.class, fetch = FetchType.EAGER, cascade = { })
 45  
         @JoinColumn(name = "RSP_ID", insertable = false, updatable = false)
 46  
         protected KimResponsibilityImpl kimResponsibility;
 47  
 
 48  
         /**
 49  
          * @see org.kuali.rice.kim.bo.role.RoleResponsibility#getResponsibilityId()
 50  
          */
 51  
         public String getResponsibilityId() {
 52  0
                 return responsibilityId;
 53  
         }
 54  
         
 55  
         /**
 56  
          * @see org.kuali.rice.kim.bo.role.RoleResponsibility#getRoleId()
 57  
          */
 58  
         public String getRoleId() {
 59  0
                 return roleId;
 60  
         }
 61  
 
 62  
         /**
 63  
          * @see org.kuali.rice.kim.bo.role.RoleResponsibility#getRoleResponsibilityId()
 64  
          */
 65  
         public String getRoleResponsibilityId() {
 66  0
                 return roleResponsibilityId;
 67  
         }
 68  
 
 69  
         public void setResponsibilityId(String responsibilityId) {
 70  0
                 this.responsibilityId = responsibilityId;
 71  0
         }
 72  
 
 73  
         public void setRoleId(String roleId) {
 74  0
                 this.roleId = roleId;
 75  0
         }
 76  
 
 77  
         public boolean isActive() {
 78  0
                 return this.active;
 79  
         }
 80  
 
 81  
         public void setActive(boolean active) {
 82  0
                 this.active = active;
 83  0
         }
 84  
 
 85  
         public void setRoleResponsibilityId(String roleResponsibilityId) {
 86  0
                 this.roleResponsibilityId = roleResponsibilityId;
 87  0
         }
 88  
 
 89  
         public KimResponsibilityImpl getKimResponsibility() {
 90  0
                 return this.kimResponsibility;
 91  
         }
 92  
 
 93  
         public void setKimResponsibility(KimResponsibilityImpl kimResponsibility) {
 94  0
                 this.kimResponsibility = kimResponsibility;
 95  0
         }
 96  
 
 97  
         public RoleResponsibilityInfo toSimpleInfo() {
 98  0
                 RoleResponsibilityInfo roleResponsibilityInfo = new RoleResponsibilityInfo();
 99  0
                 roleResponsibilityInfo.setRoleId(getRoleId());
 100  0
                 roleResponsibilityInfo.setResponsibilityId(getResponsibilityId());
 101  0
                 roleResponsibilityInfo.setRoleResponsibilityId(getRoleResponsibilityId());
 102  0
                 roleResponsibilityInfo.setKimResponsibilityInfo(getKimResponsibility().toSimpleInfo());
 103  0
                 return roleResponsibilityInfo;
 104  
         }
 105  
 
 106  
 }