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.backend.list.helper.builder.compexpr;
16:
17: import org.araneaframework.backend.list.SqlExpression;
18: import org.araneaframework.backend.list.helper.builder.CompExprToSqlExprBuilder;
19: import org.araneaframework.backend.list.memorybased.ComparatorExpression;
20:
21: /**
22: * General interface for translating an <code>ComparatorExpression</code> into
23: * <code>SqlExpression</code>. It is generally used to translate only a
24: * specific type of <code>ComparatorExpression</code>. Use (@see
25: * org.araneaframework.uilib.widgets.lists.refactor.backend.builder.CompExprToSqlExprBuilder)
26: * to translate the whole hierarchy.
27: */
28: public interface CompExprToSqlExprTranslator {
29: /**
30: * Translates an <code>ComparatorExpression</code> into
31: * <code>SqlExpression</code>.
32: *
33: * @param expr
34: * an <code>ComparatorExpression</code>.
35: * @param builder
36: * <code>CompExprToSqlExprBuilder</code> that is used to
37: * translate the children of the
38: * <code>ComparatorExpression</code>.
39: * @return the <code>SqlExpression</code> that represents the former
40: * <code>ComparatorExpression</code>.
41: */
42: SqlExpression translate(ComparatorExpression expr,
43: CompExprToSqlExprBuilder builder);
44: }
|