Coverage Report - org.kuali.student.r2.common.dto.ComparisonInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
ComparisonInfo
0%
0/21
0%
0/2
1.1
 
 1  
 /*
 2  
  * Copyright 2009 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 1.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.opensource.org/licenses/ecl1.php
 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.ArrayList;
 21  
 import java.util.Collections;
 22  
 import java.util.List;
 23  
 
 24  
 import javax.xml.bind.annotation.XmlAccessType;
 25  
 import javax.xml.bind.annotation.XmlAccessorType;
 26  
 import javax.xml.bind.annotation.XmlAnyElement;
 27  
 import javax.xml.bind.annotation.XmlElement;
 28  
 import javax.xml.bind.annotation.XmlElementWrapper;
 29  
 import javax.xml.bind.annotation.XmlType;
 30  
 
 31  
 import org.kuali.student.r2.common.infc.Comparison;
 32  
 import org.w3c.dom.Element;
 33  
 
 34  
 @XmlAccessorType(XmlAccessType.FIELD)
 35  
 @XmlType(name = "ComparisonInfo", propOrder = {
 36  
                 "fieldKey", "operator", "values", "isIgnoreCase", 
 37  
                 "_futureElements"})    
 38  
 
 39  
 public class ComparisonInfo 
 40  
     implements Comparison, Serializable {
 41  
 
 42  
     private static final long serialVersionUID = 1L;
 43  
 
 44  
     @XmlElement
 45  
     private String fieldKey;
 46  
     
 47  
     @XmlElement
 48  
     private String operator;
 49  
     
 50  
     @XmlElement
 51  
     private List<String> values;
 52  
     
 53  
     @XmlElement
 54  
     private boolean isIgnoreCase;
 55  
 
 56  
     @XmlAnyElement
 57  
     private List<Element> _futureElements;
 58  
 
 59  
 
 60  
     /**
 61  
      * Constructs a new ComparisonInfo.
 62  
      */
 63  0
     public ComparisonInfo() {
 64  0
     }
 65  
 
 66  
     /**
 67  
      * Constructs a new ComparisonInfo from another Comparison.
 68  
      *
 69  
      * @param comparison the comparison to copy
 70  
      */
 71  0
     public ComparisonInfo(Comparison comparison) {
 72  0
         this.fieldKey = comparison.getFieldKey();
 73  0
         this.operator = comparison.getOperator();
 74  
 
 75  0
         if (comparison.getValues() != null) {
 76  0
             this.values = Collections.unmodifiableList(comparison.getValues());
 77  
         }
 78  
 
 79  0
         this.isIgnoreCase = comparison.getIsIgnoreCase();
 80  0
     }
 81  
 
 82  
     @Override
 83  
     public String getFieldKey() {
 84  0
         return fieldKey;
 85  
     }
 86  
 
 87  
     public void setFieldKey(String fieldKey) {
 88  0
         this.fieldKey = fieldKey;
 89  0
     }
 90  
 
 91  
     @Override
 92  
     public String getOperator() {
 93  0
         return operator;
 94  
     }
 95  
 
 96  
     public void setOperator(String operator) {
 97  0
         this.operator = operator;
 98  0
     }
 99  
 
 100  
     @Override
 101  
     public List<String> getValues() {
 102  0
         return values;
 103  
     }
 104  
 
 105  
     public void setValues(List<String> values) {
 106  0
         this.values = new ArrayList<String>(values);
 107  0
     }
 108  
 
 109  
     @Override
 110  
     public Boolean getIsIgnoreCase() {
 111  0
         return this.isIgnoreCase;
 112  
     }
 113  
 
 114  
     public void setIgnoreCase(Boolean ignoreCase) {
 115  0
         this.isIgnoreCase = ignoreCase;
 116  0
     }
 117  
 }