|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.castor.ddlgen.schemaobject.AbstractSchemaObject
org.castor.ddlgen.schemaobject.KeyGenerator
org.castor.ddlgen.keygenerator.HighLowKeyGenerator
public final class HighLowKeyGenerator
HIGH-LOW key generator will be handled by Castor so no DDL needs to be created. It only requires a table to lookup the next values to be used.
| Field Summary | |
|---|---|
static String |
ALGORITHM_NAME
Name of key generator algorithm. |
| Fields inherited from class org.castor.ddlgen.schemaobject.AbstractSchemaObject |
|---|
HASHFACTOR |
| Constructor Summary | |
|---|---|
HighLowKeyGenerator(KeyGeneratorDef definition)
Constructor for HIGH-LOW key generator specified by given defintion. |
|
| Method Summary | |
|---|---|
int |
getGrabSize()
Get number of new keys the key generator should grab from the sequence table at a time. |
String |
getKeyColumn()
Get name of the column which contains table names. |
String |
getTableName()
Get name of the special sequence table. |
String |
getValueColumn()
Get name of the column which is used to reserve primary key values. |
boolean |
isGlobal()
Shell globally unique keys be generated? |
boolean |
isSameConnection()
Shell the same Connection be used for writing to the sequence table? |
void |
toCreateDDL(DDLWriter writer)
Build create script for the schema object. |
void |
toDropDDL(DDLWriter writer)
Build drop script for the schema object. |
| Methods inherited from class org.castor.ddlgen.schemaobject.KeyGenerator |
|---|
equals, getAlias, getTable, hashCode, merge, setAlias, setTable |
| Methods inherited from class org.castor.ddlgen.schemaobject.AbstractSchemaObject |
|---|
equals, getConfiguration, getName, setConfiguration, setName |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ALGORITHM_NAME
| Constructor Detail |
|---|
public HighLowKeyGenerator(KeyGeneratorDef definition)
throws GeneratorException
definition - Key generator definition.
GeneratorException - If grab size parameter can't be parsed as integer.| Method Detail |
|---|
public String getTableName()
public String getKeyColumn()
public String getValueColumn()
public int getGrabSize()
public boolean isSameConnection()
true it uses the same connection t write to the sequence
table.public boolean isGlobal()
true globally unique keys are generated.public void toCreateDDL(DDLWriter writer)
writer - DDLWriter to write schema objects to.public void toDropDDL(DDLWriter writer)
writer - DDLWriter to write schema objects to.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||