Class ChildCountGenerator.Builder
- Enclosing class:
ChildCountGenerator
Builder for
ChildCountGenerator.-
Field Summary
Fields inherited from class AbstractBuilder
DEFAULT_REFERENCE, random -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the generator.cardinality(ChildCardinality cardinality)
-
Constructor Details
-
Builder
Creates a builder.- Parameters:
random- the random source (unused by this generator, but required by the contract)
-
-
Method Details
-
cardinality
TheChildCardinalityconsulted for each parent row: rowkemitscardinality.count(k). To keep this column honest, it must be the sameChildCardinalityinstance shared with the child table'sChildKeyComponentGenerators, so each parent's declared child count equals the number of child rows actually generated for it. Required —build()throws if left unset.- Parameters:
cardinality- the shared per-parent child-count source- Returns:
- this builder, for chaining
-
build
Builds the generator.- Returns:
- a new
ChildCountGenerator - Throws:
IllegalStateException- if nocardinalitywas set
-