Package org.castor.ddlgen.schemaobject
Class KeyGenerator
java.lang.Object
org.castor.ddlgen.schemaobject.AbstractSchemaObject
org.castor.ddlgen.schemaobject.KeyGenerator
- All Implemented Interfaces:
SchemaObject
- Direct Known Subclasses:
HighLowKeyGenerator,IdentityKeyGenerator,MaxKeyGenerator,SequenceKeyGenerator,UUIDKeyGenerator
Abstract base class for all key generators.
- Since:
- 1.1
- Version:
- $Revision: 5951 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $
- Author:
- Le Duc Bao, Ralf Joachim
-
Field Summary
Fields inherited from class org.castor.ddlgen.schemaobject.AbstractSchemaObject
HASHFACTOR -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedKeyGenerator(String name, String alias) Construct key generator with given name and alias. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanfinal StringgetAlias()Get alias of the key generator.final TablegetTable()Get table the key generator creates keys for.final inthashCode()final voidmerge(KeyGenerator keygen) Check wether this key generator is compatible with the given one to allow merge of table definitions.final voidSet alias of the key generator.final voidSet table the key generator creates keys for.Methods inherited from class org.castor.ddlgen.schemaobject.AbstractSchemaObject
equals, getConfiguration, getName, setConfiguration, setNameMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.castor.ddlgen.schemaobject.SchemaObject
toCreateDDL, toDropDDL
-
Constructor Details
-
KeyGenerator
Construct key generator with given name and alias.- Parameters:
name- Name of the key generator algorithm.alias- Alias of the key generator.
-
-
Method Details
-
setAlias
Set alias of the key generator.- Parameters:
alias- Alias of the key generator.
-
getAlias
Get alias of the key generator.- Returns:
- Alias of the key generator.
-
setTable
Set table the key generator creates keys for.- Parameters:
table- Table the key generator creates keys for.
-
getTable
Get table the key generator creates keys for.- Returns:
- Table the key generator creates keys for.
-
merge
Check wether this key generator is compatible with the given one to allow merge of table definitions.- Parameters:
keygen- Key generator to merge.
-
equals
-
hashCode
public final int hashCode()
-