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