Coverage Report - org.kuali.rice.kim.bo.ui.RoleDocumentDelegation
 
Classes in this File Line Coverage Branch Coverage Complexity
RoleDocumentDelegation
0%
0/33
0%
0/2
1.056
 
 1  
 /*
 2  
  * Copyright 2007-2009 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.ui;
 17  
 
 18  
 import java.util.LinkedHashMap;
 19  
 import java.util.List;
 20  
 
 21  
 import javax.persistence.Column;
 22  
 import javax.persistence.Entity;
 23  
 import javax.persistence.Id;
 24  
 import javax.persistence.Table;
 25  
 
 26  
 import org.kuali.rice.kew.util.KEWConstants;
 27  
 import org.kuali.rice.kns.util.TypedArrayList;
 28  
 
 29  
 /**
 30  
  * This is a description of what this class does - kellerj don't forget to fill this in.
 31  
  *
 32  
  * @author Kuali Rice Team (kuali-rice@googleroles.com)
 33  
  *
 34  
  */
 35  
 @Entity
 36  
 @Table(name="KRIM_PND_DLGN_T")
 37  0
 public class RoleDocumentDelegation extends KimDocumentBoBase {
 38  
 
 39  
         private static final long serialVersionUID = 1L;
 40  
 
 41  
         @Id
 42  
         @Column(name="DLGN_ID")
 43  
         protected String delegationId;
 44  
 
 45  
         @Column(name="ROLE_ID")
 46  
         protected String roleId;
 47  
 
 48  
         @Column(name="KIM_TYP_ID")
 49  
         protected String kimTypeId;
 50  
 
 51  
         @Column(name="DLGN_TYP_CD")
 52  
         protected String delegationTypeCode;
 53  
 
 54  0
         private List<RoleDocumentDelegationMember> members = new TypedArrayList(RoleDocumentDelegationMember.class);
 55  
 
 56  0
         private RoleDocumentDelegationMember member = new RoleDocumentDelegationMember();
 57  
 
 58  0
         protected List<KimDocumentRoleQualifier> qualifiers = new TypedArrayList(KimDocumentRoleQualifier.class);
 59  
 
 60  
         /**
 61  
          * This overridden method ...
 62  
          *
 63  
          * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
 64  
          */
 65  
         @SuppressWarnings("unchecked")
 66  
         @Override
 67  
         protected LinkedHashMap toStringMapper() {
 68  0
                 LinkedHashMap m = new LinkedHashMap();
 69  0
                 m.put( "delegationId", delegationId );
 70  0
                 m.put( "roleId", roleId );
 71  0
                 m.put( "delegationTypeCode", delegationTypeCode );
 72  0
                 return m;
 73  
         }
 74  
 
 75  
         public String getRoleId() {
 76  0
                 return this.roleId;
 77  
         }
 78  
 
 79  
         public void setRoleId(String roleId) {
 80  0
                 this.roleId = roleId;
 81  0
         }
 82  
 
 83  
         public String getKimTypeId() {
 84  0
                 return this.kimTypeId;
 85  
         }
 86  
 
 87  
         public void setKimTypeId(String typeId) {
 88  0
                 this.kimTypeId = typeId;
 89  0
         }
 90  
 
 91  
         public String getDelegationTypeCode() {
 92  0
                 return this.delegationTypeCode;
 93  
         }
 94  
 
 95  
         public void setDelegationTypeCode(String delegationTypeCode) {
 96  0
                 this.delegationTypeCode = delegationTypeCode;
 97  0
         }
 98  
 
 99  
         public String getDelegationId() {
 100  0
                 return this.delegationId;
 101  
         }
 102  
 
 103  
         public void setDelegationId(String delegationId) {
 104  0
                 this.delegationId = delegationId;
 105  0
         }
 106  
 
 107  
         /**
 108  
          * @return the qualifiers
 109  
          */
 110  
         public List<KimDocumentRoleQualifier> getQualifiers() {
 111  0
                 return this.qualifiers;
 112  
         }
 113  
 
 114  
         /**
 115  
          * @param qualifiers the qualifiers to set
 116  
          */
 117  
         public void setQualifiers(List<KimDocumentRoleQualifier> qualifiers) {
 118  0
                 this.qualifiers = qualifiers;
 119  0
         }
 120  
 
 121  
         public int getNumberOfQualifiers(){
 122  0
                 return qualifiers==null?0:qualifiers.size();
 123  
         }
 124  
 
 125  
         /**
 126  
          * @return the members
 127  
          */
 128  
         public List<RoleDocumentDelegationMember> getMembers() {
 129  0
                 return this.members;
 130  
         }
 131  
 
 132  
         /**
 133  
          * @param members the members to set
 134  
          */
 135  
         public void setMembers(List<RoleDocumentDelegationMember> members) {
 136  0
                 this.members = members;
 137  0
         }
 138  
 
 139  
         /**
 140  
          * @return the member
 141  
          */
 142  
         public RoleDocumentDelegationMember getMember() {
 143  0
                 return this.member;
 144  
         }
 145  
 
 146  
         /**
 147  
          * @param member the member to set
 148  
          */
 149  
         public void setMember(RoleDocumentDelegationMember member) {
 150  0
                 this.member = member;
 151  0
         }
 152  
 
 153  
         public boolean isDelegationPrimary(){
 154  0
                 return KEWConstants.DELEGATION_PRIMARY.equals(getDelegationTypeCode());
 155  
         }
 156  
 
 157  
         public boolean isDelegationSecondary(){
 158  0
                 return KEWConstants.DELEGATION_SECONDARY.equals(getDelegationTypeCode());
 159  
         }
 160  
 
 161  
 }