Examples of IQueryParameterType


Examples of ca.uhn.fhir.model.api.IQueryParameterType

    myType = theType;
  }

  @Override
  public List<IQueryParameterOr> encode(FhirContext theContext, Object theString) throws InternalErrorException {
    IQueryParameterType param = (IQueryParameterType) theString;
    return Collections.singletonList(ParameterUtil.singleton(param));
  }
View Full Code Here

Examples of ca.uhn.fhir.model.api.IQueryParameterType

    String value = theParams.get(0).get(0);
    if (StringUtils.isBlank(value)) {
      return null;
    }
   
    IQueryParameterType dt;
    try {
      dt = myType.newInstance();
      if (theParams.size() == 0 || theParams.get(0).size() == 0) {
        return dt;
      }
      if (theParams.size() > 1 || theParams.get(0).size() > 1) {
        throw new InvalidRequestException("Multiple values detected");
      }
     
      dt.setValueAsQueryToken(theParams.get(0).getQualifier(), value);
    } catch (InstantiationException e) {
      throw new InternalErrorException(e);
    } catch (IllegalAccessException e) {
      throw new InternalErrorException(e);
    } catch (SecurityException e) {
View Full Code Here

Examples of ca.uhn.fhir.model.api.IQueryParameterType

  }

  @SuppressWarnings("unchecked")
  @Override
  public List<IQueryParameterOr<?>> encode(FhirContext theContext, Object theString) throws InternalErrorException {
    IQueryParameterType param = (IQueryParameterType) theString;
    List<?> retVal = Collections.singletonList(MethodUtil.singleton(param));
    return (List<IQueryParameterOr<?>>) retVal;
  }
View Full Code Here

Examples of ca.uhn.fhir.model.api.IQueryParameterType

    String value = theParams.get(0).get(0);
    if (StringUtils.isBlank(value)) {
      return null;
    }
   
    IQueryParameterType dt = super.newInstance();

    if (theParams.size() == 0 || theParams.get(0).size() == 0) {
      return dt;
    }
    if (theParams.size() > 1 || theParams.get(0).size() > 1) {
      throw new InvalidRequestException("Multiple values detected for non-repeatable parameter '" + theName + "'. This server is not configured to allow multiple (AND/OR) values for this param.");
    }

    dt.setValueAsQueryToken(theParams.get(0).getQualifier(), value);
    return dt;
  }
View Full Code Here

Examples of ca.uhn.fhir.model.api.IQueryParameterType

        } else if ("searchType".equals(method)) {
          Map<String, List<IQueryParameterType>> params = new HashMap<String, List<IQueryParameterType>>();

          HashSet<String> hashSet = new HashSet<String>(theReq.getParameterMap().keySet());
          String paramName = null;
          IQueryParameterType paramValue = null;
          while (hashSet.isEmpty() == false) {

            String nextKey = hashSet.iterator().next();
            String nextValue = theReq.getParameter(nextKey);
            paramName = null;
View Full Code Here

Examples of ca.uhn.fhir.model.api.IQueryParameterType

    return Collections.singletonList(Collections.singletonList(retVal));
  }

  @Override
  public Object parse(List<List<String>> theString) throws InternalErrorException, InvalidRequestException {
    IQueryParameterType dt;
    try {
      dt = myType.newInstance();
      if (theString.size() == 0 || theString.get(0).size() == 0) {
        return dt;
      }
      if (theString.size() > 1 || theString.get(0).size() > 1) {
        throw new InvalidRequestException("Multiple values detected");
      }
     
      dt.setValueAsQueryToken(theString.get(0).get(0));
    } catch (InstantiationException e) {
      throw new InternalErrorException(e);
    } catch (IllegalAccessException e) {
      throw new InternalErrorException(e);
    } catch (SecurityException e) {
View Full Code Here

Examples of ca.uhn.fhir.model.api.IQueryParameterType

    return Collections.singletonList(Collections.singletonList(retVal));
  }

  @Override
  public Object parse(List<List<String>> theString) throws InternalErrorException, InvalidRequestException {
    IQueryParameterType dt;
    try {
      dt = myType.newInstance();
      if (theString.size() == 0 || theString.get(0).size() == 0) {
        return dt;
      }
      if (theString.size() > 1 || theString.get(0).size() > 1) {
        throw new InvalidRequestException("Multiple values detected");
      }
     
      dt.setValueAsQueryToken(theString.get(0).get(0));
    } catch (InstantiationException e) {
      throw new InternalErrorException(e);
    } catch (IllegalAccessException e) {
      throw new InternalErrorException(e);
    } catch (SecurityException e) {
View Full Code Here

Examples of ca.uhn.fhir.model.api.IQueryParameterType

  }

  @SuppressWarnings("unchecked")
  @Override
  public List<IQueryParameterOr<?>> encode(FhirContext theContext, Object theString) throws InternalErrorException {
    IQueryParameterType param = (IQueryParameterType) theString;
    List<?> retVal = Collections.singletonList(MethodUtil.singleton(param));
    return (List<IQueryParameterOr<?>>) retVal;
  }
View Full Code Here

Examples of ca.uhn.fhir.model.api.IQueryParameterType

    String value = theParams.get(0).get(0);
    if (StringUtils.isBlank(value)) {
      return null;
    }
   
    IQueryParameterType dt = super.newInstance();

    if (theParams.size() == 0 || theParams.get(0).size() == 0) {
      return dt;
    }
    if (theParams.size() > 1 || theParams.get(0).size() > 1) {
      throw new InvalidRequestException("Multiple values detected");
    }

    dt.setValueAsQueryToken(theParams.get(0).getQualifier(), value);
    return dt;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.