Package com.im.ijcs.api.ddl
Class TableSetInfoProvider.Context
- java.lang.Object
-
- com.im.ijcs.api.ddl.TableSetInfoProvider.Context
-
- Enclosing interface:
- TableSetInfoProvider
public static final class TableSetInfoProvider.Context extends java.lang.Object
The context of the provider, contains informations about the schema.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.String
calcBaseTableName(com.im.commons.db.ddl.DBTableInfo table, java.lang.String suffix)
Calculates the base table name.static TableSetInfoProvider.Context
create(java.util.Map<java.lang.String,com.im.commons.db.ddl.DBTableInfo> tables, java.util.Map<java.lang.String,com.im.commons.db.ddl.tablesets.TableSetInfo> involvedTables)
Creates context.com.im.commons.db.ddl.DBTableInfo
get(java.lang.String name)
Returns theDBTableInfo
from the context with thename
.java.util.Map<java.lang.String,com.im.commons.db.ddl.tablesets.TableSetInfo>
getInvolvedTables()
Returns a map of involvedTableSetInfo
s in the view.
-
-
-
Method Detail
-
create
public static TableSetInfoProvider.Context create(java.util.Map<java.lang.String,com.im.commons.db.ddl.DBTableInfo> tables, java.util.Map<java.lang.String,com.im.commons.db.ddl.tablesets.TableSetInfo> involvedTables)
Creates context.- Parameters:
tables
- Map of tables.involvedTables
- TheTableSetInfo
s involved in view.- Returns:
- New context from a map of tables.
-
calcBaseTableName
public static java.lang.String calcBaseTableName(com.im.commons.db.ddl.DBTableInfo table, java.lang.String suffix)
Calculates the base table name. E.g. if thetable
's name is "schema.tablename_suffix" and thesuffix
is "_suffix" the result will be "schema.tablename".- Parameters:
table
- The table.suffix
- The suffix of the table.- Returns:
- The base table name including the schema name.
-
get
public com.im.commons.db.ddl.DBTableInfo get(java.lang.String name)
Returns theDBTableInfo
from the context with thename
. The method is case insensitive.- Parameters:
name
- The name of the table including the schema name. It- Returns:
- The
DBTableInfo
with namename
ornull
if no table has the namename
.
-
getInvolvedTables
public java.util.Map<java.lang.String,com.im.commons.db.ddl.tablesets.TableSetInfo> getInvolvedTables()
Returns a map of involvedTableSetInfo
s in the view.- Returns:
- The keys are the names of involved tables a thalues are the
TableSetInfo
s created for the key.
-
-