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