Module litebridge.orm
Class FieldColumnSpecBuilderJoinStep
java.lang.Object
org.litebridgedb.orm.api.register.FieldColumnSpecBuilderJoinStep
- All Implemented Interfaces:
FieldColumnSpecBuilderTerminal
public final class FieldColumnSpecBuilderJoinStep
extends Object
implements FieldColumnSpecBuilderTerminal
A builder step for defining the join column mapping in a field-to-database-column specification.
This class allows specifying a join column as part of the mapping configuration while building
field specifications for an Object-Relational Mapping (ORM) system.
This class is immutable and part of a step-by-step fluent API to configure ORM mappings, ensuring that only valid sequences of method calls are made during the configuration process.
-
Constructor Summary
ConstructorsConstructorDescriptionFieldColumnSpecBuilderJoinStep(FieldSpec fieldSpec, String column, String joinColumn) -
Method Summary
Modifier and TypeMethodDescriptionwithMappedTable(Class<?> dtoClass, Function<RegistrationContext, RegistrationContextTerminal> rc) Maps the current column configuration to a database table associated with the specified Data Transfer Object (DTO) class.
-
Constructor Details
-
FieldColumnSpecBuilderJoinStep
-
-
Method Details
-
withMappedTable
public FieldColumnSpecBuilderTerminal withMappedTable(Class<?> dtoClass, Function<RegistrationContext, RegistrationContextTerminal> rc) Maps the current column configuration to a database table associated with the specified Data Transfer Object (DTO) class. This method resolves the table mapping for the provided DTO class and applies the necessary context transformations via the given function to finalise the table specification for the column mapping.- Parameters:
dtoClass- The class of the Data Transfer Object (DTO) that will be mapped to the database table.rc- A function that processes the registration context, allowing additional mapping configurations or custom transformations, and returns a terminal registration context.- Returns:
- An instance of
FieldColumnSpecBuilderTerminalrepresenting the final step in the field-to-database-column mapping configuration.
-