|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.castor.ddlgen.keygenerator.SequenceKeyGeneratorFactory
Abstract base class for SEQUENCE key generator factories.
| Constructor Summary | |
SequenceKeyGeneratorFactory()
|
|
| Method Summary | |
KeyGenerator |
createKeyGenerator()
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. |
KeyGenerator |
createKeyGenerator(KeyGeneratorDef definition)
Create a key generator instance from the given definition with the algorithm the factory is responsible for. |
java.lang.String |
getAlgorithmName()
Get name of key generator algorithm. |
boolean |
hasMandatoryParameters()
Does the algorithm has mandatory parameters and therefore requires a key generator definition in mapping file? |
abstract java.lang.String |
toCreateDDL(KeyGenerator key)
Generate create script for given SEQUENCE key generator. |
abstract java.lang.String |
toDropDDL(KeyGenerator key)
Generate drop script for given SEQUENCE key generator. |
protected java.lang.String |
toPrimaryKeyList(Table table)
Build a string containing names of all primary key columns separated by '_'. |
protected java.lang.String |
toPrimaryKeyTypeList(Table table)
Build a string containing types of all primary key columns separated by '_'. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SequenceKeyGeneratorFactory()
| Method Detail |
public final java.lang.String getAlgorithmName()
getAlgorithmName in interface KeyGeneratorFactorypublic final boolean hasMandatoryParameters()
hasMandatoryParameters in interface KeyGeneratorFactorytrue 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.
public final KeyGenerator createKeyGenerator()
throws GeneratorException
createKeyGenerator in interface KeyGeneratorFactoryGeneratorException - If creation of default key generator is not possible
due to required mandatory parameters.
public final KeyGenerator createKeyGenerator(KeyGeneratorDef definition)
throws GeneratorException
createKeyGenerator in interface KeyGeneratorFactorydefinition - The definition to initialize the key generator.
GeneratorException - If failed to create a key generator instance.public abstract java.lang.String toCreateDDL(KeyGenerator key)
key - SEQUENCE key generator to generate DDL for.
public abstract java.lang.String toDropDDL(KeyGenerator key)
key - SEQUENCE key generator to generate DDL for.
protected final java.lang.String toPrimaryKeyList(Table table)
table - Table build primary key column names string for.
protected final java.lang.String toPrimaryKeyTypeList(Table table)
table - Table build primary key column types string for.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||