given the groupId, and 2 string arrays, adds the name-responses pair to the table_override

@param groupId ID of group
@param methodName name of method
@param className name of class
@throws Exception exception
499313
public void createOverride(int groupId, String methodName, String className) throws Exception {
        // first make sure this doesn't already exist
        for (Method method : EditService.getInstance().getMethodsFromGroupId(groupId, null)) {
            if (method.getMethodName().equals(methodName) && method.getClassName().equals(className)) {
                // don't add if it already exists in the group
                return;
            }
        }

        try (Connection sqlConnection = sqlService.getConnection()) {
            PreparedStatement statement = sqlConnection.prepareStatement(
                "INSERT INTO " + Constants.DB_TABLE_OVERRIDE
                    + "(" + Constants.OVERRIDE_METHOD_NAME
                    + "," + Constants.OVERRIDE_CLASS_NAME
                    + "," + Constants.OVERRIDE_GROUP_ID
                    + ")"
                    + " VALUES (?, ?, ?)"
            );
            statement.setString(1, methodName);
            statement.setString(2, className);
            statement.setInt(3, groupId);
            statement.executeUpdate();
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }
1199794
@Override
    public String getName(String key) throws Exception {
        IEntityGroup g = GroupService.findGroup(key);
        return g.getName();
    }
560149
public void addObject(final Object[] _row)
        throws SQLException
    {
        // store the ids also
        this.idList.add((Long) _row[0]);

        if (getFromSelect() != null) {
            final int column = "id".equals(this.valueSelect.getValueType())
                            ? this.valueSelect.getColIndexs().get(0) : 2;
            this.relIdList.add((Long) _row[column - 1]);
            // this means that it is a chained LinkFromSelect, but exclude
            // AttributeSets
            if (!getSelectParts().isEmpty() && getSelectParts().get(0) instanceof LinkFromSelect.LinkFromSelectPart
                            && !(((LinkFromSelect.LinkFromSelectPart) getSelectParts().get(0)).getType()
                                            instanceof AttributeSet)) {
                this.idList.set(this.idList.size() - 1, (Long) _row[1]);
            }
        }
        Object object = null;
        final AbstractValueSelect tmpValueSelect;
        if (this.valueSelect == null) {
            tmpValueSelect = this.fromSelect.getMainOneSelect().getValueSelect();
        } else {
            tmpValueSelect = this.valueSelect;
        }
        if (tmpValueSelect.getParentSelectPart() != null) {
            tmpValueSelect.getParentSelectPart().addObject(_row);
        }

        if (tmpValueSelect.getColIndexs().size() > 1) {
            final Object[] objArray = new Object[tmpValueSelect.getColIndexs().size()];
            int i = 0;
            for (final Integer colIndex : tmpValueSelect.getColIndexs()) {
                objArray[i] = _row[colIndex - 1];
                i++;
            }
            object = objArray;
        } else if (tmpValueSelect.getColIndexs().size() > 0) {
            object = _row[tmpValueSelect.getColIndexs().get(0) - 1];
        }
        this.objectList.add(object);
    }
817357
public List<Method> getMethodsFromGroupId(int groupId, String[] filters) throws Exception {
        ArrayList<Method> methods = new ArrayList<Method>();
        PreparedStatement statement = null;
        ResultSet results = null;

        try (Connection sqlConnection = sqlService.getConnection()) {
            statement = sqlConnection.prepareStatement(
                "SELECT * FROM " + Constants.DB_TABLE_OVERRIDE +
                    " WHERE " + Constants.OVERRIDE_GROUP_ID + " = ?"
            );
            statement.setInt(1, groupId);
            results = statement.executeQuery();
            while (results.next()) {
                Method method = PathOverrideService.getInstance().getMethodForOverrideId(results.getInt("id"));
                if (method == null) {
                    continue;
                }

                // decide whether or not to add this method based on the filters
                boolean add = true;
                if (filters != null) {
                    add = false;
                    for (String filter : filters) {
                        if (method.getMethodType().endsWith(filter)) {
                            add = true;
                            break;
                        }
                    }
                }

                if (add && !methods.contains(method)) {
                    methods.add(method);
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                if (results != null) {
                    results.close();
                }
            } catch (Exception e) {
            }
            try {
                if (statement != null) {
                    statement.close();
                }
            } catch (Exception e) {
            }
        }

        return methods;
    }
1003562
public void joinGroups(final ArrayList<String> groupIDList, final JoinGroupCompletionListener completionListener) {
        if (isConnected()) {
            if ((groupIDList != null) && (groupIDList.size() > 0)) {
                String urlEndpoint = "/v1/groups";

                JSONArray groupList = new JSONArray(groupIDList);
                JSONObject data = new JSONObject();
                try {
                    data.put("groups", groupList);

                    signalingChannel.sendRESTMessage("post", urlEndpoint, data, new RespokeSignalingChannel.RESTListener() {
                        @Override
                        public void onSuccess(Object response) {
                            final ArrayList<RespokeGroup> newGroupList = new ArrayList<RespokeGroup>();
                            for (String eachGroupID : groupIDList) {
                                RespokeGroup newGroup = new RespokeGroup(eachGroupID, signalingChannel, RespokeClient.this);
                                groups.put(eachGroupID, newGroup);
                                newGroupList.add(newGroup);
                            }

                            new Handler(Looper.getMainLooper()).post(new Runnable() {
                                @Override
                                public void run() {
                                    if (null != completionListener) {
                                        completionListener.onSuccess(newGroupList);
                                    }
                                }
                            });
                        }

                        @Override
                        public void onError(final String errorMessage) {
                            postJoinGroupMembersError(completionListener, errorMessage);
                        }
                    });
                } catch (JSONException e) {
                    postJoinGroupMembersError(completionListener, "Error encoding group list to json");
                }
            } else {
                postJoinGroupMembersError(completionListener, "At least one group must be specified");
            }
        } else {
            postJoinGroupMembersError(completionListener, "Can't complete request when not connected. Please reconnect!");
        }
    }
237018
protected function _register($id, $className)
    {
        $id = (string) $id;
        if (class_exists($className)) {
            self::$_loaded[$id] = $className;
            $this[$id] = function () use ($className) {
                return new $className();
            };
        } else {
            throw new Exception("Helper \"{{$className}}\" not found!");
        }
    }
271569
private function call(string $method, string $pattern, string $className, string $function, array $options = []): void
    {
        if (empty($className) || empty($function)) {
            throw new Exception('Missing params, we need 2 parameters');
        }

        $route = [
            'method' => $method,
            'pattern' => $pattern,
            'className' => $className,
            'function' => $function,
        ];
        $this->collections[] = $route;

        if (array_key_exists('options', $options)) {
            $this->setOptions($route, $options);
        }

        return;
    }
65486
private void doListGroup(final Message<JsonObject> message) {
    context.execute(new Action<Set<String>>() {
      @Override
      public Set<String> perform() {
        return groups.keySet();
      }
    }, new Handler<AsyncResult<Set<String>>>() {
      @Override
      public void handle(AsyncResult<Set<String>> result) {
        if (result.failed()) {
          message.reply(new JsonObject().putString("status", "error").putString("message", result.cause().getMessage()));
        } else {
          message.reply(new JsonObject().putString("status", "ok").putArray("result", new JsonArray(result.result().toArray(new String[result.result().size()]))));
        }
      }
    });
  }
905070
public void addException(String className) {
        if (mExceptions == null) {
            addAttribute(new ExceptionsAttr(mCp));
        }

        ConstantClassInfo cci = ConstantClassInfo.make(mCp, className);
        mExceptions.addException(cci);
    }
1202863
public void addClass(Class<?> klass) throws Exception {
        // 只读取public的属性
        for (Field field : klass.getFields()) {
            // 只读取PROP_开头的属性
            if (!field.getName().startsWith("PROP_"))
                continue;
            // 不带@ProcDoc? 跳过
            PropDoc prop = field.getAnnotation(PropDoc.class);
            if (prop == null)
                continue;
            // 如果不设置key,那就取字段的值,通常也是这样
            String key = Strings.isBlank(prop.key()) ? (String) field.get(null) : prop.key();

            // 如果对于的key不存在,那就新建一个PropDocBean,否则就取老的
            PropDocBean doc = new PropDocBean();
            doc.key = key;
            doc.defaultValue = prop.defaultValue();
            doc.value = prop.value();
            doc.group = Strings.isBlank(prop.group()) ? doc.key.substring(0, doc.key.indexOf('.')) : prop.group();
            doc.need = prop.need();
            doc.possible = prop.possible();
            doc.users = new ArrayList<>();
            add(klass.getName(), key, doc);
        }
    }
74278
@Override
    public IGroupByDocumentQuery<T> groupBy(String fieldName, String... fieldNames) {
        _groupBy(fieldName, fieldNames);

        return new GroupByDocumentQuery<>(this);
    }
1317908
private void setUserGroupNames(String userName, String[] groupNames) {
    if (userName==null || userName.length()==0 ||
        groupNames== null || groupNames.length==0) {
      throw new IllegalArgumentException(
          "Parameters should not be null or an empty string/array");
    }
    for (int i=0; i<groupNames.length; i++) {
      if(groupNames[i] == null || groupNames[i].length() == 0) {
        throw new IllegalArgumentException("A null group name at index " + i);
      }
    }
    this.userName = userName;
    this.groupNames = groupNames;
  }
378598
public void addGroupBy(String[] fieldNames)
    {
        for (int i = 0; i < fieldNames.length; i++)
        {
            addGroupBy(fieldNames[i]);
        }
    }
676151
public void deleteGroup(final String id) throws NotFoundException, GeneralException, UnauthorizedException {
        if (id == null) {
            throw new IllegalArgumentException("Group ID must be specified.");
        }
        messageBirdService.deleteByID(GROUPPATH, id);
    }
530094
@Override
    void findReferencedClassNames(final Set<String> classNameListOut) {
        for (final TypeParameter typeParameter : typeParameters) {
            typeParameter.findReferencedClassNames(classNameListOut);
        }
        if (superclassSignature != null) {
            superclassSignature.findReferencedClassNames(classNameListOut);
        }
        for (final ClassRefTypeSignature typeSignature : superinterfaceSignatures) {
            typeSignature.findReferencedClassNames(classNameListOut);
        }
    }
335537
@RequestMapping(value = "group/{groupId}", method = RequestMethod.GET)
    public String editGroup(Model model, @PathVariable int groupId) throws Exception {
        model.addAttribute("groupName",
                pathOverrideService.getGroupNameFromId(groupId));
        model.addAttribute("groupId", groupId);
        ObjectMapper mapper = new ObjectMapper();
        String json = mapper.writeValueAsString(pluginManager.getMethodsNotInGroup(groupId));
        model.addAttribute("methodsNotInGroup",
                json);

        return "editGroup";
    }
187554
public static void assertTrueOrUnknownClassInJQLException(boolean expression, SQLiteModelMethod method,
			String className) {
		if (!expression) {
			throw (new UnknownClassInJQLException(method, className));
		}
	}