org.castor.ddlgen
Interface KeyGeneratorFactory
- Db2SequenceKeyGeneratorFactory, HighLowKeyGeneratorFactory, HsqlSequenceKeyGeneratorFactory, IdentityKeyGeneratorFactory, MaxKeyGeneratorFactory, OracleSequenceKeyGeneratorFactory, PostgresqlSequenceKeyGeneratorFactory, SapdbSequenceKeyGeneratorFactory, SequenceKeyGeneratorFactory, UUIDKeyGeneratorFactory
public interface KeyGeneratorFactory
Interface to be implemented by all key generator factories.
$Revision: 5951 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $
createKeyGenerator
public KeyGenerator createKeyGenerator()
throws GeneratorException
Create a default key generator instance with the algorithm the factory is
responsible for. This is only possible for those algorithms that do not require
mandatory parameters.
- A default key generator instance with the algorithm the factory is
responsible for.
GeneratorException
- If creation of default key generator is not possible
due to required mandatory parameters.
createKeyGenerator
public KeyGenerator createKeyGenerator(KeyGeneratorDef definition)
throws GeneratorException
Create a key generator instance from the given definition with the algorithm the
factory is responsible for.
definition
- The definition to initialize the key generator.
- A key generator instance initialized with given definition with the
algorithm the factory is responsible for.
getAlgorithmName
public String getAlgorithmName()
Get name of key generator algorithm.
- Name of key generator algorithm.
hasMandatoryParameters
public boolean hasMandatoryParameters()
Does the algorithm has mandatory parameters and therefore requires a key generator
definition in mapping file?
true
if algorithm has mandatory parameters and therefore
requires a key generator definition in mapping file. false
if algorithm does not require parameters or has only optional parameters.
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com