Record Class ColumnConfiguration
java.lang.Object
java.lang.Record
io.bloviate.db.ColumnConfiguration
- Record Components:
columnName- the name of the column to override (matched case-insensitively)generatorFactory- builds the generator for the column
public record ColumnConfiguration(String columnName, ColumnGeneratorFactory generatorFactory)
extends Record
Overrides the data generator used for a single column, replacing the
generator that would otherwise be auto-detected from the column's JDBC type.
The column name is matched case-insensitively. The generator is built lazily
by the fill engine via ColumnGeneratorFactory.create(java.util.random.RandomGenerator),
using a column-seeded RandomGenerator so overridden columns remain
reproducible.
- Since:
- 1.0.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionColumnConfiguration(String columnName, ColumnGeneratorFactory generatorFactory) Creates an instance of aColumnConfigurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecolumnNamerecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegeneratorFactoryrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ColumnConfiguration
Creates an instance of aColumnConfigurationrecord class.- Parameters:
columnName- the value for thecolumnNamerecord componentgeneratorFactory- the value for thegeneratorFactoryrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
columnName
Returns the value of thecolumnNamerecord component.- Returns:
- the value of the
columnNamerecord component
-
generatorFactory
Returns the value of thegeneratorFactoryrecord component.- Returns:
- the value of the
generatorFactoryrecord component
-