public static TableIdentifier createTableIdentifier( Table table, String defaultCatalog, String defaultSchema) { String tableName = table.getName(); String tableCatalog = getCatalogForModel(table.getCatalog(), defaultCatalog); String tableSchema = getSchemaForModel(table.getSchema(), defaultSchema); return new TableIdentifier(tableCatalog, tableSchema, tableName); }
public static Map<String,MetaAttribute> getTableToMetaAttributesInRevengStrategy( ReverseEngineeringStrategy revengStrat, Table table, String defaultCatalog, String defaultSchema) { Map<String,MetaAttribute> result = null; TableIdentifier tableIdentifier = TableIdentifier.create(table); result = revengStrat.tableToMetaAttributes(tableIdentifier); if (result == null) { String catalog = getCatalogForModel(table.getCatalog(), defaultCatalog); String schema = getSchemaForModel(table.getSchema(), defaultSchema); tableIdentifier = new TableIdentifier(catalog, schema, table.getName()); result = revengStrat.tableToMetaAttributes(tableIdentifier); } return result; }
public static List<String> getPrimaryKeyInfoInRevengStrategy( ReverseEngineeringStrategy revengStrat, Table table, String defaultCatalog, String defaultSchema) { List<String> result = null; TableIdentifier tableIdentifier = TableIdentifier.create(table); result = revengStrat.getPrimaryKeyColumnNames(tableIdentifier); if (result == null) { String catalog = getCatalogForModel(table.getCatalog(), defaultCatalog); String schema = getSchemaForModel(table.getSchema(), defaultSchema); tableIdentifier = new TableIdentifier(catalog, schema, table.getName()); result = revengStrat.getPrimaryKeyColumnNames(tableIdentifier); } return result; }
public static String getTableIdentifierStrategyNameInRevengStrategy( ReverseEngineeringStrategy revengStrat, Table table, String defaultCatalog, String defaultSchema) { String result = null; TableIdentifier tableIdentifier = TableIdentifier.create(table); result = revengStrat.getTableIdentifierStrategyName(tableIdentifier); if (result == null) { String catalog = getCatalogForModel(table.getCatalog(), defaultCatalog); String schema = getSchemaForModel(table.getSchema(), defaultSchema); tableIdentifier = new TableIdentifier(catalog, schema, table.getName()); result = revengStrat.getTableIdentifierStrategyName(tableIdentifier); } return result; }
public static Map<String,MetaAttribute> getColumnToMetaAttributesInRevengStrategy( ReverseEngineeringStrategy revengStrat, Table table, String defaultCatalog, String defaultSchema, String column) { Map<String,MetaAttribute> result = null; TableIdentifier tableIdentifier = TableIdentifier.create(table); result = revengStrat.columnToMetaAttributes(tableIdentifier, column); if (result == null) { String catalog = getCatalogForModel(table.getCatalog(), defaultCatalog); String schema = getSchemaForModel(table.getSchema(), defaultSchema); tableIdentifier = new TableIdentifier(catalog, schema, table.getName()); result = revengStrat.columnToMetaAttributes(tableIdentifier, column); } return result; }
public static String getColumnToPropertyNameInRevengStrategy( ReverseEngineeringStrategy revengStrat, Table table, String defaultCatalog, String defaultSchema, String columnName) { String result = null; TableIdentifier tableIdentifier = TableIdentifier.create(table); result = revengStrat.columnToPropertyName(tableIdentifier, columnName); if (result == null) { String catalog = getCatalogForModel(table.getCatalog(), defaultCatalog); String schema = getSchemaForModel(table.getSchema(), defaultSchema); tableIdentifier = new TableIdentifier(catalog, schema, table.getName()); result = revengStrat.columnToPropertyName(tableIdentifier, columnName); } return result; }