@Association public Collection<PostgreSchema> getSchemas(DBRProgressMonitor monitor) throws DBException { if (this != dataSource.getDefaultInstance()) { throw new DBException("Can't access non-default database"); } // Get all schemas return schemaCache.getAllObjects(monitor, this); }
public PostgreSchema getSchema(DBRProgressMonitor monitor, long oid) throws DBException { if (this != dataSource.getDefaultInstance()) { throw new DBException("Can't access non-default database"); } for (PostgreSchema schema : schemaCache.getAllObjects(monitor, this)) { if (schema.getObjectId() == oid) { return schema; } } return null; }