Coverage Report - org.kuali.student.r2.lum.clu.dto.MembershipQueryInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
MembershipQueryInfo
0%
0/21
0%
0/6
1.375
 
 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.r2.lum.clu.dto;
 17  
 
 18  
 
 19  
 import org.kuali.student.r2.lum.clu.infc.MembershipQuery;
 20  
 
 21  
 import javax.xml.bind.Element;
 22  
 import javax.xml.bind.annotation.XmlAccessType;
 23  
 import javax.xml.bind.annotation.XmlAccessorType;
 24  
 import javax.xml.bind.annotation.XmlAnyElement;
 25  
 import javax.xml.bind.annotation.XmlAttribute;
 26  
 import javax.xml.bind.annotation.XmlElement;
 27  
 import javax.xml.bind.annotation.XmlType;
 28  
 import java.io.Serializable;
 29  
 import java.util.ArrayList;
 30  
 import java.util.List;
 31  
 import org.kuali.student.r2.core.search.dto.SearchParamInfo;
 32  
 import org.kuali.student.r2.core.search.infc.SearchParam;
 33  
 
 34  
 @XmlAccessorType(XmlAccessType.FIELD)
 35  
 @XmlType(name = "MembershipQueryInfo", propOrder = {"id", "searchTypeKey", "queryParamValues", "_futureElements"})
 36  
 public class MembershipQueryInfo implements Serializable, MembershipQuery {
 37  
 
 38  
     private static final long serialVersionUID = 1L;
 39  
 
 40  
     @XmlAttribute
 41  
     private String id;
 42  
 
 43  
     @XmlElement
 44  
     private String searchTypeKey;
 45  
 
 46  
     @XmlElement
 47  
     private List<SearchParamInfo> queryParamValues;
 48  
 
 49  
     @XmlAnyElement
 50  
     private List<Element> _futureElements;
 51  
 
 52  0
     public MembershipQueryInfo() {
 53  
 
 54  0
     }
 55  
 
 56  0
     public MembershipQueryInfo(MembershipQuery membershipQuery) {
 57  0
         if (null != membershipQuery) {
 58  0
             this.id = membershipQuery.getId();
 59  0
             this.searchTypeKey = membershipQuery.getSearchTypeKey();
 60  0
             this.queryParamValues = new ArrayList<SearchParamInfo>();
 61  0
             for (SearchParam searchParam : membershipQuery.getQueryParamValues()) {
 62  0
                 this.queryParamValues.add(new SearchParamInfo(searchParam));
 63  
             }
 64  
         }
 65  0
     }
 66  
 
 67  
     @Override
 68  
     public String getId() {
 69  0
         return id;
 70  
     }
 71  
 
 72  
     public void setId(String id) {
 73  0
         this.id = id;
 74  0
     }
 75  
 
 76  
     @Override
 77  
     public String getSearchTypeKey() {
 78  0
         return searchTypeKey;
 79  
     }
 80  
 
 81  
     public void setSearchTypeKey(String searchTypeKey) {
 82  0
         this.searchTypeKey = searchTypeKey;
 83  0
     }
 84  
 
 85  
     @Override
 86  
     public List<SearchParamInfo> getQueryParamValues() {
 87  0
         if (queryParamValues == null) {
 88  0
             queryParamValues = new ArrayList<SearchParamInfo>(0);
 89  
         }
 90  0
         return queryParamValues;
 91  
     }
 92  
 
 93  
     public void setQueryParamValues(List<SearchParamInfo> queryParamValues) {
 94  0
         this.queryParamValues = queryParamValues;
 95  0
     }
 96  
 }