private boolean hasQualifiers(List<List<? extends IQueryParameterType>> theAndOrParams) { return theAndOrParams.stream().flatMap(List::stream).anyMatch(param -> param.getQueryParameterQualifier() != null); }
/** * This will only return true if all parameters have no modifier of any kind */ public boolean isAllParametersHaveNoModifier() { for (List<List<? extends IQueryParameterType>> nextParamName : values()) { for (List<? extends IQueryParameterType> nextAnd : nextParamName) { for (IQueryParameterType nextOr : nextAnd) { if (isNotBlank(nextOr.getQueryParameterQualifier())) { return false; } } } } return true; }
public QualifiedParamList(IQueryParameterOr<?> theNextOr, FhirContext theContext) { for (IQueryParameterType next : theNextOr.getValuesAsQueryTokens()) { if (myQualifier == null) { myQualifier = next.getQueryParameterQualifier(); } add(next.getValueAsQueryToken(theContext)); } }
if (isNotBlank(firstValue.getQueryParameterQualifier())) { b.append(firstValue.getQueryParameterQualifier());
private static int compare(FhirContext theCtx, IQueryParameterType theO1, IQueryParameterType theO2) { int retVal; if (theO1.getMissing() == null && theO2.getMissing() == null) { retVal = 0; } else if (theO1.getMissing() == null) { retVal = -1; } else if (theO2.getMissing() == null) { retVal = 1; } else if (ObjectUtil.equals(theO1.getMissing(), theO2.getMissing())) { retVal = 0; } else { if (theO1.getMissing()) { retVal = 1; } else { retVal = -1; } } if (retVal == 0) { String q1 = theO1.getQueryParameterQualifier(); String q2 = theO2.getQueryParameterQualifier(); retVal = StringUtils.compare(q1, q2); } if (retVal == 0) { String v1 = theO1.getValueAsQueryToken(theCtx); String v2 = theO2.getValueAsQueryToken(theCtx); retVal = StringUtils.compare(v1, v2); } return retVal; }
public QualifiedParamList(IQueryParameterOr<?> theNextOr, FhirContext theContext) { for (IQueryParameterType next : theNextOr.getValuesAsQueryTokens()) { if (myQualifier == null) { myQualifier = next.getQueryParameterQualifier(); } add(next.getValueAsQueryToken(theContext)); } }