@Override
	public Set<ResourceIndexedSearchParamQuantity> extractSearchParamQuantity(ResourceTable theEntity, IBaseResource theResource) {
		HashSet<ResourceIndexedSearchParamQuantity> retVal = new HashSet<ResourceIndexedSearchParamQuantity>();

		Collection<RuntimeSearchParam> searchParams = getSearchParams(theResource);
		for (RuntimeSearchParam nextSpDef : searchParams) {
			if (nextSpDef.getParamType() != RestSearchParameterTypeEnum.QUANTITY) {
				continue;
			}

			String nextPath = nextSpDef.getPath();
			if (isBlank(nextPath)) {
				continue;
			}

			for (Object nextObject : extractValues(nextPath, theResource)) {
				if (nextObject == null || ((IBase) nextObject).isEmpty()) {
					continue;
				}

				String resourceName = nextSpDef.getName();
				boolean multiType = false;
				if (nextPath.endsWith("[x]")) {
					multiType = true;
				}

				if (nextObject instanceof Quantity) {
					Quantity nextValue = (Quantity) nextObject;
					addQuantity(theEntity, retVal, resourceName, nextValue);
				} else if (nextObject instanceof Range) {
					Range nextValue = (Range) nextObject;
					addQuantity(theEntity, retVal, resourceName, nextValue.getLow());
					addQuantity(theEntity, retVal, resourceName, nextValue.getHigh());
				} else if (nextObject instanceof LocationPositionComponent) {
					continue;
				} else {
					if (!multiType) {
						throw new ConfigurationException("Search param " + resourceName + " is of unexpected datatype: " + nextObject.getClass());
					} else {
						continue;
					}
				}
			}
		}

		return retVal;
	}
@ Override public Set < ResourceIndexedSearchParamQuantity > extractSearchParamQuantity ( ResourceTable theEntity , IBaseResource theResource ) { HashSet < ResourceIndexedSearchParamQuantity > retVal = new HashSet < ResourceIndexedSearchParamQuantity > ( ) ; Collection < RuntimeSearchParam > searchParams = getSearchParams ( theResource ) ; for ( RuntimeSearchParam nextSpDef : searchParams ) { if ( nextSpDef . getParamType ( ) != RestSearchParameterTypeEnum . QUANTITY ) { continue ; } String nextPath = nextSpDef . getPath ( ) ; if ( isBlank ( nextPath ) ) { continue ; } for ( Object nextObject : extractValues ( nextPath , theResource ) ) { if ( nextObject == null || ( ( IBase ) nextObject ) . isEmpty ( ) ) { continue ; } String resourceName = nextSpDef . getName ( ) ; boolean multiType = false ; if ( nextPath . endsWith ( "[x]" ) ) { multiType = true ; } if ( nextObject instanceof Quantity ) { Quantity nextValue = ( Quantity ) nextObject ; addQuantity ( theEntity , retVal , resourceName , nextValue ) ; } else if ( nextObject instanceof Range ) { Range nextValue = ( Range ) nextObject ; addQuantity ( theEntity , retVal , resourceName , nextValue . getLow ( ) ) ; addQuantity ( theEntity , retVal , resourceName , nextValue . getHigh ( ) ) ; } else if ( nextObject instanceof LocationPositionComponent ) { continue ; } else { if ( ! multiType ) { throw new ConfigurationException ( "Search param " + resourceName + " is of unexpected datatype: " + nextObject . getClass ( ) ) ; } else { continue ; } } } } return retVal ; }
/*
(non-Javadoc)

@see ca.uhn.fhir.jpa.dao.ISearchParamExtractor#extractSearchParamQuantity(ca.uhn.fhir.jpa.entity.ResourceTable, ca.uhn.fhir.model.api.IBaseResource)