01: /**
02: * Sequoia: Database clustering technology.
03: * Copyright (C) 2007 Continuent, Inc.
04: * Contact: sequoia@continuent.org
05: *
06: * Licensed under the Apache License, Version 2.0 (the "License");
07: * you may not use this file except in compliance with the License.
08: * You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: *
18: * Initial developer(s): Emmanuel Cecchet.
19: * Contributor(s): ______________________.
20: */package org.continuent.sequoia.controller.backend;
21:
22: import java.sql.SQLException;
23:
24: import org.continuent.sequoia.common.protocol.Field;
25: import org.continuent.sequoia.controller.cache.metadata.MetadataCache;
26:
27: /**
28: * This class defines a ResultSetMetaDataFactory to copy database specific
29: * metadata into Sequoia metadata.
30: *
31: * @author <a href="mailto:emmanuel.cecchet@continuent.com">Emmanuel Cecchet</a>
32: * @version 1.0
33: */
34: public interface ResultSetMetaDataFactory {
35:
36: /**
37: * Creates a new <code>Field[]</code> object
38: *
39: * @param metaData Generate a Sequoia Field[] from a generic ResultSetMetadata
40: * @param metadataCache Optional metadata cache (null if none)
41: * @return a Sequoia Field[] containing the ResultSetMedaData
42: * @throws SQLException if the metadata is null
43: */
44: Field[] copyResultSetMetaData(java.sql.ResultSetMetaData metaData,
45: MetadataCache metadataCache) throws SQLException;
46:
47: }
|