public final class SimpleSpread extends AbstractRandom implements IDistribution
Constructor and Description |
---|
SimpleSpread() |
Modifier and Type | Method and Description |
---|---|
int |
calculateNewRows(CreateParent[] parents,
int numExistRows,
List<String[]> rows)
Returns the number of new rows necessary.
|
void |
distribute(List<String> columns,
CreateParent[] parents,
List<String[]> rows)
Assigns values to the foreign key columns in the new data rows.
|
Random |
getRandom() |
void |
setRandom(Random random) |
randomAssignColumn, randomAssignRow
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
assignRow, assignRowCol
public static final String LABEL
public void setRandom(Random random)
setRandom
in interface IRandom
setRandom
in class AbstractRandom
public Random getRandom()
getRandom
in interface IRandom
getRandom
in class AbstractRandom
public int calculateNewRows(CreateParent[] parents, int numExistRows, List<String[]> rows)
IDistribution
calculateNewRows
in interface IDistribution
parents
- parents for foreign key assignmentsnumExistRows
- number of existing data rowsrows
- existing data rowspublic void distribute(List<String> columns, CreateParent[] parents, List<String[]> rows)
IDistribution
distribute
in interface IDistribution
columns
- column names as used in the rowsparents
- parent tables for foreign key assignementsrows
- all rows including existingCopyright © 2021. All rights reserved.