code: public QueryControllerQuery addQuery(String queryStr, String queryId) {
  		int position = getElementPosition(queryId);
  
  		QueryControllerQuery query = new QueryControllerQuery(queryId);
  		query.setQuery(queryStr);
  
  		if (position == -1) { // add to the collection for a new query.
  			entities.add(query);
  			fireElementAdded(query);
  		} else {
  			entities.set(position, query);
  			fireElementChanged(query);
  		}
  		return query;
  	}
docs: Creates a new query and adds it to the vector QueryControllerEntity.
  
  @param queryStr
  The new query string, replacing any existing string.
  @param queryId
  The query id associated to the string.
  @return The query object.