KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > jdbc > sql > conv > NoArgJdbcConverterFactory


1
2 /*
3  * Copyright (c) 1998 - 2005 Versant Corporation
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  * Versant Corporation - initial API and implementation
11  */

12 package com.versant.core.jdbc.sql.conv;
13
14 import com.versant.core.jdbc.JdbcConverterFactory;
15 import com.versant.core.jdbc.JdbcConverter;
16 import com.versant.core.jdbc.JdbcTypeRegistry;
17 import com.versant.core.jdbc.metadata.JdbcColumn;
18
19 /**
20  * Base class for JdbcConverterFactory's that do not use an args bean.
21  */

22 public abstract class NoArgJdbcConverterFactory implements JdbcConverterFactory {
23
24     /**
25      * Create a javabean to hold args for a createJdbcConverter call or null
26      * if the converter does not accept any arguments.
27      */

28     public Object JavaDoc createArgsBean() {
29         return null; //To change body of implemented methods use Options | File Templates.
30
}
31
32     /**
33      * Create a converter for col using args as parameters. Return null if
34      * no converter is required.
35      * @param col The column the converter is for
36      * @param args The args bean or null if none
37      * @param jdbcTypeRegistry The JDBC type registry for looking up factories
38      * for JDBC types (for nested converters)
39      * @exception IllegalArgumentException if any params are invalid
40      */

41     public abstract JdbcConverter createJdbcConverter(JdbcColumn col,
42             Object JavaDoc args, JdbcTypeRegistry jdbcTypeRegistry)
43             throws IllegalArgumentException JavaDoc;
44
45 }
46
47
Popular Tags