Class CreditGenerator
- All Implemented Interfaces:
DataGenerator<String>
Generates the TPC-C customer credit rating (clause 4.3.2.7): "GC" (good credit)
90% of the time and "BC" (bad credit) 10% of the time.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe TPC-C bad-credit marker,"BC".static final StringThe TPC-C good-credit marker,"GC".Fields inherited from class AbstractDataGenerator
random, randomUtils -
Method Summary
Methods inherited from class AbstractDataGenerator
generateAndSet, generateAsString, reseed, set
-
Field Details
-
GOOD_CREDIT
-
BAD_CREDIT
-
-
Method Details
-
generate
Description copied from interface:DataGeneratorGenerates a random value of type T.- Returns:
- a generated value, may be null if the generator supports nullable columns
-
get
Description copied from interface:DataGeneratorRetrieves a value from a ResultSet column.- Parameters:
resultSet- the result set to read fromcolumnIndex- the 1-based column index- Returns:
- the value from the result set, properly cast to type T
- Throws:
SQLException- if the database operation fails
-