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.fields;
16:
17: import java.sql.ResultSet;
18: import java.util.Collection;
19:
20: import org.araneaframework.backend.list.helper.ListSqlHelper;
21: import org.araneaframework.backend.list.helper.naming.MappingNamingStrategyAndFields;
22:
23: /**
24: * List of field names provider for SQL Helper.
25: * <p>
26: * These names correspond to bean fields (e.g. "name", "age", "address.town"].
27: * </p>
28: * <p>
29: * There are two lists of fields:
30: * <ul>
31: * <li>fields presented in <code>SELECT</code> - returned by {@link #getNames()}</li>
32: * <li>Fields read from the {@link ResultSet} - returned by {@link #getResultSetNames()}</li>
33: * </ul>
34: *
35: * @see ListSqlHelper#getFields()
36: * @see StandardFields
37: * @see MappingNamingStrategyAndFields
38: * @see ConcatFields
39: *
40: * @author Rein Raudjärv
41: *
42: * @since 1.1
43: */
44: public interface Fields {
45:
46: /**
47: * Return the list of fields used in <code>SELECT</code>.
48: *
49: * @return List<String> the names of the fields used in SELECT.
50: */
51: Collection getNames();
52:
53: /**
54: * Return the list of fields read from the {@link ResultSet}.
55: *
56: * @return List<String> the names of the fields read from the {@link ResultSet}.
57: */
58: Collection getResultSetNames();
59:
60: }
|