KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > beehive > netui > databinding > datagrid > api > filter > FilterOperation


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  * $Header:$
17  */

18 package org.apache.beehive.netui.databinding.datagrid.api.filter;
19
20 /**
21  * <p>
22  * A filter operation is an abstract representation of an operation that can be performed when filtering a data set.
23  * The operations that can be performed are not provided here; rather subclasses and external utilities can create
24  * FilterOperation instances that map to concrete operations for query languages like XQuery or SQL. The
25  * process for performing this mapping is left to filtering utilities.
26  * </p>
27  */

28 public class FilterOperation
29     implements java.io.Serializable JavaDoc {
30
31     private int _id;
32     private String JavaDoc _abbreviation;
33     private String JavaDoc _resourceKey;
34     private FilterOperationHint _operationHint;
35
36     /**
37      * Construct a FilterOperation given a set of metadata about the filter.
38      * @param id the operation identifier
39      * @param abbreviation the abbreviation for the filter
40      * @param resourceKey a resource key used to lookup a readable String for a filter operation
41      * @param operationHint a hint for the operation that classifies the operation into a language independent
42      * operation category.
43      */

44     public FilterOperation(int id, String JavaDoc abbreviation, String JavaDoc resourceKey, FilterOperationHint operationHint) {
45         _id = id;
46         _abbreviation = abbreviation;
47         _operationHint = operationHint;
48         _resourceKey = resourceKey;
49     }
50
51     /**
52      * Get the filter operation's id.
53      * @return the id
54      */

55     public int getId() {
56         return _id;
57     }
58
59     /**
60      * Get the filter operation's abbreviation
61      * @return the abbreviation
62      */

63     public String JavaDoc getAbbreviation() {
64         return _abbreviation;
65     }
66
67     /**
68      * Get the filter operation's resource key. Discoverying the readable text for an operation is left
69      * to the client or other filtering utilities.
70      * @return the resource key
71      */

72     public String JavaDoc getResourceKey() {
73         return _resourceKey;
74     }
75
76     /**
77      * Get the filter operation's {@link FilterOperationHint}.
78      * @return the operation hint
79      */

80     public FilterOperationHint getOperationHint() {
81         return _operationHint;
82     }
83 }
84
Popular Tags