Coverage Report - org.kuali.student.r2.core.versionmanagement.dto.VersionDisplayInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
VersionDisplayInfo
0%
0/36
0%
0/6
1.167
 
 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  
 package org.kuali.student.r2.core.versionmanagement.dto;
 12  
 
 13  
 import org.kuali.student.r2.core.versionmanagement.infc.VersionDisplay;
 14  
 import org.w3c.dom.Element;
 15  
 
 16  
 import javax.xml.bind.annotation.XmlAccessType;
 17  
 import javax.xml.bind.annotation.XmlAccessorType;
 18  
 import javax.xml.bind.annotation.XmlAnyElement;
 19  
 import javax.xml.bind.annotation.XmlElement;
 20  
 import javax.xml.bind.annotation.XmlType;
 21  
 import java.io.Serializable;
 22  
 import java.util.Date;
 23  
 import java.util.List;
 24  
 import javax.xml.bind.annotation.XmlAttribute;
 25  
 
 26  
 @XmlAccessorType(XmlAccessType.FIELD)
 27  
 @XmlType(name = "VersionDisplayInfo", propOrder = {"id",
 28  
     "versionIndId",
 29  
     "refObjectUri",
 30  
     "sequenceNumber",
 31  
     "currentVersionEnd",
 32  
     "currentVersionStart",
 33  
     "versionComment",
 34  
     "versionedFromId",
 35  
     "_futureElements"})
 36  
 public class VersionDisplayInfo implements VersionDisplay, Serializable {
 37  
 
 38  
     private static final long serialVersionUID = 1L;
 39  
     @XmlAttribute
 40  
     private String id;
 41  
     @XmlElement
 42  
     private String versionIndId;
 43  
     @XmlElement
 44  
     private String refObjectUri;
 45  
     @XmlElement
 46  
     private Long sequenceNumber;
 47  
     @XmlElement
 48  
     private Date currentVersionStart;
 49  
     @XmlElement
 50  
     private Date currentVersionEnd;
 51  
     @XmlElement
 52  
     private String versionComment;
 53  
     @XmlElement
 54  
     private String versionedFromId;
 55  
     @XmlAnyElement
 56  
     private List<Element> _futureElements;
 57  
 
 58  0
     public VersionDisplayInfo() {
 59  0
     }
 60  
 
 61  
     public VersionDisplayInfo(VersionDisplay versionDisplay) {
 62  0
         super();
 63  
 
 64  0
         if (null != versionDisplay) {
 65  0
             this.id = versionDisplay.getId();
 66  0
             this.versionIndId = versionDisplay.getVersionIndId();
 67  0
             this.sequenceNumber = versionDisplay.getSequenceNumber();
 68  0
             this.currentVersionStart = (null != versionDisplay.getCurrentVersionStart()) ? new Date(versionDisplay.getCurrentVersionStart().getTime()) : null;
 69  0
             this.currentVersionEnd = (null != versionDisplay.getCurrentVersionEnd()) ? new Date(versionDisplay.getCurrentVersionEnd().getTime()) : null;
 70  0
             this.versionComment = versionDisplay.getVersionComment();
 71  0
             this.versionedFromId = versionDisplay.getVersionedFromId();
 72  
         }
 73  0
     }
 74  
 
 75  
     @Override
 76  
     public String getId() {
 77  0
         return id;
 78  
     }
 79  
 
 80  
     public void setId(String id) {
 81  0
         this.id = id;
 82  0
     }
 83  
 
 84  
     @Override
 85  
     public String getVersionedFromId() {
 86  0
         return versionedFromId;
 87  
     }
 88  
 
 89  
     public void setVersionedFromId(String versionedFromId) {
 90  0
         this.versionedFromId = versionedFromId;
 91  0
     }
 92  
 
 93  
     @Override
 94  
     public String getRefObjectUri() {
 95  0
         return refObjectUri;
 96  
     }
 97  
 
 98  
     public void setRefObjectUri(String refObjectUri) {
 99  0
         this.refObjectUri = refObjectUri;
 100  0
     }
 101  
 
 102  
     @Override
 103  
     public String getVersionIndId() {
 104  0
         return versionIndId;
 105  
     }
 106  
 
 107  
     public void setVersionIndId(String versionIndId) {
 108  0
         this.versionIndId = versionIndId;
 109  0
     }
 110  
 
 111  
     @Override
 112  
     public Long getSequenceNumber() {
 113  0
         return sequenceNumber;
 114  
     }
 115  
 
 116  
     public void setSequenceNumber(Long sequenceNumber) {
 117  0
         this.sequenceNumber = sequenceNumber;
 118  0
     }
 119  
 
 120  
     @Override
 121  
     public Date getCurrentVersionStart() {
 122  0
         return currentVersionStart;
 123  
     }
 124  
 
 125  
     public void setCurrentVersionStart(Date currentVersionStart) {
 126  0
         this.currentVersionStart = currentVersionStart;
 127  0
     }
 128  
 
 129  
     @Override
 130  
     public Date getCurrentVersionEnd() {
 131  0
         return currentVersionEnd;
 132  
     }
 133  
 
 134  
     public void setCurrentVersionEnd(Date currentVersionEnd) {
 135  0
         this.currentVersionEnd = currentVersionEnd;
 136  0
     }
 137  
 
 138  
     @Override
 139  
     public String getVersionComment() {
 140  0
         return versionComment;
 141  
     }
 142  
 
 143  
     public void setVersionComment(String versionComment) {
 144  0
         this.versionComment = versionComment;
 145  0
     }
 146  
 }