java.lang.Object
org.litebridgedb.orm.api.register.RegistrationContextTerminal
Terminal context for registering the mapping between a data transfer object (DTO)
class and its corresponding database table within the ORM framework.
This class serves as a final step in constructing the mapping information for a DTO to interact with a specific database table. It encapsulates details such as the target DTO class, the associated database table name, field-to-column mappings, and the database provider responsible for performing specific database-related operations.
Instances of this class are immutable after their internal state has been configured through the
builder-like pattern provided by the with method.
-
Method Summary
Modifier and TypeMethodDescriptionConfigures a field-to-column mapping for a Data Transfer Object (DTO) within the current registration context by applying a specification function.
-
Method Details
-
with
public RegistrationContextTerminal with(Function<FieldColumnSpecBuilder, FieldColumnSpecBuilderTerminal> spec) Configures a field-to-column mapping for a Data Transfer Object (DTO) within the current registration context by applying a specification function. This method is used to define how a specific field in the DTO maps to its corresponding database column, allowing for the configuration of column specifications, sequence generators, and other mapping details.- Parameters:
spec- AFunctiontaking aFieldColumnSpecBuilderto define the field-to-column mapping. The function returns aFieldColumnSpecBuilderTerminal, which represents the finalized mapping configuration.- Returns:
- An updated
RegistrationContextTerminalinstance with the specified field-to-column mapping added to the context.
-