Coverage Report - org.kuali.student.r2.common.dto.MetaInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
MetaInfo
0%
0/29
0%
0/6
1.214
 
 1  
 /*
 2  
  * Copyright 2010 The Kuali Foundation 
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 2.0 (the
 5  
  * "License"); you may not use this file except in compliance with the
 6  
  * License. You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.osedu.org/licenses/ECL-2.0
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 13  
  * implied. See the License for the specific language governing
 14  
  * permissions and limitations under the License.
 15  
  */
 16  
 
 17  
 package org.kuali.student.r2.common.dto;
 18  
 
 19  
 import java.io.Serializable;
 20  
 import java.util.Date;
 21  
 import java.util.List;
 22  
 
 23  
 import javax.xml.bind.annotation.XmlAccessType;
 24  
 import javax.xml.bind.annotation.XmlAccessorType;
 25  
 import javax.xml.bind.annotation.XmlAnyElement;
 26  
 import javax.xml.bind.annotation.XmlElement;
 27  
 import javax.xml.bind.annotation.XmlType;
 28  
 
 29  
 import org.kuali.student.r2.common.infc.Meta;
 30  
 import org.w3c.dom.Element;
 31  
 
 32  
 /**
 33  
  * Information about meta data for entities.
 34  
  *
 35  
  * @author tom
 36  
  */
 37  
 
 38  
 @XmlAccessorType(XmlAccessType.FIELD)
 39  
 @XmlType(name = "MetaInfo", propOrder = {
 40  
                 "versionInd", "createTime", "createId", 
 41  
                 "updateTime", "updateId", "_futureElements"})
 42  
 
 43  
 public class MetaInfo 
 44  
     implements Meta, Serializable {
 45  
 
 46  
     private static final long serialVersionUID = 1L;
 47  
 
 48  
     @XmlElement
 49  
     private String versionInd;
 50  
 
 51  
     @XmlElement
 52  
     private Date createTime;
 53  
 
 54  
     @XmlElement
 55  
     private String createId;
 56  
 
 57  
     @XmlElement
 58  
     private Date updateTime;
 59  
 
 60  
     @XmlElement
 61  
     private String updateId;
 62  
 
 63  
     @XmlAnyElement
 64  
     private List<Element> _futureElements;
 65  
 
 66  
 
 67  
     /**
 68  
      * Constructs a new MetaInfo.
 69  
      */
 70  0
     public MetaInfo() {
 71  0
     }
 72  
 
 73  
     /**
 74  
      * Constructs a new MetaInfo from another Meta.
 75  
      *
 76  
      * @param meta the Meta to copy
 77  
      */
 78  0
     public MetaInfo(Meta meta) {
 79  0
         if (meta != null) {
 80  
 
 81  0
             this.versionInd = meta.getVersionInd();
 82  
 
 83  0
             if (meta.getCreateTime() != null) {
 84  0
                 this.createTime = new Date(meta.getCreateTime().getTime());
 85  
             }
 86  
 
 87  0
             this.createId = meta.getCreateId();
 88  
 
 89  0
             if (meta.getUpdateTime() != null) {
 90  0
                 this.updateTime = new Date(meta.getUpdateTime().getTime());
 91  
             }
 92  
 
 93  0
             this.updateId = meta.getUpdateId();
 94  
         }
 95  0
     }
 96  
 
 97  
     @Override
 98  
     public String getVersionInd() {
 99  0
         return versionInd;
 100  
     }
 101  
 
 102  
     public void setVersionInd(String versionInd) {
 103  0
         this.versionInd = versionInd;
 104  0
     }
 105  
 
 106  
     @Override
 107  
     public Date getCreateTime() {
 108  0
         return createTime;
 109  
     }
 110  
 
 111  
     public void setCreateTime(Date createTime) {
 112  0
         this.createTime = createTime;
 113  0
     }
 114  
 
 115  
     @Override
 116  
     public String getCreateId() {
 117  0
         return createId;
 118  
     }
 119  
 
 120  
     public void setCreateId(String createId) {
 121  0
         this.createId = createId;
 122  0
     }
 123  
 
 124  
     @Override
 125  
     public Date getUpdateTime() {
 126  0
         return updateTime;
 127  
     }
 128  
 
 129  
     public void setUpdateTime(Date updateTime) {
 130  0
         this.updateTime = updateTime;
 131  0
     }
 132  
 
 133  
     @Override
 134  
     public String getUpdateId() {
 135  0
         return updateId;
 136  
     }
 137  
 
 138  
     public void setUpdateId(String updateId) {
 139  0
         this.updateId = updateId;
 140  0
     }
 141  
 
 142  
 
 143  
     // Compatibility methods
 144  
 
 145  
     @Deprecated
 146  
     public static MetaInfo newInstance() {
 147  0
         return new MetaInfo();
 148  
     }
 149  
     
 150  
     @Deprecated
 151  
     public static MetaInfo getInstance(Meta metaInfo) {
 152  0
         return new MetaInfo(metaInfo);
 153  
     }
 154  
 }