public void add(String theName, IQueryParameterOr<?> theOr) { if (theOr == null) { return; } if (!containsKey(theName)) { put(theName, new ArrayList<>()); } get(theName).add(theOr.getValuesAsQueryTokens()); }
@Override public void setValuesAsQueryTokens(FhirContext theContext, String theParamName, List<QualifiedParamList> theParameters) throws InvalidRequestException { myValues.clear(); for (QualifiedParamList nextParam : theParameters) { T nextList = newInstance(); nextList.setValuesAsQueryTokens(theContext, theParamName, nextParam); myValues.add(nextList); } }
public void add(String theName, IQueryParameterAnd<?> theAnd) { if (theAnd == null) { return; } if (!containsKey(theName)) { put(theName, new ArrayList<>()); } for (IQueryParameterOr<?> next : theAnd.getValuesAsQueryTokens()) { if (next == null) { continue; } get(theName).add(next.getValuesAsQueryTokens()); } }
@Override public IQueryParameterOr<?> parse(FhirContext theContext, String theParamName, List<QualifiedParamList> theString) throws InternalErrorException, InvalidRequestException { IQueryParameterOr<?> dt; try { dt = newInstance(); if (theString.size() == 0 || theString.get(0).size() == 0) { return dt; } if (theString.size() > 1) { throw new InvalidRequestException("Multiple values detected for non-repeatable parameter '" + theParamName + "'. This server is not configured to allow multiple (AND/OR) values for this param."); } dt.setValuesAsQueryTokens(theContext, theParamName, theString.get(0)); } catch (SecurityException e) { throw new InternalErrorException(e); } return dt; } }
public QualifiedParamList(IQueryParameterOr<?> theNextOr, FhirContext theContext) { for (IQueryParameterType next : theNextOr.getValuesAsQueryTokens()) { if (myQualifier == null) { myQualifier = next.getQueryParameterQualifier(); } add(next.getValueAsQueryToken(theContext)); } }
@Override public void setValuesAsQueryTokens(FhirContext theContext, String theParamName, List<QualifiedParamList> theParameters) throws InvalidRequestException { myValues.clear(); for (QualifiedParamList nextParam : theParameters) { T nextList = newInstance(); nextList.setValuesAsQueryTokens(theContext, theParamName, nextParam); myValues.add(nextList); } }
public QualifiedParamList(IQueryParameterOr<?> theNextOr, FhirContext theContext) { for (IQueryParameterType next : theNextOr.getValuesAsQueryTokens()) { if (myQualifier == null) { myQualifier = next.getQueryParameterQualifier(); } add(next.getValueAsQueryToken(theContext)); } }
@Override public IQueryParameterOr<?> parse(FhirContext theContext, String theParamName, List<QualifiedParamList> theString) throws InternalErrorException, InvalidRequestException { IQueryParameterOr<?> dt; try { dt = newInstance(); if (theString.size() == 0 || theString.get(0).size() == 0) { return dt; } if (theString.size() > 1) { throw new InvalidRequestException("Multiple values detected for non-repeatable parameter '" + theParamName + "'. This server is not configured to allow multiple (AND/OR) values for this param."); } dt.setValuesAsQueryTokens(theContext, theParamName, theString.get(0)); } catch (SecurityException e) { throw new InternalErrorException(e); } return dt; } }