@Override String doGetValueAsQueryToken(FhirContext theContext) { StringBuilder b = new StringBuilder(); if (myLeftType != null) { b.append(myLeftType.getValueAsQueryToken(theContext)); } b.append('$'); if (myRightType != null) { b.append(myRightType.getValueAsQueryToken(theContext)); } return b.toString(); }
@SuppressWarnings("unchecked") @Override public QUERY where(Map<String, List<IQueryParameterType>> theCriterion) { Validate.notNull(theCriterion, "theCriterion must not be null"); for (Entry<String, List<IQueryParameterType>> nextEntry : theCriterion.entrySet()) { String nextKey = nextEntry.getKey(); List<IQueryParameterType> nextValues = nextEntry.getValue(); for (IQueryParameterType nextValue : nextValues) { addParam(myParams, nextKey, nextValue.getValueAsQueryToken(myContext)); } } return (QUERY) this; }
private void addParam(String theName, IQueryParameterType theValue) { IPrimitiveType<?> stringType = ParametersUtil.createString(myContext, theValue.getValueAsQueryToken(myContext)); addParam(theName, stringType); }
@Override public Object outgoingClient(Object theObject) { IQueryParameterType obj = (IQueryParameterType) theObject; IPrimitiveType<?> retVal = (IPrimitiveType<?>) myContext.getElementDefinition("string").newInstance(); retVal.setValueAsString(obj.getValueAsQueryToken(myContext)); return retVal; }
public QualifiedParamList(IQueryParameterOr<?> theNextOr, FhirContext theContext) { for (IQueryParameterType next : theNextOr.getValuesAsQueryTokens()) { if (myQualifier == null) { myQualifier = next.getQueryParameterQualifier(); } add(next.getValueAsQueryToken(theContext)); } }
@Override public Object outgoingClient(Object theObject) { IQueryParameterType obj = (IQueryParameterType) theObject; IPrimitiveType<?> retVal = (IPrimitiveType<?>) myContext.getElementDefinition("string").newInstance(); retVal.setValueAsString(obj.getValueAsQueryToken(myContext)); return retVal; }
Set<Long> orPids = new HashSet<>(); for (IQueryParameterType next : nextValue) { String value = next.getValueAsQueryToken(myContext); if (value != null && value.startsWith("|")) { value = value.substring(1);
params.add(nextValueList); for (IQueryParameterType nextOr : nextAnd) { String nextOrValue = nextOr.getValueAsQueryToken(myContext); nextOrValue = UrlUtil.escapeUrlParam(nextOrValue); nextValueList.add(nextParamName + "=" + nextOrValue);
if (nextValueOrIn.getMissing() != null || isNotBlank(nextValueOrIn.getValueAsQueryToken(theCtx))) { nextValuesOrsOut.add(nextValueOrIn); b.append(','); String valueAsQueryToken = nextValueOr.getValueAsQueryToken(theCtx);
if (nextParam.getParamName().equals(nextCompositeOf.getName())) { IQueryParameterType nextParamAsClientParam = nextParam.toQueryParameterType(); String value = nextParamAsClientParam.getValueAsQueryToken(myContext); if (isNotBlank(value)) { value = UrlUtil.escapeUrlParam(value);
String nextValue = next.getValueAsQueryToken(myContext); IQueryParameterType chainValue = mapReferenceChainToRawParamType(remainingChain, param, theParamName, qualifier, nextType, chain, isMeta, nextValue); if (chainValue == null) {
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; }
case STARTS_AFTER: default: String msg = myContext.getLocalizer().getMessage(SearchBuilder.class, invalidMessageName, thePrefix.getValue(), theParam.getValueAsQueryToken(myContext)); throw new InvalidRequestException(msg);
@Override String doGetValueAsQueryToken(FhirContext theContext) { StringBuilder b = new StringBuilder(); if (myLeftType != null) { b.append(myLeftType.getValueAsQueryToken(theContext)); } b.append('$'); if (myRightType != null) { b.append(myRightType.getValueAsQueryToken(theContext)); } return b.toString(); }
@SuppressWarnings("unchecked") @Override public QUERY where(Map<String, List<IQueryParameterType>> theCriterion) { Validate.notNull(theCriterion, "theCriterion must not be null"); for (Entry<String, List<IQueryParameterType>> nextEntry : theCriterion.entrySet()) { String nextKey = nextEntry.getKey(); List<IQueryParameterType> nextValues = nextEntry.getValue(); for (IQueryParameterType nextValue : nextValues) { addParam(myParams, nextKey, nextValue.getValueAsQueryToken(myContext)); } } return (QUERY) this; }
private void addParam(String theName, IQueryParameterType theValue) { IPrimitiveType<?> stringType = ParametersUtil.createString(myContext, theValue.getValueAsQueryToken(myContext)); addParam(theName, stringType); }
@Override public Object outgoingClient(Object theObject) { IQueryParameterType obj = (IQueryParameterType) theObject; IPrimitiveType<?> retVal = (IPrimitiveType<?>) myContext.getElementDefinition("string").newInstance(); retVal.setValueAsString(obj.getValueAsQueryToken(myContext)); return retVal; }
public QualifiedParamList(IQueryParameterOr<?> theNextOr, FhirContext theContext) { for (IQueryParameterType next : theNextOr.getValuesAsQueryTokens()) { if (myQualifier == null) { myQualifier = next.getQueryParameterQualifier(); } add(next.getValueAsQueryToken(theContext)); } }
@Override public Object outgoingClient(Object theObject) { IQueryParameterType obj = (IQueryParameterType) theObject; IPrimitiveType<?> retVal = (IPrimitiveType<?>) myContext.getElementDefinition("string").newInstance(); retVal.setValueAsString(obj.getValueAsQueryToken(myContext)); return retVal; }
Set<Long> orPids = new HashSet<>(); for (IQueryParameterType next : nextValue) { String value = next.getValueAsQueryToken(myContext); if (value != null && value.startsWith("|")) { value = value.substring(1);