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;
16:
17: /**
18: * SQL Expression that can be evaluated into SQL <code>String</code> and SQL
19: * arguments <code>Object[]</code>. One SQL Expression can contain other SQL
20: * Expressions and return their SQL Strings and arguments as part of itselves.
21: * SQL Expressions are usually built from {@link org.araneaframework.backend.list.memorybased.Expression}s
22: * using an {@link org.araneaframework.backend.list.helper.builder.ExpressionToSqlExprBuilder}.
23: */
24: public interface SqlExpression {
25: /**
26: * Returns the SQL <code>String</code> of this <code>SqlExpression</code>.
27: * The returned String may not be <code>null</code>. An empty String
28: * should be used instead.
29: *
30: * @return the SQL <code>String</code> of this <code>SqlExpression</code>.
31: */
32: String toSqlString();
33:
34: /**
35: * Returns the SQL arguments of this <code>SqlExpression</code>. The
36: * returned values may not be <code>null</code>. An empty array should be
37: * used instead.
38: *
39: * @return the SQL arguments of this <code>SqlExpression</code>.
40: */
41: Object[] getValues();
42: }
|