1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.student.ap.coursesearch.controller;
17
18 import org.kuali.rice.core.api.util.KeyValue;
19 import org.kuali.student.ap.coursesearch.FacetState;
20
21 import java.io.Serializable;
22
23
24
25
26 public class FacetStateImpl implements Serializable, FacetState {
27 private static final long serialVersionUID = 1719950239861974273L;
28
29 private final KeyValue value;
30 private boolean checked = true;
31 private int count;
32 private String description;
33
34 public FacetStateImpl(KeyValue value) {
35 this.value = value;
36 }
37
38 @Override
39 public KeyValue getValue() {
40 return value;
41 }
42
43 @Override
44 public boolean isChecked() {
45 return checked;
46 }
47
48 public void setChecked(boolean checked) {
49 this.checked = checked;
50 }
51
52 @Override
53 public int getCount() {
54 return count;
55 }
56
57 public void setCount(int count) {
58 this.count = count;
59 }
60
61
62
63
64 @Override
65 public void incrementCount() {
66 count++;
67 }
68
69 @Override
70 public void resetCount() {
71 count = 0;
72 }
73
74 @Override
75 public String getDescription() {
76 return description;
77 }
78
79 public void setDescription(String description) {
80 this.description = description;
81 }
82 }