示例#1
0
 @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);
 }
示例#2
0
 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;
 }