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