java.lang.Object
org.litebridge.orm.api.spec.TableSpec
Specification of a database table, used to map DTO instances to target tables.
This class is immutable and provides various factory methods to create instances with different configurations.
-
Constructor Summary
ConstructorsConstructorDescriptionTableSpec(@Nullable String catalog, @Nullable String schema, String table, Map<FieldMapping, ColumnMapping> fieldColumnMap) Creates a newTableSpecinstance with explicit catalog, schema, and table names.TableSpec(String name, Map<FieldMapping, ColumnMapping> fieldColumnMap) Creates a newTableSpecinstance by parsing a qualified or unqualified table name. -
Method Summary
Modifier and TypeMethodDescriptionField name toColumnSpecmap; key is field name, value is the column definitionname()toTable()
-
Constructor Details
-
TableSpec
public TableSpec(@Nullable String catalog, @Nullable String schema, String table, Map<FieldMapping, ColumnMapping> fieldColumnMap) Creates a newTableSpecinstance with explicit catalog, schema, and table names.- Parameters:
catalog- the database catalog, ornullschema- the database schema, ornulltable- the table namefieldColumnMap- the mapping between DTO fields and database columns
-
TableSpec
Creates a newTableSpecinstance by parsing a qualified or unqualified table name.- Parameters:
name- the table name, optionally qualified with catalog and/or schema (e.g."schema.table")fieldColumnMap- the mapping between DTO fields and database columns
-
-
Method Details
-
name
-
fieldColumnMap
Field name toColumnSpecmap; key is field name, value is the column definition- Returns:
- field name-database column mapping
-
toTable
-