java.lang.Object
org.litebridgedb.orm.api.register.DtoTableSpecBuilder
Builder class for constructing instances of
DtoTableSpec.
This class is part of the fluent API provided by the Litebridge ORM for registering the mapping
between a Data Transfer Object (DTO) class and its corresponding database table. It leverages the
RegistrationContextTerminal as input to extract the necessary mapping details.
The DtoTableSpecBuilder processes the provided registration context and produces an immutable
DtoTableSpec that encapsulates the following:
- The DTO class being registered.
- The database table specification (
TableSpec), including the table name and field-to-column mappings. - A list of optional superinterfaces for the DTO class.
build() method has been invoked.-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new instance ofDtoTableSpecBuilderusing the specified registration context. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds theDtoTableSpecinstance encapsulating the DTO class, table specification, and superinterfaces.
-
Constructor Details
-
DtoTableSpecBuilder
Constructs a new instance ofDtoTableSpecBuilderusing the specified registration context. This constructor initialises the builder with the providedRegistrationContextTerminal, which contains the necessary mapping details such as the target DTO class, database table name, field-to-column mappings, and optional superinterfaces.- Parameters:
context- TheRegistrationContextTerminalcontaining the configuration details for registering a data transfer object (DTO) with its corresponding database table in the ORM framework. Must not benull.
-
-
Method Details
-
build
Builds theDtoTableSpecinstance encapsulating the DTO class, table specification, and superinterfaces.- Returns:
- The constructed
DtoTableSpecinstance.
-