use of org.jooq.tools.StringUtils.isBlank in project jOOQ by jOOQ.
the class AbstractDatabase method getInputSchemata.
@Override
public final List<String> getInputSchemata() {
if (inputSchemataPerCatalog == null) {
inputSchemata = new ArrayList<>();
inputSchemataPerCatalog = new LinkedHashMap<>();
// [#1312] Allow for omitting inputSchema configuration. Generate all schemata instead.
if (configuredSchemata.size() == 1 && StringUtils.isBlank(configuredSchemata.get(0).getInputSchema())) {
initAllSchemata();
} else if (configuredCatalogs.size() == 1 && StringUtils.isBlank(configuredCatalogs.get(0).getInputCatalog()) && configuredCatalogs.get(0).getSchemata().size() == 1 && StringUtils.isBlank(configuredCatalogs.get(0).getSchemata().get(0).getInputSchema())) {
initAllSchemata();
} else if (configuredCatalogs.isEmpty()) {
inputSchemataPerCatalog.put("", inputSchemata);
for (SchemaMappingType schema : configuredSchemata) {
{
inputSchemata.add(schema.getInputSchema());
}
}
} else {
for (CatalogMappingType catalog : configuredCatalogs) {
for (SchemaMappingType schema : catalog.getSchemata()) {
String inputSchema;
{
inputSchema = schema.getInputSchema();
}
inputSchemata.add(inputSchema);
// [#6064] If no input catalogs were configured, we need to register the input schema for each catalog
for (String inputCatalog : (configuredCatalogs.size() == 1 && StringUtils.isBlank(configuredCatalogs.get(0).getInputCatalog())) ? getInputCatalogs() : Collections.singletonList(catalog.getInputCatalog())) {
inputSchemataPerCatalog.computeIfAbsent(inputCatalog, c -> new ArrayList<>()).add(inputSchema);
}
}
}
}
}
return inputSchemata;
}
Aggregations