pl.kernelpanic.dbmonster.schema
Class Column

java.lang.Object
  extended bypl.kernelpanic.dbmonster.schema.Column
All Implemented Interfaces:
Comparable

public class Column
extends Object
implements Comparable

The column.

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

Constructor Summary
Column()
           
 
Method Summary
 int compareTo(Object o)
           
 void generate()
          Generates this column.
 boolean getDatabaseDefault()
          Returns true if this column should not be included in INSERT query allowing the database to put the default value for this column.
 DataGenerator getGenerator()
          Returns a data generator.
 String getName()
          Returns the name of the column.
 Table getTable()
          Returns a table.
 int getTargetType()
           
 Object getValue()
          Returns the value.
 void initialize(DBMonsterContext ctx)
          Initializes the column.
 void reset()
          Resets the column.
 void setDatabaseDefault(boolean isDatabaseDefault)
          Sets database default parameter
 void setGenerator(DataGenerator gen)
          Sets the data generator.
 void setName(String s)
          Sets the name of the column.
 void setTable(Table t)
          Sets the table.
 void setTargetType(int targetType)
           
 void setValue(Object o)
          Sets the value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Column

public Column()
Method Detail

getName

public final String getName()
Returns the name of the column.

Returns:
the name of the column.

setName

public final void setName(String s)
Sets the name of the column.

Parameters:
s - the name of the column.

getGenerator

public final DataGenerator getGenerator()
Returns a data generator.

Returns:
generator.

setGenerator

public final void setGenerator(DataGenerator gen)
Sets the data generator.

Parameters:
gen - data generator

initialize

public final void initialize(DBMonsterContext ctx)
                      throws Exception
Initializes the column.

Parameters:
ctx - dbmonster context.
Throws:
Exception - if initialization fails

generate

public final void generate()
                    throws Exception
Generates this column.

Throws:
Exception - if this column could not be generated

reset

public final void reset()
Resets the column.


getDatabaseDefault

public final boolean getDatabaseDefault()
Returns true if this column should not be included in INSERT query allowing the database to put the default value for this column.

Returns:
defaultDatabase value

setDatabaseDefault

public final void setDatabaseDefault(boolean isDatabaseDefault)
Sets database default parameter

Parameters:
isDatabaseDefault - true if DBMonster should use database default value.

setValue

public final void setValue(Object o)
Sets the value.

Parameters:
o - the value

getValue

public final Object getValue()
Returns the value.

Returns:
the value.

setTable

public final void setTable(Table t)
Sets the table.

Parameters:
t - table

getTable

public final Table getTable()
Returns a table.

Returns:
a table.

compareTo

public final int compareTo(Object o)
Specified by:
compareTo in interface Comparable
See Also:
Comparable.compareTo(java.lang.Object)

getTargetType

public int getTargetType()
Returns:
Returns the targetType.

setTargetType

public void setTargetType(int targetType)
Parameters:
targetType - The targetType to set.


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