| 1 |  |  | 
            
  
    | 2 |  |  | 
            
  
    | 3 |  |  | 
            
  
    | 4 |  |  | 
            
  
    | 5 |  |  | 
            
  
    | 6 |  |  | 
            
  
    | 7 |  |  | 
            
  
    | 8 |  |  | 
            
  
    | 9 |  |  | 
            
  
    | 10 |  |  | 
            
  
    | 11 |  |  | 
            
  
    | 12 |  |  | 
            
  
    | 13 |  |  | 
            
  
    | 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) | 
               
        |  |  | 
           
           |  | 16.7% | Uncovered Elements: 90 (108) | Complexity: 41 | Complexity Density: 0.91 |  | 
  
  
    | 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 |  |  | 
               
        |  |  | 
           
           |  | 100% | Uncovered Elements: 0 (1) | Complexity: 1 | Complexity Density: 1 |  | 
  
  
    | 36 | 13 |  public String getSearchKey() {... | 
            
  
    | 37 | 13 | return searchKey; | 
            
  
    | 38 |  | } | 
               
        |  |  | 
           
           |  | 100% | Uncovered Elements: 0 (1) | Complexity: 1 | Complexity Density: 1 |  | 
  
  
    | 39 | 5 |  public void setSearchKey(String searchKey) {... | 
            
  
    | 40 | 5 | this.searchKey = searchKey; | 
            
  
    | 41 |  | } | 
               
        |  |  | 
           
           |  | 0% | Uncovered Elements: 5 (5) | Complexity: 2 | Complexity Density: 0.67 |  | 
  
  
    | 42 | 0 |  public List<SearchParam> getParams() {... | 
            
  
    | 43 | 0 | if(params == null){ | 
            
  
    | 44 | 0 | params = new ArrayList<SearchParam>(); | 
            
  
    | 45 |  | } | 
            
  
    | 46 | 0 | return params; | 
            
  
    | 47 |  | } | 
               
        |  |  | 
           
           |  | 100% | Uncovered Elements: 0 (1) | Complexity: 1 | Complexity Density: 1 |  | 
  
  
    | 48 | 4 |  public void setParams(List<SearchParam> params) {... | 
            
  
    | 49 | 4 | this.params = params; | 
            
  
    | 50 |  | } | 
               
        |  |  | 
           
           |  | 100% | Uncovered Elements: 0 (1) | Complexity: 1 | Complexity Density: 1 |  | 
  
  
    | 51 | 1 |  public String getSortColumn() {... | 
            
  
    | 52 | 1 | return sortColumn; | 
            
  
    | 53 |  | } | 
               
        |  |  | 
           
           |  | 0% | Uncovered Elements: 1 (1) | Complexity: 1 | Complexity Density: 1 |  | 
  
  
    | 54 | 0 |  public void setSortColumn(String sortColumn) {... | 
            
  
    | 55 | 0 | this.sortColumn = sortColumn; | 
            
  
    | 56 |  | } | 
               
        |  |  | 
           
           |  | 100% | Uncovered Elements: 0 (1) | Complexity: 1 | Complexity Density: 1 |  | 
  
  
    | 57 | 1 |  public SortDirection getSortDirection() {... | 
            
  
    | 58 | 1 | return sortDirection; | 
            
  
    | 59 |  | } | 
               
        |  |  | 
           
           |  | 0% | Uncovered Elements: 1 (1) | Complexity: 1 | Complexity Density: 1 |  | 
  
  
    | 60 | 0 |  public void setSortDirection(SortDirection sortDirection) {... | 
            
  
    | 61 | 0 | this.sortDirection = sortDirection; | 
            
  
    | 62 |  | } | 
               
        |  |  | 
           
           |  | 0% | Uncovered Elements: 1 (1) | Complexity: 1 | Complexity Density: 1 |  | 
  
  
    | 63 | 0 |  public Integer getStartAt() {... | 
            
  
    | 64 | 0 | return startAt; | 
            
  
    | 65 |  | } | 
               
        |  |  | 
           
           |  | 100% | Uncovered Elements: 0 (1) | Complexity: 1 | Complexity Density: 1 |  | 
  
  
    | 66 | 2 |  public void setStartAt(Integer startAt) {... | 
            
  
    | 67 | 2 | this.startAt = startAt; | 
            
  
    | 68 |  | } | 
               
        |  |  | 
           
           |  | 100% | Uncovered Elements: 0 (1) | Complexity: 1 | Complexity Density: 1 |  | 
  
  
    | 69 | 1 |  public Integer getMaxResults() {... | 
            
  
    | 70 | 1 | return maxResults; | 
            
  
    | 71 |  | } | 
               
        |  |  | 
           
           |  | 100% | Uncovered Elements: 0 (1) | Complexity: 1 | Complexity Density: 1 |  | 
  
  
    | 72 | 2 |  public void setMaxResults(Integer maxResults) {... | 
            
  
    | 73 | 2 | this.maxResults = maxResults; | 
            
  
    | 74 |  | } | 
               
        |  |  | 
           
           |  | 0% | Uncovered Elements: 1 (1) | Complexity: 1 | Complexity Density: 1 |  | 
  
  
    | 75 | 0 |  public Boolean getNeededTotalResults() {... | 
            
  
    | 76 | 0 | return neededTotalResults; | 
            
  
    | 77 |  | } | 
               
        |  |  | 
           
           |  | 100% | Uncovered Elements: 0 (1) | Complexity: 1 | Complexity Density: 1 |  | 
  
  
    | 78 | 2 |  public void setNeededTotalResults(Boolean neededTotalResults) {... | 
            
  
    | 79 | 2 | this.neededTotalResults = neededTotalResults; | 
            
  
    | 80 |  | } | 
               
        |  |  | 
           
           |  | 0% | Uncovered Elements: 1 (1) | Complexity: 1 | Complexity Density: 1 |  | 
  
  
    | 81 | 0 |  @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 |  |  | 
               
        |  |  | 
           
           |  | 0% | Uncovered Elements: 50 (50) | Complexity: 17 | Complexity Density: 0.85 |  | 
  
  
    | 90 | 0 |  @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 |  |  | 
               
        |  |  | 
           
           |  | 0% | Uncovered Elements: 22 (22) | Complexity: 8 | Complexity Density: 1 |  | 
  
  
    | 109 | 0 |  @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 |  | } |