01: /**
02: * Copyright 2006 Webmedia Group Ltd.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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: **/package org.araneaframework.uilib.list.structure;
16:
17: import java.io.Serializable;
18: import org.araneaframework.Environment;
19: import org.araneaframework.backend.list.memorybased.ComparatorExpression;
20: import org.araneaframework.uilib.list.OrderInfo;
21:
22: /**
23: * Static list ordering information that can be used along with
24: * <code>OrderInfo</code> to build <code>OrderExpression</code> (an
25: * <code>ComparatorExpression</code> that compares the values that two
26: * <code>VariableResolvers</code> provides).
27: *
28: * @see org.araneaframework.uilib.list.OrderInfo
29: *
30: * @author Rein Raudjärv
31: */
32: public interface ListOrder extends Serializable {
33:
34: void init(Environment env);
35:
36: void destroy();
37:
38: /**
39: * Builds <code>ComparatorExpression</code> from this
40: * <code>ListOrder</code> according to the <code>OrderInfo</code>.
41: *
42: * @param orderInfo
43: * Current ordered fields and their directions.
44: * @return <code>ComparatorExpression</code> that is built according to
45: * the <code>OrderInfo</code>.
46: */
47: ComparatorExpression buildComparatorExpression(OrderInfo orderInfo);
48: }
|