Coverage Report - org.kuali.rice.kim.impl.role.RoleResponsibilityActionBo
 
Classes in this File Line Coverage Branch Coverage Complexity
RoleResponsibilityActionBo
0%
0/15
0%
0/8
0
 
 1  
 /**
 2  
  * Copyright 2005-2011 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  
 
 17  
 package org.kuali.rice.kim.impl.role;
 18  
 
 19  
 
 20  
 import javax.persistence.Column
 21  
 import javax.persistence.Entity
 22  
 import javax.persistence.FetchType
 23  
 import javax.persistence.Id
 24  
 import javax.persistence.JoinColumn
 25  
 import javax.persistence.ManyToOne
 26  
 import javax.persistence.Table
 27  
 import org.hibernate.annotations.Type
 28  
 import org.kuali.rice.kim.api.role.RoleResponsibilityAction
 29  
 import org.kuali.rice.kim.api.role.RoleResponsibilityActionContract
 30  
 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase
 31  
 
 32  
 /**
 33  
  * This is a description of what this class does - kellerj don't forget to fill this in. 
 34  
  *
 35  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 36  
  *
 37  
  */
 38  
 @Entity
 39  
 @Table(name = "KRIM_ROLE_RSP_ACTN_T")
 40  
 public class RoleResponsibilityActionBo extends PersistableBusinessObjectBase implements RoleResponsibilityActionContract {
 41  
 
 42  
     private static final long serialVersionUID = -2840071737863303404L;
 43  
 
 44  
     @Id
 45  
     @Column(name = "ROLE_RSP_ACTN_ID")
 46  
     String id;
 47  
 
 48  
     @Column(name = "ROLE_RSP_ID")
 49  
     String roleResponsibilityId;
 50  
 
 51  
     @Column(name = "ROLE_MBR_ID")
 52  
     String roleMemberId;
 53  
 
 54  
     @Column(name = "ACTN_TYP_CD")
 55  
     String actionTypeCode;
 56  
 
 57  
     @Column(name = "ACTN_PLCY_CD")
 58  
     String actionPolicyCode;
 59  
 
 60  
     @Column(name = "FRC_ACTN")
 61  
     @Type(type = "yes_no")
 62  
     boolean forceAction;
 63  
 
 64  
     @Column(name = "PRIORITY_NBR")
 65  
     Integer priorityNumber;
 66  
 
 67  
     @ManyToOne(targetEntity = RoleResponsibilityBo.class, fetch = FetchType.EAGER, cascade = [])
 68  
     @JoinColumn(name = "ROLE_RSP_ID", insertable = false, updatable = false)
 69  
     RoleResponsibilityBo roleResponsibility;
 70  
 
 71  
     public RoleResponsibilityBo getRoleResponsibility() {
 72  0
         return roleResponsibility
 73  
     }
 74  
 
 75  
 
 76  
     public static RoleResponsibilityAction to(RoleResponsibilityActionBo bo) {
 77  0
         if (bo == null) { return null;}
 78  0
         return RoleResponsibilityAction.Builder.create(bo).build();
 79  
     }
 80  
 
 81  
     public static RoleResponsibilityActionBo from(RoleResponsibilityAction immutable) {
 82  0
         if (immutable == null) { return null;}
 83  
 
 84  0
         RoleResponsibilityActionBo bo = new RoleResponsibilityActionBo();
 85  0
         bo.id = immutable.getId();
 86  0
         bo.roleResponsibilityId = immutable.getRoleResponsibilityId();
 87  0
         bo.roleMemberId = immutable.getRoleMemberId();
 88  0
         bo.actionTypeCode = immutable.getActionTypeCode();
 89  0
         bo.actionPolicyCode = immutable.getActionPolicyCode();
 90  0
         bo.forceAction = immutable.isForceAction();
 91  0
         bo.priorityNumber = immutable.getPriorityNumber();
 92  0
         bo.roleResponsibility = RoleResponsibilityBo.from(immutable.getRoleResponsibility());
 93  0
         bo.versionNumber = immutable.getVersionNumber();
 94  0
         return bo;
 95  
     }
 96  
 }