Coverage Report - org.kuali.student.r2.core.comment.dto.CommentInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
CommentInfo
0%
0/27
0%
0/8
1.333
 
 1  
 /*
 2  
  * Copyright 2011 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  
 package org.kuali.student.r2.core.comment.dto;
 17  
 
 18  
 import org.kuali.student.r2.common.dto.IdNamelessEntityInfo;
 19  
 import org.kuali.student.r2.common.dto.RichTextInfo;
 20  
 import org.kuali.student.r2.core.comment.infc.Comment;
 21  
 import org.w3c.dom.Element;
 22  
 
 23  
 import javax.xml.bind.annotation.*;
 24  
 import java.io.Serializable;
 25  
 import java.util.Date;
 26  
 import java.util.List;
 27  
 
 28  
 /**
 29  
  * Refer to interface javadoc
 30  
  *
 31  
  * @Version 2.0
 32  
  * @Author Sri komandur@uw.edu
 33  
  */
 34  0
 @XmlAccessorType(XmlAccessType.FIELD)
 35  
 @XmlType(name = "CommentInfo", propOrder = {"id", "typeKey", "stateKey",
 36  
         "commentText", "referenceTypeKey", "referenceId", "effectiveDate",
 37  
         "expirationDate", "meta", "attributes", "_futureElements"})
 38  
 public class CommentInfo extends IdNamelessEntityInfo implements Comment, Serializable {
 39  
 
 40  
     private static final long serialVersionUID = 1L;
 41  
 
 42  
     @XmlElement
 43  
     private RichTextInfo commentText;
 44  
 
 45  
     @XmlElement
 46  
     private String referenceTypeKey;
 47  
 
 48  
     @XmlElement
 49  
     private String referenceId;
 50  
 
 51  
     @XmlElement
 52  
     private Date effectiveDate;
 53  
 
 54  
     @XmlElement
 55  
     private Date expirationDate;
 56  
 
 57  
     @XmlAnyElement
 58  
     private List<Element> _futureElements;
 59  
 
 60  0
     public CommentInfo() {
 61  0
     }
 62  
 
 63  
     public CommentInfo(Comment comment) {
 64  0
         super(comment);
 65  0
         if (null != comment) {
 66  0
             this.commentText = (null != comment.getCommentText()) ? new RichTextInfo(comment.getCommentText()) : null;
 67  0
             this.referenceTypeKey = comment.getReferenceTypeKey();
 68  0
             this.referenceId = comment.getReferenceId();
 69  0
             this.effectiveDate = (null != comment.getEffectiveDate()) ? new Date(comment.getEffectiveDate().getTime()) : null;
 70  0
             this.expirationDate = (null != comment.getExpirationDate()) ? new Date(comment.getExpirationDate().getTime()) : null;
 71  0
             this._futureElements = null;
 72  
         }
 73  0
     }
 74  
 
 75  
     @Override
 76  
     public RichTextInfo getCommentText() {
 77  0
         return commentText;
 78  
     }
 79  
 
 80  
     public void setCommentText(RichTextInfo commentText) {
 81  0
         this.commentText = commentText;
 82  0
     }
 83  
 
 84  
     @Override
 85  
     public String getReferenceTypeKey() {
 86  0
         return referenceTypeKey;
 87  
     }
 88  
 
 89  
     public void setReferenceTypeKey(String referenceTypeKey) {
 90  0
         this.referenceTypeKey = referenceTypeKey;
 91  0
     }
 92  
 
 93  
     @Override
 94  
     public String getReferenceId() {
 95  0
         return referenceId;
 96  
     }
 97  
 
 98  
     public void setReferenceId(String referenceId) {
 99  0
         this.referenceId = referenceId;
 100  0
     }
 101  
 
 102  
     @Override
 103  
     public Date getEffectiveDate() {
 104  0
         return effectiveDate;
 105  
     }
 106  
 
 107  
     public void setEffectiveDate(Date effectiveDate) {
 108  0
         this.effectiveDate = effectiveDate;
 109  0
     }
 110  
 
 111  
     @Override
 112  
     public Date getExpirationDate() {
 113  0
         return expirationDate;
 114  
     }
 115  
 
 116  
     public void setExpirationDate(Date expirationDate) {
 117  0
         this.expirationDate = expirationDate;
 118  0
     }
 119  
 
 120  
 }