java.lang.Object
org.litebridgedb.orm.engine.RegistrationEngine
-
Constructor Summary
ConstructorsConstructorDescriptionRegistrationEngine(TransactionalDatabaseProvider databaseProvider, TableRegistry tableRegistry, TableMapper tableMapper, ChangeTracker changeTracker, MethodHandles.Lookup lookup) -
Method Summary
Modifier and TypeMethodDescriptionvoidRegisters annotated entity class(es).voidregister(Class<?> dtoClass, Function<RegistrationContext, RegistrationContextTerminal> rc) Registers a DTO class along with its associated table specification using the provided registration context function.voidregister(DtoTableSpec... dtoTableSpecs) Register a Data Transfer Object (DTO) class(es) with its corresponding table specification(s).
-
Constructor Details
-
RegistrationEngine
public RegistrationEngine(TransactionalDatabaseProvider databaseProvider, TableRegistry tableRegistry, TableMapper tableMapper, ChangeTracker changeTracker, MethodHandles.Lookup lookup)
-
-
Method Details
-
register
public void register(Class<?> dtoClass, Function<RegistrationContext, RegistrationContextTerminal> rc) Registers a DTO class along with its associated table specification using the provided registration context function.- Parameters:
dtoClass- The class object of the DTO (Data Transfer Object) to be registered.rc- A function that takes a RegistrationContext instance to configure the table mapping.
-
register
Registers annotated entity class(es).The annotated entity must be annotated with
Tableand contain at least one field annotated withColumn,OneToManyorManyToMany.- Parameters:
entityClasses- the class(es) of the entity/entities to be registered.
-
register
Register a Data Transfer Object (DTO) class(es) with its corresponding table specification(s).This method maps the DTO class to a database table and stores the association in the table registry to enable database operations such as insert, update, or query.
- Parameters:
dtoTableSpecs- One or more DTO-to-table mapping details
-