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