docs: public RemoteDatabase getRemoteDatabase(Map<String, Object> properties) throws RemoteException
      {
          Record record = this.getMainRecord();
          BaseDatabase database = record.getTable().getDatabase();
          Application app = (Application)this.getTask().getApplication();
          DatabaseSession remoteDatabase = null;
          for (Task task : app.getTaskList().keySet())
          {
              if (task instanceof BaseSession)
              {
                  remoteDatabase = ((BaseSession)task).getDatabaseSession(database);
                  if (remoteDatabase != null)
                      break;
              }
          }
          if (database != null)
              if (properties != null)
                  database.getProperties().putAll(properties);    // Add these properties to the current db properties.
          if (remoteDatabase == null)
              remoteDatabase = createDatabaseSession(database, properties);
          return remoteDatabase;
      }