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.JdbcTable;
14:
15: /**
16: * These generate JdbcKeyGenerator instances for persistent classes.
17: */
18: public interface JdbcKeyGeneratorFactory {
19:
20: /**
21: * Create a javabean to hold args for a createJdbcKeyGenerator call or null
22: * if the key generator does not accept any arguments.
23: */
24: public Object createArgsBean();
25:
26: /**
27: * Create a JdbcKeyGenerator for class using args as parameters. The
28: * instance returned may be new or may be a shared instance.
29: *
30: * @throws IllegalArgumentException if anything is invalid
31: */
32: public JdbcKeyGenerator createJdbcKeyGenerator(String className,
33: JdbcTable classTable, Object args)
34: throws IllegalArgumentException;
35:
36: }
|