public void addSuggestedIdentifierStrategy(String catalog, String schema, String name, String idstrategy) { TableIdentifier identifier = new TableIdentifier(catalog, schema, name); suggestedIdentifierStrategies.put(identifier, idstrategy); }
public String getSuggestedIdentifierStrategy(String catalog, String schema, String name) { TableIdentifier identifier = new TableIdentifier(catalog, schema, name); return (String) suggestedIdentifierStrategies.get(identifier); }
public static TableIdentifier create(Table table) { return new TableIdentifier(table.getCatalog(), table.getSchema(), table.getName() ); }
String catalogName = (String) tableRs.get("TABLE_CAT"); TableIdentifier ti = new TableIdentifier(catalogName, schemaName, tableName); if(revengStrategy.excludeTable(ti) ) { log.debug("Table " + ti + " excluded by strategy"); String catalogName = (String) tableRs.get("TABLE_CAT"); TableIdentifier ti = new TableIdentifier(catalogName, schemaName, tableName); if(revengStrategy.excludeTable(ti) ) { log.debug("Table " + ti + " excluded by strategy");
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> 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 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 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; }