org.castor.ddlgen.schemaobject
Class KeyGenerator

java.lang.Object
  extended by org.castor.ddlgen.schemaobject.AbstractSchemaObject
      extended by org.castor.ddlgen.schemaobject.KeyGenerator
All Implemented Interfaces:
SchemaObject
Direct Known Subclasses:
HighLowKeyGenerator, IdentityKeyGenerator, MaxKeyGenerator, SequenceKeyGenerator, UUIDKeyGenerator

public abstract class KeyGenerator
extends AbstractSchemaObject

Abstract base class for all key generators.

Since:
1.1
Version:
$Revision: 8993 $ $Date: 2011-08-02 01:28:52 +0200 (Di, 02 Aug 2011) $
Author:
Le Duc Bao, Ralf Joachim

Field Summary
 
Fields inherited from class org.castor.ddlgen.schemaobject.AbstractSchemaObject
HASHFACTOR
 
Constructor Summary
protected KeyGenerator(java.lang.String name, java.lang.String alias)
          Construct key generator with given name and alias.
 
Method Summary
 boolean equals(java.lang.Object other)
          
 java.lang.String getAlias()
          Get alias of the key generator.
 Table getTable()
          Get table the key generator creates keys for.
 int hashCode()
          
 void merge(KeyGenerator keygen)
          Check wether this key generator is compatible with the given one to allow merge of table definitions.
 void setAlias(java.lang.String alias)
          Set alias of the key generator.
 void setTable(Table table)
          Set table the key generator creates keys for.
 
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
 
Methods inherited from interface org.castor.ddlgen.schemaobject.SchemaObject
toCreateDDL, toDropDDL
 

Constructor Detail

KeyGenerator

protected KeyGenerator(java.lang.String name,
                       java.lang.String alias)
Construct key generator with given name and alias.

Parameters:
name - Name of the key generator algorithm.
alias - Alias of the key generator.
Method Detail

setAlias

public final void setAlias(java.lang.String alias)
Set alias of the key generator.

Parameters:
alias - Alias of the key generator.

getAlias

public final java.lang.String getAlias()
Get alias of the key generator.

Returns:
Alias of the key generator.

setTable

public final void setTable(Table table)
Set table the key generator creates keys for.

Parameters:
table - Table the key generator creates keys for.

getTable

public final Table getTable()
Get table the key generator creates keys for.

Returns:
Table the key generator creates keys for.

merge

public final void merge(KeyGenerator keygen)
Check wether this key generator is compatible with the given one to allow merge of table definitions.

Parameters:
keygen - Key generator to merge.

equals

public final boolean equals(java.lang.Object other)

Overrides:
equals in class java.lang.Object

hashCode

public final int hashCode()

Overrides:
hashCode in class java.lang.Object


Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com