Returns the value of a query parameter, or {@code null} if the query parameter is not set.
@throws RestHandlerException If the query parameter is repeated.
169661
public static <X, P extends MessageQueryParameter<X>, R extends RequestBody, M extends MessageParameters> X getQueryParameter(
			final HandlerRequest<R, M> request,
			final Class<P> queryParameterClass) throws RestHandlerException {

		return getQueryParameter(request, queryParameterClass, null);
	}
941302
@SuppressWarnings("unchecked")
    @Override
    public final V getEntity(final NamedParameterQueryData query) {
        final Query builtQuery; // Query created from the query data
        V entity; // Entity acquired from the query

        checkNotNull(query, "Received a null pointer as the query");

        // Builds the query
        builtQuery = buildQuery(query);

        // Tries to acquire the entity
        try {
            entity = (V) builtQuery.getSingleResult();
        } catch (final NoResultException exception) {
            entity = null;
        }

        return entity;
    }
1246963
public com.google.protobuf.ByteString
      getUrlQueryParameterBytes() {
    java.lang.Object ref = urlQueryParameter_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      urlQueryParameter_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
893093
@Restricted(DoNotUse.class)
    public static String getFrom() {
        String from = null, returnValue = null;
        final StaplerRequest request = Stapler.getCurrentRequest();

        // Try to obtain a return point either from the Session
        // or from the QueryParameter in this order
        if (request != null
                && request.getSession(false) != null) {
            from = (String) request.getSession().getAttribute("from");
        } else if (request != null) {
            from = request.getParameter("from");
        }

        // If entry point was not found, try to deduce it from the request URI
        // except pages related to login process
        if (from == null
                && request != null
                && request.getRequestURI() != null
                && !request.getRequestURI().equals("/loginError")
                && !request.getRequestURI().equals("/login")) {

                from = request.getRequestURI();
        }

        // If deduced entry point isn't deduced yet or the content is a blank value
        // use the root web point "/" as a fallback
        from = StringUtils.defaultIfBlank(from, "/").trim();
        
        // Encode the return value
        try {
            returnValue = java.net.URLEncoder.encode(from, "UTF-8");
        } catch (UnsupportedEncodingException e) { }

        // Return encoded value or at least "/" in the case exception occurred during encode()
        // or if the encoded content is blank value
        return StringUtils.isBlank(returnValue) ? "/" : returnValue;
    }
470924
public static String getParameter (HttpServletRequest req, String name, boolean returnNull)
    {
        String value = req.getParameter(name);
        if (value == null) {
            return returnNull ? null : "";
        } else {
            return value.trim();
        }
    }
1300975
public Integer countPost(Query query) throws ApiException {
        ApiResponse<Integer> resp = countPostWithHttpInfo(query);
        return resp.getData();
    }
815540
public QueryResponse executeQueryPost(Query query) throws ApiException {
        ApiResponse<QueryResponse> resp = executeQueryPostWithHttpInfo(query);
        return resp.getData();
    }
508924
public String query(String paramName, String defaultValue) {
        return this.request.query(paramName, defaultValue);
    }
348681
private Object getValue(final ResultSet rs, final ResultSetMetaData rsmd, final int columnIndex)
			throws SQLException {
		JavaType javaType = this.dialect.getJavaType(rsmd.getColumnType(columnIndex),
				rsmd.getColumnTypeName(columnIndex));
		return this.mapperManager.getValue(javaType, rs, columnIndex);
	}
807551
public java.lang.String getUrlQueryParameter() {
    java.lang.Object ref = urlQueryParameter_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      urlQueryParameter_ = s;
      return s;
    }
  }
983995
@Override
    public String[] getParameterValues(String name) {
        ServletRESTRequestImpl ret = castRequest();
        if (ret != null)
            return ret.getParameterValues(name);
        return null;
    }
638722
@Override
	public Response handle(JsonPath jsonPath, QueryAdapter queryAdapter, RepositoryMethodParameterProvider parameterProvider, Document requestBody) {
		String resourceName = jsonPath.getElementName();
		PathIds resourceIds = jsonPath.getIds();
		RegistryEntry registryEntry = resourceRegistry.getEntry(resourceName);
		if (registryEntry == null) {
			throw new ResourceNotFoundException(resourceName);
		}
		String id = resourceIds.getIds().get(0);

		@SuppressWarnings("unchecked")
		Class<? extends Serializable> idClass = (Class<? extends Serializable>) registryEntry.getResourceInformation().getIdField().getType();
		Serializable castedId = typeParser.parse(id, idClass);
		ResourceRepositoryAdapter resourceRepository = registryEntry.getResourceRepository(parameterProvider);
		JsonApiResponse entities = resourceRepository.findOne(castedId, queryAdapter);
		
		Document responseDocument = documentMapper.toDocument(entities, queryAdapter);
		
		// return explicit { data : null } if values found
		if(!responseDocument.getData().isPresent()){
			responseDocument.setData(Nullable.nullValue());
		}

		return new Response(responseDocument, 200);
	}
478075
private String getQueryParam() {

        final String param = parseOptionalStringValue(XML_ELEMENT_QUERYPARAM);
        if (param == null) {
            return DEFAULT_QUERY_PARAM;
        } else {
            return param;
        }
    }
1333087
public String getQueryParameter(String name) {
    Iterable<String> allParams = getQueryParameters(name);
    if (allParams == null) {
      return null;
    }
    Iterator<String> iterator = allParams.iterator();
    return iterator.hasNext() ? iterator.next() : null;
  }
1291183
@Override
    public <T> Parameter<T> getParameter(int arg0, Class<T> arg1)
    {

        return query.getParameter(arg0, arg1);
    }
396382
def get_query_param(self, key, default=None):
        """"""
        value = self.request.query_params.get(key, None)
        if value is None:
            value = self.request.data.get(key, None)
        if value is None:
            value = default
        return value
1203228
public T handle(List<QueryParameters> outputList) {
        Number result = 0;

        if (outputList == null || outputList.isEmpty() == true) {
            throw new IllegalArgumentException("Error! Output should always contain at least one element");
        }

        QueryParameters stmtParams = outputList.get(0);

        if (stmtParams.containsKey(HandlersConstants.STMT_UPDATE_COUNT) == false) {
            throw new IllegalArgumentException("Error! Expected to get update count, but key wasn't found!");
        }

        result = (Integer) stmtParams.getValue(HandlersConstants.STMT_UPDATE_COUNT);

        return (T) result;
    }