Clover Coverage Report - Kuali Student 1.2-SNAPSHOT (Aggregated)
Coverage timestamp: Thu Mar 3 2011 04:02:59 EST
../../../../../../img/srcFileCovDistChart2.png 50% of files have more coverage
45   120   41   2.65
46   96   0.91   17
17     2.41  
1    
 
  SearchRequest       Line # 26 45 0% 41 90 16.7% 0.16666667
 
  (2)
 
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.common.search.dto;
17   
18    import java.io.Serializable;
19    import java.util.ArrayList;
20    import java.util.List;
21   
22    import javax.xml.bind.annotation.XmlAccessType;
23    import javax.xml.bind.annotation.XmlAccessorType;
24   
25    @XmlAccessorType(XmlAccessType.FIELD)
 
26    public class SearchRequest implements Serializable {
27    private static final long serialVersionUID = 1L;
28    private String searchKey;
29    private List<SearchParam> params;
30    private String sortColumn;
31    private SortDirection sortDirection;
32    private Integer startAt;
33    private Integer maxResults;
34    private Boolean neededTotalResults;
35   
 
36  13 toggle public String getSearchKey() {
37  13 return searchKey;
38    }
 
39  5 toggle public void setSearchKey(String searchKey) {
40  5 this.searchKey = searchKey;
41    }
 
42  0 toggle public List<SearchParam> getParams() {
43  0 if(params == null){
44  0 params = new ArrayList<SearchParam>();
45    }
46  0 return params;
47    }
 
48  4 toggle public void setParams(List<SearchParam> params) {
49  4 this.params = params;
50    }
 
51  1 toggle public String getSortColumn() {
52  1 return sortColumn;
53    }
 
54  0 toggle public void setSortColumn(String sortColumn) {
55  0 this.sortColumn = sortColumn;
56    }
 
57  1 toggle public SortDirection getSortDirection() {
58  1 return sortDirection;
59    }
 
60  0 toggle public void setSortDirection(SortDirection sortDirection) {
61  0 this.sortDirection = sortDirection;
62    }
 
63  0 toggle public Integer getStartAt() {
64  0 return startAt;
65    }
 
66  2 toggle public void setStartAt(Integer startAt) {
67  2 this.startAt = startAt;
68    }
 
69  1 toggle public Integer getMaxResults() {
70  1 return maxResults;
71    }
 
72  2 toggle public void setMaxResults(Integer maxResults) {
73  2 this.maxResults = maxResults;
74    }
 
75  0 toggle public Boolean getNeededTotalResults() {
76  0 return neededTotalResults;
77    }
 
78  2 toggle public void setNeededTotalResults(Boolean neededTotalResults) {
79  2 this.neededTotalResults = neededTotalResults;
80    }
 
81  0 toggle @Override
82    public String toString() {
83  0 return "SearchRequest [searchKey=" + searchKey + ", params=" + params
84    + ", sortColumn=" + sortColumn + ", sortDirection="
85    + sortDirection + ", startAt=" + startAt + ", maxResults="
86    + maxResults + ", neededTotalResults=" + neededTotalResults
87    + "]";
88    }
89   
 
90  0 toggle @Override
91    public boolean equals(Object o) {
92  0 if (this == o) return true;
93  0 if (o == null || getClass() != o.getClass()) return false;
94   
95  0 SearchRequest that = (SearchRequest) o;
96   
97  0 if (maxResults != null ? !maxResults.equals(that.maxResults) : that.maxResults != null) return false;
98  0 if (neededTotalResults != null ? !neededTotalResults.equals(that.neededTotalResults) : that.neededTotalResults != null)
99  0 return false;
100  0 if (params != null ? !params.equals(that.params) : that.params != null) return false;
101  0 if (searchKey != null ? !searchKey.equals(that.searchKey) : that.searchKey != null) return false;
102  0 if (sortColumn != null ? !sortColumn.equals(that.sortColumn) : that.sortColumn != null) return false;
103  0 if (sortDirection != that.sortDirection) return false;
104  0 if (startAt != null ? !startAt.equals(that.startAt) : that.startAt != null) return false;
105   
106  0 return true;
107    }
108   
 
109  0 toggle @Override
110    public int hashCode() {
111  0 int result = searchKey != null ? searchKey.hashCode() : 0;
112  0 result = 31 * result + (params != null ? params.hashCode() : 0);
113  0 result = 31 * result + (sortColumn != null ? sortColumn.hashCode() : 0);
114  0 result = 31 * result + (sortDirection != null ? sortDirection.hashCode() : 0);
115  0 result = 31 * result + (startAt != null ? startAt.hashCode() : 0);
116  0 result = 31 * result + (maxResults != null ? maxResults.hashCode() : 0);
117  0 result = 31 * result + (neededTotalResults != null ? neededTotalResults.hashCode() : 0);
118  0 return result;
119    }
120    }