Coverage Report - org.kuali.rice.kew.api.document.attribute.DocumentAttributeDateTime
 
Classes in this File Line Coverage Branch Coverage Complexity
DocumentAttributeDateTime
0%
0/10
N/A
1
DocumentAttributeDateTime$Constants
0%
0/1
N/A
1
DocumentAttributeDateTime$Elements
0%
0/1
N/A
1
 
 1  
 package org.kuali.rice.kew.api.document.attribute;
 2  
 
 3  
 /**
 4  
  * TODO...
 5  
  */
 6  
 
 7  
 import org.joda.time.DateTime;
 8  
 
 9  
 import javax.xml.bind.annotation.XmlAccessType;
 10  
 import javax.xml.bind.annotation.XmlAccessorType;
 11  
 import javax.xml.bind.annotation.XmlElement;
 12  
 import javax.xml.bind.annotation.XmlRootElement;
 13  
 import javax.xml.bind.annotation.XmlType;
 14  
 
 15  0
 @XmlRootElement(name = DocumentAttributeDateTime.Constants.ROOT_ELEMENT_NAME)
 16  
 @XmlAccessorType(XmlAccessType.NONE)
 17  
 @XmlType(name = DocumentAttributeDateTime.Constants.TYPE_NAME, propOrder = {
 18  
     DocumentAttributeDateTime.Elements.VALUE
 19  
 })
 20  
 public final class DocumentAttributeDateTime extends DocumentAttribute<DateTime> {
 21  
 
 22  
     @XmlElement(name = Elements.VALUE, required = false)
 23  
     private final DateTime value;
 24  
 
 25  
     /**
 26  
      * Private constructor used only by JAXB.
 27  
      */
 28  0
     private DocumentAttributeDateTime() {
 29  0
         this.value = null;
 30  0
     }
 31  
 
 32  
     public DocumentAttributeDateTime(String name, DateTime value) {
 33  0
         super(name);
 34  0
         this.value = value;
 35  0
     }
 36  
 
 37  
     public static DocumentAttributeDateTime create(String name, DateTime value) {
 38  0
         return new DocumentAttributeDateTime(name, value);
 39  
     }
 40  
 
 41  
     @Override
 42  
     public DateTime getValue() {
 43  0
         return value;
 44  
     }
 45  
 
 46  
     @Override
 47  
     public DocumentAttributeDataType getDataType() {
 48  0
         return DocumentAttributeDataType.DATE_TIME;
 49  
     }
 50  
 
 51  
     /**
 52  
      * Defines some internal constants used on this class.
 53  
      */
 54  0
     static class Constants {
 55  
         final static String ROOT_ELEMENT_NAME = "documentAttributeDateTime";
 56  
         final static String TYPE_NAME = "DocumentAttributeDateTimeType";
 57  
     }
 58  
 
 59  
     /**
 60  
      * A private class which exposes constants which define the XML element names to use when this object is marshalled to XML.
 61  
      */
 62  0
     static class Elements {
 63  
         final static String VALUE = "value";
 64  
     }
 65  
 
 66  
 }