01: /*
02: * Copyright (c) 1998 - 2005 Versant Corporation
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * Versant Corporation - initial API and implementation
10: */
11: package com.versant.core.jdbc;
12:
13: import com.versant.core.jdbc.metadata.JdbcColumn;
14:
15: /**
16: * This is a factory for JdbcConverters.
17: * @see JdbcConverter
18: * @keep-all
19: */
20: public interface JdbcConverterFactory {
21:
22: /**
23: * Create a javabean to hold args for a createJdbcConverter call or null
24: * if the converter does not accept any arguments.
25: */
26: public Object createArgsBean();
27:
28: /**
29: * Create a converter for col using args as parameters. Return null if
30: * no converter is required.
31: * @param col The column the converter is for
32: * @param args The args bean or null if none
33: * @param jdbcTypeRegistry The JDBC type registry for looking up factories
34: * for JDBC types (for nested converters)
35: * @exception IllegalArgumentException if any params are invalid
36: */
37: public JdbcConverter createJdbcConverter(JdbcColumn col,
38: Object args, JdbcTypeRegistry jdbcTypeRegistry)
39: throws IllegalArgumentException;
40:
41: }
|