Package com.im.ijcs.api.ddl
Interface TableSetInfoProvider
-
public interface TableSetInfoProvider
Mechanism for creatingTableSetInfo
from a group ofDBTableInfo
s. The implementor can recognize its tables and can create from them a proper instance ofTableSetInfo
. TheTableSetInfo
can be promoted to Entity.- Since:
- 16.2.8
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
TableSetInfoProvider.Context
The context of the provider, contains informations about the schema.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description com.im.commons.db.ddl.tablesets.TableSetInfo
createTableSetInfo(com.im.commons.db.ddl.DBTableInfo primaryTable, java.util.Map<java.lang.String,com.im.commons.db.ddl.DBTableInfo> tables)
CreatesTableSetInfo
from a group ofDBTableInfo
s.com.im.commons.db.ddl.DBTableInfo
findPrimaryTable(com.im.commons.db.ddl.DBTableInfo table, TableSetInfoProvider.Context ctx)
Should return the primary table related to thetable
ornull
if the table is not known by the implementor.default void
init(com.im.commons.db.DatabasePlatform platform)
Initializes provider if needed.
-
-
-
Method Detail
-
init
default void init(com.im.commons.db.DatabasePlatform platform)
Initializes provider if needed. Used for JPC/JCC optimization.- Parameters:
platform
- DB platform- Since:
- 21.15.0
-
findPrimaryTable
com.im.commons.db.ddl.DBTableInfo findPrimaryTable(com.im.commons.db.ddl.DBTableInfo table, TableSetInfoProvider.Context ctx)
Should return the primary table related to thetable
ornull
if the table is not known by the implementor. For creatingTableSetInfo
from a group ofDBTableInfo
s the first provider will be used which returned the actually processedprimaryTable
.- Parameters:
table
- The table to group with a primary table.ctx
- The context.- Returns:
- The primary table of the group where
table
belongs ornull
if the table is not known by this implementation. - See Also:
createTableSetInfo(com.im.commons.db.ddl.DBTableInfo, java.util.Map)
-
createTableSetInfo
com.im.commons.db.ddl.tablesets.TableSetInfo createTableSetInfo(com.im.commons.db.ddl.DBTableInfo primaryTable, java.util.Map<java.lang.String,com.im.commons.db.ddl.DBTableInfo> tables)
CreatesTableSetInfo
from a group ofDBTableInfo
s. The firstTableSetInfoProvider
will be used to createTableSetInfo
which returned the actually processedprimaryTable
.- Parameters:
primaryTable
- The primary table of the group.tables
- Map of tables. The keys are the names of tables including the schema name, the values areDBTableInfo
s. The keys are case insensitive.- Returns:
- The created
TableSetInfo
ornull
if the group should not be visible. - See Also:
findPrimaryTable(com.im.commons.db.ddl.DBTableInfo, com.im.ijcs.api.ddl.TableSetInfoProvider.Context)
-
-