Module litebridge.orm
Package org.litebridge.orm.api.register
Class FieldColumnSpecBuilderColumnStep
java.lang.Object
org.litebridge.orm.api.register.FcsbColumnJoinStep
org.litebridge.orm.api.register.FieldColumnSpecBuilderColumnStep
- All Implemented Interfaces:
FieldColumnSpecBuilderTerminal
public final class FieldColumnSpecBuilderColumnStep
extends FcsbColumnJoinStep
implements FieldColumnSpecBuilderTerminal
A builder step for defining the column specification associated with a field in a data model.
This class is part of a fluent interface for constructing field-to-column mappings, offering
methods for configuring column generation logic, joins, and finalization of the specification.
Instances of this class are immutable and facilitate chaining to refine the configuration of a field's column mapping.
-
Method Summary
Modifier and TypeMethodDescriptiongenerate(ColumnValueGenerator generator) Configures the value generation strategy for a database column using a specified custom generator.generateUsingSequence(String sequence) Configures the column value generator to use a sequence-based approach for populating column values.Methods inherited from class org.litebridge.orm.api.register.FcsbColumnJoinStep
joinOn, joinUsing
-
Method Details
-
generateUsingSequence
Configures the column value generator to use a sequence-based approach for populating column values. This method uses the provided sequence name to create aPlaceholderSequenceColumnValueGeneratorresponsible for generating values based on the specified sequence.- Parameters:
sequence- The name of the database sequence to be used for generating column values. Must not be null or empty.- Returns:
- An instance of
FieldColumnSpecBuilderTerminal, allowing further configuration of the field-to-column mapping or finalization of the specification.
-
generate
Configures the value generation strategy for a database column using a specified custom generator. This method finalises the column specification by associating it with the providedColumnValueGenerator, enabling dynamic value generation during operations like data insertion or updates.- Parameters:
generator- TheColumnValueGeneratorresponsible for generating dynamic values for the associated database column. Must not be null.- Returns:
- An instance of
FieldColumnSpecBuilderTerminal, allowing further configuration or finalisation of the field-to-column mapping.
-