Coverage Report - org.kuali.student.core.organization.dto.OrgTreeInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
OrgTreeInfo
0%
0/61
0%
0/30
2.2
 
 1  
 /**
 2  
  * Copyright 2010 The Kuali Foundation Licensed under the
 3  
  * Educational Community License, Version 2.0 (the "License"); you may
 4  
  * not use this file except in compliance with the License. You may
 5  
  * obtain a copy of the License at
 6  
  *
 7  
  * http://www.osedu.org/licenses/ECL-2.0
 8  
  *
 9  
  * Unless required by applicable law or agreed to in writing,
 10  
  * software distributed under the License is distributed on an "AS IS"
 11  
  * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 12  
  * or implied. See the License for the specific language governing
 13  
  * permissions and limitations under the License.
 14  
  */
 15  
 
 16  
 /*
 17  
  *  OrgTreeInfo is not defined in the service contract. This is currently
 18  
  *  an implementation-specific class.
 19  
  */
 20  
 
 21  
 package org.kuali.student.core.organization.dto;
 22  
 
 23  
 import java.io.Serializable;
 24  
 
 25  
 import javax.xml.bind.annotation.XmlAccessType;
 26  
 import javax.xml.bind.annotation.XmlAccessorType;
 27  
 import javax.xml.bind.annotation.XmlAttribute;
 28  
 
 29  
 @XmlAccessorType(XmlAccessType.FIELD)
 30  
 public class OrgTreeInfo implements Serializable {
 31  
 
 32  
         private static final long serialVersionUID = 7315439355073246895L;
 33  
 
 34  
         @XmlAttribute
 35  
         private String orgId;
 36  
         @XmlAttribute
 37  
         private String parentId;
 38  
         @XmlAttribute
 39  
         private String displayName;
 40  
 
 41  
         private String positionId;
 42  
         
 43  
         private String personId;
 44  
         
 45  
         private String relationType;
 46  
         
 47  
         private String orgHierarchyId;
 48  
         
 49  0
         private long positions=0;
 50  
         
 51  
         
 52  
         public OrgTreeInfo() {
 53  0
                 super();
 54  0
         }
 55  
         public OrgTreeInfo(String orgId, String parentId, String displayName) {
 56  0
                 super();
 57  0
                 this.orgId = orgId;
 58  0
                 this.parentId = parentId;
 59  0
                 this.displayName = displayName;
 60  0
         }        
 61  
         
 62  
         public String getOrgId() {
 63  0
                 return orgId;
 64  
         }
 65  
         public void setOrgId(String orgId) {
 66  0
                 this.orgId = orgId;
 67  0
         }
 68  
         public String getParentId() {
 69  0
                 return parentId;
 70  
         }
 71  
         public void setParentId(String parentId) {
 72  0
                 this.parentId = parentId;
 73  0
         }
 74  
         public String getDisplayName() {
 75  0
                 return displayName;
 76  
         }
 77  
         public void setDisplayName(String displayName) {
 78  0
                 this.displayName = displayName;
 79  0
         }
 80  
         
 81  
         public String getPositionId() {
 82  0
         return positionId;
 83  
     }
 84  
 
 85  
     public void setPositionId(String positionId) {
 86  0
         this.positionId = positionId;
 87  0
     }
 88  
     
 89  
     public String getPersonId() {
 90  0
         return personId;
 91  
     }
 92  
 
 93  
     public void setPersonId(String personId) {
 94  0
         this.positionId = personId;
 95  0
     }
 96  
     
 97  
     public String getRelationType() {
 98  0
         return relationType;
 99  
     }
 100  
 
 101  
     public void setRelationType(String relationType) {
 102  0
         this.relationType = relationType;
 103  0
     }
 104  
     
 105  
     public long getPositions(){
 106  0
         return positions;
 107  
     }
 108  
     
 109  
     public void setPositions(long positions){
 110  0
         this.positions=positions;
 111  0
     }
 112  
     
 113  
     
 114  
         public String getOrgHierarchyId() {
 115  0
         return orgHierarchyId;
 116  
     }
 117  
     public void setOrgHierarchyId(String orgHierarchyId) {
 118  0
         this.orgHierarchyId = orgHierarchyId;
 119  0
     }
 120  
     /* (non-Javadoc)
 121  
          * @see java.lang.Object#hashCode()
 122  
          */
 123  
         @Override
 124  
         public int hashCode() {
 125  0
                 final int prime = 31;
 126  0
                 int result = 1;
 127  0
                 result = prime * result
 128  
                                 + ((displayName == null) ? 0 : displayName.hashCode());
 129  0
                 result = prime * result + ((orgId == null) ? 0 : orgId.hashCode());
 130  0
                 result = prime * result
 131  
                                 + ((parentId == null) ? 0 : parentId.hashCode());
 132  0
                 return result;
 133  
         }
 134  
         /* (non-Javadoc)
 135  
          * @see java.lang.Object#equals(java.lang.Object)
 136  
          */
 137  
         @Override
 138  
         public boolean equals(Object obj) {
 139  0
                 if (this == obj)
 140  0
                         return true;
 141  0
                 if (obj == null)
 142  0
                         return false;
 143  0
                 if (getClass() != obj.getClass())
 144  0
                         return false;
 145  0
                 OrgTreeInfo other = (OrgTreeInfo) obj;
 146  0
                 if (displayName == null) {
 147  0
                         if (other.displayName != null)
 148  0
                                 return false;
 149  0
                 } else if (!displayName.equals(other.displayName))
 150  0
                         return false;
 151  0
                 if (orgId == null) {
 152  0
                         if (other.orgId != null)
 153  0
                                 return false;
 154  0
                 } else if (!orgId.equals(other.orgId))
 155  0
                         return false;
 156  0
                 if (parentId == null) {
 157  0
                         if (other.parentId != null)
 158  0
                                 return false;
 159  0
                 } else if (!parentId.equals(other.parentId))
 160  0
                         return false;
 161  0
                 return true;
 162  
         }
 163  
         
 164  
 }