public class TablesDependencyHelper extends Object
Modifier and Type | Method and Description |
---|---|
static IDataSet |
getAllDataset(IDatabaseConnection connection,
PrimaryKeyFilter.PkTableMap rootTables) |
static IDataSet |
getAllDataset(IDatabaseConnection connection,
String rootTable,
Set allowedPKs) |
static String[] |
getAllDependentTables(IDatabaseConnection connection,
String rootTable)
Get the name of all tables that depend on a root table ( i.e, all tables whose PK
is a FK for the root table) and also the tables the root table depends on
(i.e., all tables which have a FK for the root table's PK).
|
static String[] |
getAllDependentTables(IDatabaseConnection connection,
String[] rootTables)
Get the name of all tables that depend on the root tables ( i.e, all tables whose PK
is a FK for any of the root tables) and also the tables the root tables depends on
(i.e., all tables which have a FK for any of the root table's PK).
|
static IDataSet |
getDataset(IDatabaseConnection connection,
PrimaryKeyFilter.PkTableMap rootTables) |
static IDataSet |
getDataset(IDatabaseConnection connection,
String rootTable,
Set allowedIds) |
static String[] |
getDependentTables(IDatabaseConnection connection,
String rootTable)
Get the name of all tables that depend on the root tables (i.e, all tables that have FKs
pointing to the PK of the root table).
|
static String[] |
getDependentTables(IDatabaseConnection connection,
String[] rootTables)
Get the name of all tables that depend on the root tables (i.e, all tables that have FKs
pointing to the PK of one of the root tables).
|
static String[] |
getDependsOnTables(IDatabaseConnection connection,
String rootTable)
Get the name of all tables that the given rootTable depends on (i.e, all tables whose PK is a FK for the root table).
|
static Set |
getDirectDependentTables(IDatabaseConnection connection,
String tableName)
Returns a set of tables which directly depend on the given table.
|
static Set |
getDirectDependsOnTables(IDatabaseConnection connection,
String tableName)
Returns a set of tables on which the given table directly depends on.
|
public static String[] getDependentTables(IDatabaseConnection connection, String rootTable) throws SearchException
connection
- database connectionrootTable
- root table described aboveSearchException
- if an exception occurred while calculating the orderpublic static String[] getDependentTables(IDatabaseConnection connection, String[] rootTables) throws SearchException
connection
- database connectionrootTables
- array of root tables described aboveSearchException
- if an exception occurred while calculating the orderpublic static String[] getDependsOnTables(IDatabaseConnection connection, String rootTable) throws SearchException
connection
- database connectionrootTable
- root table described aboveSearchException
- if an exception occurred while calculating the orderpublic static String[] getAllDependentTables(IDatabaseConnection connection, String rootTable) throws SearchException
connection
- database connectionrootTable
- root table described aboveSearchException
- if an exception occurred while calculating the orderpublic static String[] getAllDependentTables(IDatabaseConnection connection, String[] rootTables) throws SearchException
connection
- database connectionrootTables
- root tables described aboveSearchException
- if an exception occurred while calculating the orderpublic static IDataSet getDataset(IDatabaseConnection connection, String rootTable, Set allowedIds) throws SearchException, SQLException, DataSetException
public static IDataSet getDataset(IDatabaseConnection connection, PrimaryKeyFilter.PkTableMap rootTables) throws SearchException, SQLException, DataSetException
public static IDataSet getAllDataset(IDatabaseConnection connection, String rootTable, Set allowedPKs) throws SearchException, SQLException, DataSetException
public static IDataSet getAllDataset(IDatabaseConnection connection, PrimaryKeyFilter.PkTableMap rootTables) throws SearchException, SQLException, DataSetException
public static Set getDirectDependsOnTables(IDatabaseConnection connection, String tableName) throws SearchException
connection
- The connection to be used for the database lookup.tableName
- SearchException
public static Set getDirectDependentTables(IDatabaseConnection connection, String tableName) throws SearchException
connection
- The connection to be used for the database lookup.tableName
- SearchException
Copyright © 2002–2020. All rights reserved.