java.lang.Object
org.litebridgedb.orm.persistence.TableRegistry
The TableRegistry class is a centralized registry responsible for managing the relationship
between Data Transfer Object (DTO) classes and their corresponding ORM table representations
(
OrmTable). This registry allows for efficient management, querying, and consistency of ORM
table mappings within Litebridge.
This class provides methods to:
- Add and register OrmTable instances associated with DTO classes.
- Retrieve OrmTable instances based on DTO class, schema, or table names.
- Check for the existence of tables mapped to specific DTO classes.
- Retrieve or create lightweight SPI table representations for database interactions.
Instances of this class are immutable with respect to their internal maps, ensuring thread safety and consistent state across multiple threads.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleancontainsTable(Class<?> dtoClass) getOrCreateSpiTable(String table) @Nullable OrmTable@Nullable OrmTable@Nullable OrmTable@Nullable OrmTablegetTableInContextOrThrow(Class<?> dtoClass, Class<?> contextClass) getTableOrThrow(Class<?> dtoClass)
-
Constructor Details
-
TableRegistry
public TableRegistry()
-
-
Method Details
-
getTable
-
getTableOrThrow
- Throws:
IllegalArgumentException
-
getTableInContextOrThrow
-
getTable
-
getTable
-
getTable
-
containsTable
-
addTable
-
tableStream
-
getOrCreateSpiTable
-