Coverage Report - org.kuali.student.core.atp.dto.DateRangeInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
DateRangeInfo
0%
0/33
0%
0/2
1.05
 
 1  
 /**
 2  
  * Copyright 2010 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.core.atp.dto;
 17  
 
 18  
 import java.io.Serializable;
 19  
 import java.util.Date;
 20  
 import java.util.HashMap;
 21  
 import java.util.Map;
 22  
 
 23  
 import javax.xml.bind.annotation.XmlAccessType;
 24  
 import javax.xml.bind.annotation.XmlAccessorType;
 25  
 import javax.xml.bind.annotation.XmlAttribute;
 26  
 import javax.xml.bind.annotation.XmlElement;
 27  
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 28  
 
 29  
 import org.kuali.student.core.dto.HasAttributes;
 30  
 import org.kuali.student.core.dto.HasTypeState;
 31  
 import org.kuali.student.core.dto.Idable;
 32  
 import org.kuali.student.core.dto.MetaInfo;
 33  
 import org.kuali.student.core.dto.RichTextInfo;
 34  
 import org.kuali.student.core.ws.binding.JaxbAttributeMapListAdapter;
 35  
 
 36  
 /**
 37  
  * Information about a date range.
 38  
  */ 
 39  
 
 40  
 @XmlAccessorType(XmlAccessType.FIELD)
 41  0
 public class DateRangeInfo implements Serializable, Idable, HasTypeState, HasAttributes {
 42  
 
 43  
     private static final long serialVersionUID = 1L;
 44  
 
 45  
     @XmlElement
 46  
     private String name;
 47  
 
 48  
     @XmlElement
 49  
     private RichTextInfo desc;
 50  
 
 51  
     @XmlElement(name="atpKey")
 52  
     private String atpId;
 53  
 
 54  
     @XmlElement
 55  
     private Date startDate;
 56  
 
 57  
     @XmlElement
 58  
     private Date endDate;
 59  
 
 60  
     @XmlElement
 61  
     @XmlJavaTypeAdapter(JaxbAttributeMapListAdapter.class)
 62  
     private Map<String,String> attributes;
 63  
 
 64  
     @XmlElement
 65  
     private MetaInfo metaInfo;
 66  
 
 67  
     @XmlAttribute
 68  
     private String type;
 69  
 
 70  
     @XmlAttribute
 71  
     private String state;
 72  
 
 73  
     @XmlAttribute(name="key")
 74  
     private String id;
 75  
 
 76  
     /**
 77  
      * Friendly name of the date range.
 78  
      */
 79  
     public String getName() {
 80  0
         return name;
 81  
     }
 82  
 
 83  
     public void setName(String name) {
 84  0
         this.name = name;
 85  0
     }
 86  
 
 87  
     /**
 88  
      * Narrative description of the date range.
 89  
      */
 90  
     public RichTextInfo getDesc() {
 91  0
         return desc;
 92  
     }
 93  
 
 94  
     public void setDesc(RichTextInfo desc) {
 95  0
         this.desc = desc;
 96  0
     }
 97  
 
 98  
     /**
 99  
      * Unique identifier for an Academic Time Period (ATP).
 100  
      */
 101  
         public String getAtpId() {
 102  0
                 return atpId;
 103  
         }
 104  
 
 105  
         public void setAtpId(String atpId) {
 106  0
                 this.atpId = atpId;
 107  0
         }
 108  
 
 109  
     /**
 110  
      * Start date and time for the date range. This must be less than or equal to the end date of this range.
 111  
      */
 112  
     public Date getStartDate() {
 113  0
         return startDate;
 114  
     }
 115  
 
 116  
     public void setStartDate(Date startDate) {
 117  0
         this.startDate = startDate;
 118  0
     }
 119  
 
 120  
     /**
 121  
      * End date and time for the date range. This must be greater than or equal to the start date of this range.
 122  
      */
 123  
     public Date getEndDate() {
 124  0
         return endDate;
 125  
     }
 126  
 
 127  
     public void setEndDate(Date endDate) {
 128  0
         this.endDate = endDate;
 129  0
     }
 130  
 
 131  
     /**
 132  
      * List of key/value pairs, typically used for dynamic attributes.
 133  
      */
 134  
     public Map<String,String> getAttributes() {
 135  0
         if (attributes == null) {
 136  0
             attributes = new HashMap<String,String>();
 137  
         }
 138  0
         return attributes;
 139  
     }
 140  
 
 141  
     public void setAttributes(Map<String,String> attributes) {
 142  0
         this.attributes = attributes;
 143  0
     }
 144  
 
 145  
     /**
 146  
      * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations.
 147  
      */
 148  
     public MetaInfo getMetaInfo() {
 149  0
         return metaInfo;
 150  
     }
 151  
 
 152  
     public void setMetaInfo(MetaInfo metaInfo) {
 153  0
         this.metaInfo = metaInfo;
 154  0
     }
 155  
 
 156  
     /**
 157  
      * Unique identifier for a date range type.
 158  
      */
 159  
     public String getType() {
 160  0
         return type;
 161  
     }
 162  
 
 163  
     public void setType(String type) {
 164  0
         this.type = type;
 165  0
     }
 166  
 
 167  
     /**
 168  
      * The current status of the date range. The values for this field are constrained to those in the dateRangeState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value.
 169  
      */
 170  
     public String getState() {
 171  0
         return state;
 172  
     }
 173  
 
 174  
     public void setState(String state) {
 175  0
         this.state = state;
 176  0
     }
 177  
 
 178  
     /**
 179  
      * Unique identifier for a date range.
 180  
      */
 181  
     public String getId() {
 182  0
         return id;
 183  
     }
 184  
 
 185  
     public void setId(String id) {
 186  0
         this.id = id;
 187  0
     }
 188  
 
 189  
 }