code: private void checkExistingCriteriaForUserBasedLimit(QueryWhere queryWhere, String userId, UserGroupCallback userGroupCallback) {
          List<String> groupIds = userGroupCallback.getGroupsForUser(userId);
          Set<String> userAndGroupIds = new HashSet<String>();
          if( groupIds != null ) {
              userAndGroupIds.addAll(groupIds);
          }
          userAndGroupIds.add(userId);
          if( ! criteriaListForcesUserLimitation(userAndGroupIds, queryWhere.getCriteria()) ) {
              addUserRolesLimitCriteria(queryWhere, userId, groupIds);
          }
      }
docs: This method checks whether or not the query *already* contains a limiting criteria (in short, a criteria that limits results
  of the query) that refers to the user or (the user's groups).  If there is no user/group limiting criteria, then a
  {@link QueryCriteria} with the user and group ids is added to the {@link QueryWhere} instance
  </p>
  If this method returns true, then there is no need to add additional criteria to the query to limit the query results
  to tasks that the user may see -- there is already query present in the query that takes care of this.
  
  @param queryWhere The {@link QueryWhere} instance containing the query criteria
  @param userId The string user id of the user calling the query
  @param userGroupCallback A {@link UserGroupCallback} instance in order to retrieve the groups of the given user