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 Details

    • ColumnConfiguration

      public ColumnConfiguration(String columnName, ColumnGeneratorFactory generatorFactory)
      Creates an instance of a ColumnConfiguration record class.
      Parameters:
      columnName - the value for the columnName record component
      generatorFactory - the value for the generatorFactory record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • columnName

      public String columnName()
      Returns the value of the columnName record component.
      Returns:
      the value of the columnName record component
    • generatorFactory

      public ColumnGeneratorFactory generatorFactory()
      Returns the value of the generatorFactory record component.
      Returns:
      the value of the generatorFactory record component