pl.kernelpanic.dbmonster.generator
Class BinaryGenerator

java.lang.Object
  extended by pl.kernelpanic.dbmonster.generator.BasicDataGenerator
      extended by pl.kernelpanic.dbmonster.generator.BinaryGenerator
All Implemented Interfaces:
DataGenerator, Initializable

public class BinaryGenerator
extends BasicDataGenerator
implements Initializable


Field Summary
 
Fields inherited from class pl.kernelpanic.dbmonster.generator.BasicDataGenerator
column, nulls
 
Constructor Summary
BinaryGenerator()
           
 
Method Summary
 Object generate()
          Generates byte[] from the next file in our list of configured files.
 int getMaxLength()
          Returns the maximal length of the string.
 void initialize(DBMonsterContext ctx)
          Initializes a class with DBMonsterContext.
 void reset()
          Resets the generator.
 void setFile(String value)
          Sets a filename containing content to be used as a field value in the database.
 void setMaxLength(int length)
          Sets the maximal length of the string.
 
Methods inherited from class pl.kernelpanic.dbmonster.generator.BasicDataGenerator
getColumn, getNulls, setColumn, setNulls
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryGenerator

public BinaryGenerator()
Method Detail

initialize

public void initialize(DBMonsterContext ctx)
                throws Exception
Initializes a class with DBMonsterContext.

Specified by:
initialize in interface Initializable
Parameters:
ctx - context
Throws:
Exception - if initialization fails

generate

public Object generate()
                throws Exception
Generates byte[] from the next file in our list of configured files.

Specified by:
generate in interface DataGenerator
Returns:
value.
Throws:
Exception - if generation fails

reset

public void reset()
Description copied from interface: DataGenerator
Resets the generator.

Specified by:
reset in interface DataGenerator

setFile

public void setFile(String value)
Sets a filename containing content to be used as a field value in the database.

Parameters:
value - the absolute path to a file that will be read in and stored in a table column.

getMaxLength

public int getMaxLength()
Returns the maximal length of the string.

Returns:
the maximal value of generated string

setMaxLength

public void setMaxLength(int length)
Sets the maximal length of the string.

Parameters:
length - maximal length


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