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.naming;
16:
17: /**
18: * NamingStrategy implementation which does not alter the names.
19: *
20: * @author Rein Raudjärv
21: *
22: * @since 1.1
23: */
24: public class NopNamingStrategy implements NamingStrategy {
25: protected static final NamingStrategy INSTANCE = new NopNamingStrategy();
26:
27: public static NamingStrategy getInstance() {
28: return INSTANCE;
29: }
30:
31: protected NopNamingStrategy() {
32: }
33:
34: public String beanFieldToResultSetColumnName(String beanField) {
35: return beanField;
36: }
37:
38: public String fieldToColumnAlias(String variableName) {
39: return variableName;
40: }
41:
42: public String fieldToColumnName(String variableName) {
43: return variableName;
44: }
45: }
|