pl.kernelpanic.dbmonster.generator
Interface KeyGenerator

All Known Implementing Classes:
MaxKeyGenerator, StringKeyGenerator

public interface KeyGenerator

The interface which every key generator must implement.

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

Method Summary
 List generate()
          Generates a primary key.
 List getColumns()
          Returns columns.
 Key getKey()
          Returns the key
 void setKey(Key key)
          Sets the key.
 

Method Detail

setKey

public void setKey(Key key)
Sets the key.

Parameters:
key - a key

getKey

public Key getKey()
Returns the key


getColumns

public List getColumns()
Returns columns.

Returns:
a list of columns

generate

public List generate()
              throws Exception
Generates a primary key.

Returns:
a list of generated Columns.
Throws:
Exception - if generation is not possible


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