Coverage Report - org.kuali.student.r2.lum.lo.dto.LoRepositoryInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
LoRepositoryInfo
0%
0/17
0%
0/6
1.375
 
 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.lum.lo.dto;
 17  
 
 18  
 import org.kuali.student.r2.common.dto.KeyEntityInfo;
 19  
 import org.kuali.student.r2.lum.lo.infc.LoRepository;
 20  
 
 21  
 import javax.xml.bind.annotation.XmlAccessType;
 22  
 import javax.xml.bind.annotation.XmlAccessorType;
 23  
 import javax.xml.bind.annotation.XmlElement;
 24  
 import javax.xml.bind.annotation.XmlType;
 25  
 import java.io.Serializable;
 26  
 import java.util.Date;
 27  
 
 28  
 @XmlType(name = "LoInfo", propOrder = {"key", "typeKey", "stateKey", "name", "descr", "rootLoId", "effectiveDate", "expirationDate", "meta", "attributes", "_futureElements"})
 29  
 @XmlAccessorType(XmlAccessType.FIELD)
 30  
 public class LoRepositoryInfo extends KeyEntityInfo implements LoRepository, Serializable {
 31  
 
 32  
     private static final long serialVersionUID = 1L;
 33  
 
 34  
     @XmlElement
 35  
     private String rootLoId;
 36  
 
 37  
     @XmlElement
 38  
     private Date effectiveDate;
 39  
 
 40  
     @XmlElement
 41  
     private Date expirationDate;
 42  
 
 43  0
     public LoRepositoryInfo(){
 44  
 
 45  0
     }
 46  
 
 47  
     public LoRepositoryInfo(LoRepository loRepository){
 48  0
         super(loRepository);
 49  0
         if(loRepository != null){
 50  0
             this.rootLoId = loRepository.getRootLoId();
 51  0
             this.effectiveDate = (null == loRepository.getEffectiveDate()) ? null : new Date(loRepository.getEffectiveDate().getTime());
 52  0
             this.expirationDate = (null == loRepository.getExpirationDate()) ? null : new Date(loRepository.getExpirationDate().getTime());
 53  
         }
 54  0
     }
 55  
 
 56  
     @Override
 57  
     public String getRootLoId() {
 58  0
         return rootLoId;
 59  
     }
 60  
 
 61  
     public void setRootLoId(String rootLoId) {
 62  0
         this.rootLoId = rootLoId;
 63  0
     }
 64  
 
 65  
     @Override
 66  
     public Date getEffectiveDate() {
 67  0
         return effectiveDate;
 68  
     }
 69  
 
 70  
     public void setEffectiveDate(Date effectiveDate) {
 71  0
         this.effectiveDate = effectiveDate;
 72  0
     }
 73  
 
 74  
     @Override
 75  
     public Date getExpirationDate() {
 76  0
         return expirationDate;
 77  
     }
 78  
 
 79  
     public void setExpirationDate(Date expirationDate) {
 80  0
         this.expirationDate = expirationDate;
 81  0
     }
 82  
 
 83  
 }