|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpl.kernelpanic.dbmonster.generator.BasicDataGenerator
pl.kernelpanic.dbmonster.generator.NumberGenerator
public class NumberGenerator
The generator which only produces nulls.
| Field Summary | |
|---|---|
static int |
DOUBLE
Result should be double. |
static int |
FLOAT
Result should be float. |
static int |
INTEGER
Result should be integer. |
static int |
LONG
Result should be long. |
static int |
NUMERIC
The result should be numeric. |
static int |
SHORT
Result should be short. |
| Fields inherited from class pl.kernelpanic.dbmonster.generator.BasicDataGenerator |
|---|
column, nulls |
| Constructor Summary | |
|---|---|
NumberGenerator()
|
|
| Method Summary | |
|---|---|
Object |
generate()
Generates random number. |
String |
getMaxValue()
Returns maximal value. |
String |
getMinValue()
Returns minimal value. |
String |
getReturnedType()
Returns type. |
int |
getScale()
Returns scale. |
void |
initialize(DBMonsterContext ctx)
Initializes the generator. |
void |
reset()
Resets the generator. |
void |
setMaxValue(String maxVal)
Maximum value. |
void |
setMinValue(String minVal)
Minimal value. |
void |
setReturnedType(String type)
Sets the returned type. |
void |
setScale(int s)
Sets the scale. |
| 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 |
| Field Detail |
|---|
public static final int SHORT
public static final int INTEGER
public static final int LONG
public static final int FLOAT
public static final int DOUBLE
public static final int NUMERIC
| Constructor Detail |
|---|
public NumberGenerator()
| Method Detail |
|---|
public void initialize(DBMonsterContext ctx)
throws Exception
initialize in interface Initializablectx - context
Exception - if generator contains errors.public Object generate()
generate in interface DataGeneratorpublic String getMinValue()
public void setMinValue(String minVal)
minVal - minimal valuepublic String getMaxValue()
public void setMaxValue(String maxVal)
maxVal - maximum valuepublic int getScale()
public void setScale(int s)
s - number of fraction digitspublic String getReturnedType()
public void setReturnedType(String type)
type - typepublic void reset()
DataGenerator
reset in interface DataGeneratorDataGenerator.reset()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||