Coverage Report - org.kuali.student.r2.common.versionmanagement.dto.VersionDisplayInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
VersionDisplayInfo
0%
0/32
0%
0/6
1.188
 
 1  
 /*
 2  
  * Copyright 2010 The Kuali Foundation Licensed under the Educational Community
 3  
  * License, Version 2.0 (the "License"); you may not use this file except in
 4  
  * compliance with the License. You may obtain a copy of the License at
 5  
  * http://www.osedu.org/licenses/ECL-2.0 Unless required by applicable law or
 6  
  * agreed to in writing, software distributed under the License is distributed
 7  
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
 8  
  * express or implied. See the License for the specific language governing
 9  
  * permissions and limitations under the License.
 10  
  */
 11  
 
 12  
 package org.kuali.student.r2.common.versionmanagement.dto;
 13  
 
 14  
 import org.kuali.student.r2.common.versionmanagement.infc.VersionDisplay;
 15  
 import org.w3c.dom.Element;
 16  
 
 17  
 import javax.xml.bind.annotation.XmlAccessType;
 18  
 import javax.xml.bind.annotation.XmlAccessorType;
 19  
 import javax.xml.bind.annotation.XmlAnyElement;
 20  
 import javax.xml.bind.annotation.XmlElement;
 21  
 import javax.xml.bind.annotation.XmlType;
 22  
 import java.io.Serializable;
 23  
 import java.util.Date;
 24  
 import java.util.List;
 25  
 
 26  
 @XmlAccessorType(XmlAccessType.FIELD)
 27  
 @XmlType(name = "VersionDisplayInfo", propOrder = {"versionIndId", "objectTypeURI", "sequenceNumber", "currentVersionEnd", "currentVersionStart", "versionComment", "versionedFromId", "_futureElements"})
 28  
 public class VersionDisplayInfo implements VersionDisplay, Serializable {
 29  
 
 30  
     private static final long serialVersionUID = 1L;
 31  
 
 32  
     @XmlElement
 33  
     private String versionIndId;
 34  
 
 35  
     @XmlElement
 36  
     private String objectTypeURI;
 37  
 
 38  
     @XmlElement
 39  
     private Long sequenceNumber;
 40  
 
 41  
     @XmlElement
 42  
     private Date currentVersionStart;
 43  
 
 44  
     @XmlElement
 45  
     private Date currentVersionEnd;
 46  
 
 47  
     @XmlElement
 48  
     private String versionComment;
 49  
 
 50  
     @XmlElement
 51  
     private String versionedFromId;
 52  
 
 53  
     @XmlAnyElement
 54  
     private List<Element> _futureElements;
 55  
 
 56  0
     public VersionDisplayInfo() {
 57  
 
 58  0
     }
 59  
 
 60  
     public VersionDisplayInfo(VersionDisplay versionDisplay) {
 61  0
         super();
 62  
 
 63  0
         if (null != versionDisplay) {
 64  0
             this.versionIndId = versionDisplay.getVersionIndId();
 65  0
             this.sequenceNumber = versionDisplay.getSequenceNumber();
 66  0
             this.currentVersionStart = (null != versionDisplay.getCurrentVersionStart()) ? new Date(versionDisplay.getCurrentVersionStart().getTime()) : null;
 67  0
             this.currentVersionEnd = (null != versionDisplay.getCurrentVersionEnd()) ? new Date(versionDisplay.getCurrentVersionEnd().getTime()) : null;
 68  0
             this.versionComment = versionDisplay.getVersionComment();
 69  0
             this.versionedFromId = versionDisplay.getVersionedFromId();
 70  
         }
 71  0
     }
 72  
 
 73  
     @Override
 74  
     public String getVersionedFromId() {
 75  0
         return versionedFromId;
 76  
     }
 77  
 
 78  
     public void setVersionedFromId(String versionedFromId) {
 79  0
         this.versionedFromId = versionedFromId;
 80  0
     }
 81  
 
 82  
     @Override
 83  
     public String getObjectTypeURI() {
 84  0
         return objectTypeURI;
 85  
     }
 86  
 
 87  
     public void setObjectTypeURI(String objectTypeURI) {
 88  0
         this.objectTypeURI = objectTypeURI;
 89  0
     }
 90  
 
 91  
     @Override
 92  
     public String getVersionIndId() {
 93  0
         return versionIndId;
 94  
     }
 95  
 
 96  
     public void setVersionIndId(String versionIndId) {
 97  0
         this.versionIndId = versionIndId;
 98  0
     }
 99  
 
 100  
     @Override
 101  
     public Long getSequenceNumber() {
 102  0
         return sequenceNumber;
 103  
     }
 104  
 
 105  
     public void setSequenceNumber(Long sequenceNumber) {
 106  0
         this.sequenceNumber = sequenceNumber;
 107  0
     }
 108  
 
 109  
     @Override
 110  
     public Date getCurrentVersionStart() {
 111  0
         return currentVersionStart;
 112  
     }
 113  
 
 114  
     public void setCurrentVersionStart(Date currentVersionStart) {
 115  0
         this.currentVersionStart = currentVersionStart;
 116  0
     }
 117  
 
 118  
     @Override
 119  
     public Date getCurrentVersionEnd() {
 120  0
         return currentVersionEnd;
 121  
     }
 122  
 
 123  
     public void setCurrentVersionEnd(Date currentVersionEnd) {
 124  0
         this.currentVersionEnd = currentVersionEnd;
 125  0
     }
 126  
 
 127  
     @Override
 128  
     public String getVersionComment() {
 129  0
         return versionComment;
 130  
     }
 131  
 
 132  
     public void setVersionComment(String versionComment) {
 133  0
         this.versionComment = versionComment;
 134  0
     }
 135  
 }