Coverage Report - org.kuali.student.enrollment.hold.dto.HoldInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
HoldInfo
0%
0/39
0%
0/10
1.357
 
 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  
 package org.kuali.student.enrollment.hold.dto;
 16  
 
 17  
 import java.io.Serializable;
 18  
 import java.util.Date;
 19  
 import java.util.List;
 20  
 
 21  
 import javax.xml.bind.annotation.XmlAccessType;
 22  
 import javax.xml.bind.annotation.XmlAccessorType;
 23  
 import javax.xml.bind.annotation.XmlAnyElement;
 24  
 import javax.xml.bind.annotation.XmlElement;
 25  
 import javax.xml.bind.annotation.XmlType;
 26  
 
 27  
 import org.kuali.student.enrollment.hold.infc.Hold;
 28  
 import org.kuali.student.r2.common.dto.IdEntityInfo;
 29  
 import org.w3c.dom.Element;
 30  
 
 31  
 @XmlAccessorType(XmlAccessType.FIELD)
 32  
 @XmlType(name = "HoldInfo", propOrder = { "id", "typeKey", "stateKey", "name",
 33  
                 "descr", "issueId", "personId", "isWarning", "isOverridable",
 34  
                 "effectiveDate", "releasedDate", "meta", "attributes",
 35  
                 "_futureElements" })
 36  
 public class HoldInfo extends IdEntityInfo implements Hold, Serializable {
 37  
         private static final long serialVersionUID = 1L;
 38  
 
 39  
         @XmlElement
 40  
         private String personId;
 41  
 
 42  
         @XmlElement
 43  
         private String issueId;
 44  
 
 45  
         @XmlElement
 46  
         private Boolean isWarning;
 47  
 
 48  
         @XmlElement
 49  
         private Boolean isOverridable;
 50  
 
 51  
         @XmlElement
 52  
         private Date effectiveDate;
 53  
 
 54  
         @XmlElement
 55  
         private Date releasedDate;
 56  
 
 57  
         @XmlAnyElement
 58  
         private List<Element> _futureElements;
 59  
 
 60  
         public HoldInfo() {
 61  0
                 super();
 62  0
                 personId = null;
 63  0
                 isWarning = false;
 64  0
                 isOverridable = false;
 65  0
                 issueId = null;
 66  0
                 effectiveDate = null;
 67  0
                 releasedDate = null;
 68  0
                 _futureElements = null;
 69  0
         }
 70  
 
 71  
         public HoldInfo(Hold hold) {
 72  0
                 super(hold);
 73  0
                 if (null != hold) {
 74  0
                         this.personId = hold.getPersonId();
 75  0
                         this.isWarning = hold.getIsWarning();
 76  0
                         this.isOverridable = hold.getIsOverridable();
 77  0
                         this.issueId = hold.getIssueId();
 78  0
                         this.effectiveDate = new Date(hold.getEffectiveDate().getTime());
 79  0
                         this.releasedDate = new Date(hold.getReleasedDate().getTime());
 80  
                 }
 81  
 
 82  0
                 _futureElements = null;
 83  0
         }
 84  
 
 85  
         @Override
 86  
         public String getPersonId() {
 87  0
                 return personId;
 88  
         }
 89  
 
 90  
         public void setPersonId(String personId) {
 91  0
                 this.personId = personId;
 92  0
         }
 93  
 
 94  
         @Override
 95  
         public String getIssueId() {
 96  0
                 return issueId;
 97  
         }
 98  
 
 99  
         public void setIssueId(String issueId) {
 100  0
                 this.issueId = issueId;
 101  0
         }
 102  
 
 103  
         @Override
 104  
         public Boolean getIsWarning() {
 105  0
                 return isWarning;
 106  
         }
 107  
 
 108  
         public void setIsWarning(Boolean isWarning) {
 109  0
                 this.isWarning = isWarning;
 110  0
         }
 111  
 
 112  
         @Override
 113  
         public Boolean getIsOverridable() {
 114  0
                 return isOverridable;
 115  
         }
 116  
 
 117  
         public void setIsOverridable(Boolean isOverridable) {
 118  0
                 this.isOverridable = isOverridable;
 119  0
         }
 120  
 
 121  
         @Override
 122  
         public Date getEffectiveDate() {
 123  0
                 return effectiveDate != null ? new Date(effectiveDate.getTime()) : null;
 124  
         }
 125  
 
 126  
         public void setEffectiveDate(Date effectiveDate) {
 127  0
                 if (effectiveDate != null)
 128  0
                         this.effectiveDate = new Date(effectiveDate.getTime());
 129  0
         }
 130  
 
 131  
         @Override
 132  
         public Date getReleasedDate() {
 133  0
                 return releasedDate != null ? new Date(releasedDate.getTime()) : null;
 134  
         }
 135  
 
 136  
         public void setReleasedDate(Date releasedDate) {
 137  0
                 if (releasedDate != null)
 138  0
                         this.releasedDate = new Date(releasedDate.getTime());
 139  0
         }
 140  
 }