public static Stella_Object accessQuerySolutionTableSlotValue(QuerySolutionTable self, Symbol slotname, Stella_Object value, boolean setvalueP) {
    if (slotname == Logic.SYM_STELLA_THE_MAP) {
      if (setvalueP) {
        self.theMap = ((KeyValueMap)(value));
      }
      else {
        value = self.theMap;
      }
    }
    else if (slotname == Logic.SYM_LOGIC_QUERY) {
      if (setvalueP) {
        self.query = ((QueryIterator)(value));
      }
      else {
        value = self.query;
      }
    }
    else if (slotname == Logic.SYM_STELLA_FIRST) {
      if (setvalueP) {
        self.first = ((QuerySolution)(value));
      }
      else {
        value = self.first;
      }
    }
    else if (slotname == Logic.SYM_STELLA_LAST) {
      if (setvalueP) {
        self.last = ((QuerySolution)(value));
      }
      else {
        value = self.last;
      }
    }
    else {
      { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

        stream000.nativeStream.print("`" + slotname + "' is not a valid case option");
        throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
      }
    }
    return (value);
  }