org.exolab.castor.persist.spi

Interface KeyGeneratorFactory

public interface KeyGeneratorFactory

Interface for a key generator factory. The key generator factory is used for producing key generators for concrete databases with given parameters

Version: $Revision: 1.1.1.1 $ $Date: 2003/03/03 07:08:51 $

Author: Oleg Nitz

Method Summary
KeyGeneratorgetKeyGenerator(PersistenceFactory factory, Properties params, int sqlType)
Produce the key generator.
StringgetName()
Get the short name of the key generator.

Method Detail

getKeyGenerator

public KeyGenerator getKeyGenerator(PersistenceFactory factory, Properties params, int sqlType)
Produce the key generator.

Parameters: factory Helper object for obtaining database-specific QuerySyntax. params Parameters for key generator. sqlType The SQL type of the primary key, the generated identities must have the corresponding Java type, e.g. java.sql.Types.INTEGER corresponds to java.lang.Integer, java.sql.Types.NUMERIC corresponds to java.lang.BigDecimal.

getName

public String getName()
Get the short name of the key generator. It is used to reference key generators in a mapping configuration file. If several key generators of the same type are used for the same database, then they are referenced by aliases.
Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com