01: /*
02: * Copyright 2005-2006 The Kuali Foundation.
03: *
04: *
05: * Licensed under the Educational Community License, Version 1.0 (the "License");
06: * you may not use this file except in compliance with the License.
07: * You may obtain a copy of the License at
08: *
09: * http://www.opensource.org/licenses/ecl1.php
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package edu.iu.uis.eden.web;
18:
19: import edu.iu.uis.eden.docsearch.SearchableAttributeValue;
20:
21: /**
22: * A simple bean for storing key/value pairs that can be used for a number of
23: * tasks. Right now it is used to hold information that will be display on a jsp
24: * for drop down boxes.
25: *
26: * @author rkirkend
27: */
28: public class KeyValueSort extends KeyValue {
29:
30: private static final long serialVersionUID = 3575440091286391804L;
31:
32: private Object sortValue;
33: private Class sortClass;
34: private SearchableAttributeValue searchableAttributeValue;
35:
36: public KeyValueSort() {
37: super ();
38: }
39:
40: public KeyValueSort(String key, String value) {
41: super (key, value);
42: }
43:
44: public KeyValueSort(String key, String value, Object sortValue,
45: SearchableAttributeValue searchableAttributeValue) {
46: super (key, value);
47: this .sortValue = sortValue;
48: this .searchableAttributeValue = searchableAttributeValue;
49: }
50:
51: public KeyValueSort(KeyValueSort kvs) {
52: this (kvs.getkey(), kvs.getValue(), kvs.getSortValue(), kvs
53: .getSearchableAttributeValue());
54: }
55:
56: public Object getSortValue() {
57: return sortValue;
58: }
59:
60: public void setSortValue(Object sortValue) {
61: this .sortValue = sortValue;
62: this .sortClass = sortValue.getClass();
63: }
64:
65: public Class getSortClass() {
66: return sortClass;
67: }
68:
69: public SearchableAttributeValue getSearchableAttributeValue() {
70: return searchableAttributeValue;
71: }
72:
73: }
|