pl.kernelpanic.dbmonster.generator
Class MaxKeyGenerator

java.lang.Object
  extended bypl.kernelpanic.dbmonster.generator.MaxKeyGenerator
All Implemented Interfaces:
Initializable, KeyGenerator

public class MaxKeyGenerator
extends Object
implements KeyGenerator, Initializable

The max key generator.

Version:
$Id: MaxKeyGenerator.html,v 1.1 2007/06/21 08:38:14 sbahloul Exp $
Author:
Piotr Maj <piotr.maj@kernelpanic.pl>

Constructor Summary
MaxKeyGenerator()
           
 
Method Summary
 List generate()
          Generates a primary key.
 String getColumnName()
          Returns a column name.
 List getColumns()
          Returns columns.
 Key getKey()
          Returns the key
 void initialize(DBMonsterContext ctx)
          Initializes a class with DBMonsterContext.
 void setColumnName(String name)
          Sets the column name and sets up the column.
 void setKey(Key k)
          Sets the key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaxKeyGenerator

public MaxKeyGenerator()
Method Detail

setKey

public void setKey(Key k)
Sets the key.

Specified by:
setKey in interface KeyGenerator
Parameters:
k - the key.

getKey

public Key getKey()
Description copied from interface: KeyGenerator
Returns the key

Specified by:
getKey in interface KeyGenerator

getColumns

public List getColumns()
Returns columns.

Specified by:
getColumns in interface KeyGenerator
Returns:
a list of columns

generate

public List generate()
Generates a primary key.

Specified by:
generate in interface KeyGenerator
Returns:
a list of generated Columns.

initialize

public void initialize(DBMonsterContext ctx)
                throws Exception
Description copied from interface: Initializable
Initializes a class with DBMonsterContext.

Specified by:
initialize in interface Initializable
Parameters:
ctx - context
Throws:
Exception - if initialization fails
See Also:
Initializable.initialize(DBMonsterContext)

getColumnName

public final String getColumnName()
Returns a column name.

Returns:
the name of the column.

setColumnName

public final void setColumnName(String name)
Sets the column name and sets up the column.

Parameters:
name - the name of the column.


Copyright © 2003-2005 .:. kernelpanic.pl .:.. All Rights Reserved.