Exemplo n.º 1
0
 @Override
 public DBSObjectState getObjectState() {
   if (this == dataSource.getDefaultInstance()) {
     return DBSObjectState.NORMAL;
   } else {
     return PostgreConstants.STATE_UNAVAILABLE;
   }
 }
Exemplo n.º 2
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);
 }
Exemplo n.º 3
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;
 }
Exemplo n.º 4
0
 public PostgreSchema getSchema(DBRProgressMonitor monitor, String name) throws DBException {
   if (this != dataSource.getDefaultInstance()) {
     throw new DBException("Can't access non-default database");
   }
   return schemaCache.getObject(monitor, this, name);
 }