|
OpenAPI 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AQRandomDataSet
This interface generates a new AQDataSet
using the constraints described below:
AQRandomDateRange
- can only be applied to a column with type set to date AQRandomNumberRange
- can only be applied to a column with type set to number AQRandomStringLength
- can only be applied to a column with type set to text AQRandomDateVariation
- can only be applied to a column with type set to date AQRandomNumberVariation
- can only be applied to a column with type set to number setColumns(int columns)
and setType(String type)
to set the desired constraints.
Instances of this interface can be instantiated by one of the following methods:
AQRandomFactory.newRandomDataSet()
AQRandomFactory.newRandomDataSet(int rows, String[] types, AQRandomRange[] ranges)
AQRandomFactory.newRandomDataSet(int rows, String[] types, AQRandomRange[] ranges, AQRandomVariation[] variations)
AQRandomFactory.newRandomDataSetByType(int rows, int columns, String type, AQRandomRange range)
AQRandomFactory.newRandomDataSetByType(int rows, int columns, String type, AQRandomRange range, AQRandomVariation variation)
Method Summary | |
---|---|
AQDataSet |
nextDataSet()
Randomly generates a new data set. |
void |
setColumnNameLengthConstraints(int minLength,
int maxLength)
Sets the constraint on the length of the generated column names, both minLength and maxLength need to be greater than zero in order to take effect. |
void |
setColumns(int columns)
Sets the number of columns to generate. |
void |
setDataStringLengthConstraints(int minLength,
int maxLength)
Sets the default constraint on the length of the generated text string, negative length indicates to generate a null object is allowed. |
void |
setRange(AQRandomRange range)
Sets the range to be applied to the generated data, this method expects there is only one column type is specified. |
void |
setRanges(AQRandomRange[] ranges)
Sets the ranges to be applied to the generated data, one for each column. |
void |
setRows(int rows)
Sets the number of rows to generate. |
void |
setType(String type)
Sets the type for all of generated columns. |
void |
setTypes(String[] types)
Sets the types for the columns to be generated. |
void |
setVariation(AQRandomVariation variation)
Sets the variation to be applied to the generated data, this method expects there is only one column type is specified. |
void |
setVariations(AQRandomVariation[] variations)
Sets the variations to be applied to the generated data, one for each column. |
Method Detail |
---|
AQDataSet nextDataSet() throws Exception
Exception
void setColumnNameLengthConstraints(int minLength, int maxLength)
minLength
and maxLength
need to be greater than zero in order to take effect.
minLength
- the minimum lengthmaxLength
- the maximum lengthvoid setDataStringLengthConstraints(int minLength, int maxLength)
minLength
- the minimum lengthmaxLength
- the maximum lengthvoid setRows(int rows)
rows
- the number of rows, needs to be greater than or equal to zerovoid setColumns(int columns)
setTypes(String[] types)
.
columns
- the number of columnsvoid setType(String type)
type
- the column typevoid setTypes(String[] types)
setColumns(int columns)
using the length of the specified type array.
types
- the column typesvoid setRange(AQRandomRange range)
range
- the range constraint, the system default range is used if nullvoid setRanges(AQRandomRange[] ranges)
ranges
- the range constraints, ignored if null or the system default replaces the null array membervoid setVariation(AQRandomVariation variation)
variation
- the variation constraint, ignored if nullvoid setVariations(AQRandomVariation[] variations)
variations
- the variation constraints, ignored if null or null array member is ignored
|
OpenAPI 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |