Coverage Report - org.kuali.student.r2.core.document.dto.DocumentCategoryInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
DocumentCategoryInfo
0%
0/13
0%
0/6
1.5
 
 1  
 /*
 2  
  * Copyright 2009 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 1.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/ecl1.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.student.r2.core.document.dto;
 17  
 
 18  
 import org.kuali.student.r2.common.dto.KeyEntityInfo;
 19  
 import org.kuali.student.r2.core.document.infc.DocumentCategory;
 20  
 import org.w3c.dom.Element;
 21  
 
 22  
 import javax.xml.bind.annotation.*;
 23  
 import java.io.Serializable;
 24  
 import java.util.Date;
 25  
 import java.util.List;
 26  
 
 27  
 
 28  
 /**
 29  
  * Refer to interface javadoc
 30  
  *
 31  
  * @Version 2.0
 32  
  * @Author tom
 33  
  * @Author Sri komandur@uw.edu
 34  
  *
 35  
  */
 36  
 @XmlAccessorType(XmlAccessType.FIELD)
 37  
 @XmlType(name = "DocumentCategoryInfo", propOrder = { "key", "typeKey", "stateKey",
 38  
         "name", "descr", "effectiveDate", "expirationDate", "meta", "attributes", "_futureElements" })
 39  
 public class DocumentCategoryInfo extends KeyEntityInfo implements DocumentCategory, Serializable {
 40  
 
 41  
     private static final long serialVersionUID = 1L;
 42  
 
 43  
     @XmlElement
 44  
     private Date effectiveDate;
 45  
 
 46  
     @XmlElement
 47  
     private Date expirationDate;
 48  
 
 49  
     @XmlAnyElement
 50  
     private List<Element> _futureElements;
 51  
 
 52  0
     public DocumentCategoryInfo() {
 53  0
     }
 54  
 
 55  
     public DocumentCategoryInfo(DocumentCategory documentCategory) {
 56  0
         super(documentCategory);
 57  0
         if (null != documentCategory) {
 58  0
             this.effectiveDate = (null != documentCategory.getEffectiveDate()) ? new Date(documentCategory.getEffectiveDate().getTime()) : null;
 59  0
             this.expirationDate = (null != documentCategory.getExpirationDate()) ? new Date(documentCategory.getExpirationDate().getTime()) : null;
 60  
         }
 61  0
     }
 62  
 
 63  
     @Override
 64  
     public Date getEffectiveDate() {
 65  0
         return effectiveDate;
 66  
     }
 67  
 
 68  
     public void setEffectiveDate(Date effectiveDate) {
 69  0
         this.effectiveDate = effectiveDate;
 70  0
     }
 71  
 
 72  
     @Override
 73  
     public Date getExpirationDate() {
 74  0
         return expirationDate;
 75  
     }
 76  
 
 77  
     public void setExpirationDate(Date expirationDate) {
 78  0
         this.expirationDate = expirationDate;
 79  0
     }
 80  
 
 81  
 }