Coverage Report - org.kuali.student.core.search.dto.SearchParam
 
Classes in this File Line Coverage Branch Coverage Complexity
SearchParam
0%
0/14
0%
0/2
1.333
 
 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.search.dto;
 17  
 
 18  
 import java.io.Serializable;
 19  
 import java.util.List;
 20  
 
 21  
 import javax.xml.bind.annotation.XmlAccessType;
 22  
 import javax.xml.bind.annotation.XmlAccessorType;
 23  
 import javax.xml.bind.annotation.XmlAttribute;
 24  
 import javax.xml.bind.annotation.XmlElement;
 25  
 @XmlAccessorType(XmlAccessType.FIELD)
 26  0
 public class SearchParam implements Serializable {
 27  
         private static final long serialVersionUID = 1L;
 28  
         @XmlElement
 29  
         private String value;
 30  
         @XmlElement
 31  
         private List<String> listValue;
 32  
         @XmlAttribute
 33  
         private String key;
 34  
 
 35  
         public Object getValue() {
 36  0
                 if (value != null) {
 37  0
                         return value;
 38  
                 } else {
 39  0
                         return listValue;
 40  
                 }
 41  
         }
 42  
 
 43  
         public void setValue(String value) {
 44  0
                 this.value = value;
 45  0
                 listValue = null;
 46  0
         }
 47  
 
 48  
         public void setValue(List<String> listValue) {
 49  0
                 this.listValue = listValue;
 50  0
                 value = null;
 51  0
         }
 52  
 
 53  
         public String getKey() {
 54  0
                 return key;
 55  
         }
 56  
 
 57  
         public void setKey(String key) {
 58  0
                 this.key = key;
 59  0
         }
 60  
 
 61  
         @Override
 62  
         public String toString() {
 63  0
                 return "SearchParam[key=" + key + ", value=" + value + ", listValue="
 64  
                                 + listValue + "]";
 65  
         }
 66  
 }