use of org.jooq.util.PackageDefinition in project jOOQ by jOOQ.
the class XMLDatabase method getPackages0.
@Override
protected List<PackageDefinition> getPackages0() {
List<PackageDefinition> result = new ArrayList<PackageDefinition>();
Set<String> packages = new HashSet<String>();
for (Routine routine : info().getRoutines()) {
String schemaName = defaultIfBlank(routine.getSpecificSchema(), routine.getRoutineSchema());
if (getInputSchemata().contains(schemaName)) {
SchemaDefinition schema = getSchema(schemaName);
String packageName = defaultIfBlank(routine.getSpecificPackage(), routine.getRoutinePackage());
if (!isBlank(packageName) && packages.add(packageName)) {
result.add(new XMLPackageDefinition(schema, info(), packageName));
}
}
}
return result;
}
Aggregations