01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: *
17: * $Header:$
18: */
19:
20: package org.apache.beehive.controls.system.jdbc;
21:
22: import org.apache.beehive.controls.api.context.ControlBeanContext;
23:
24: import java.lang.reflect.Method;
25: import java.sql.ResultSet;
26: import java.util.Calendar;
27:
28: /**
29: * Default ResultSetMapper implementation for ResultSets.
30: */
31: public class DefaultResultSetMapper extends ResultSetMapper {
32:
33: /**
34: * Maps a ResultSet to a ResultSet. The default implementation is a NOOP.
35: *
36: * @param context A ControlBeanContext instance.
37: * @param m Method assoicated with this call.
38: * @param resultSet Result set to map.
39: * @param cal A Calendar instance for resolving date/time values.
40: * @return An object.
41: */
42: public Object mapToResultType(ControlBeanContext context, Method m,
43: ResultSet resultSet, Calendar cal) {
44: return resultSet;
45: }
46:
47: /**
48: * Can the ResultSet which this mapper uses be closed by the database control?
49: * @return always false
50: */
51: public boolean canCloseResultSet() {
52: return false;
53: }
54: }
|