/*
(non-Javadoc)

@see ca.uhn.fhir.jpa.dao.ISearchParamExtractor#extractSearchParamStrings(ca.uhn.fhir.jpa.entity.ResourceTable,
ca.uhn.fhir.model.api.IResource)
7881
@Override
	public Set<ResourceIndexedSearchParamString> extractSearchParamStrings(ResourceTable theEntity, IBaseResource theResource) {
		HashSet<ResourceIndexedSearchParamString> retVal = new HashSet<ResourceIndexedSearchParamString>();

		String resourceName = getContext().getResourceDefinition(theResource).getName();

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

			String nextPath = nextSpDef.getPath();
			String nextSpName = nextSpDef.getName();

			if (isBlank(nextPath)) {

				// TODO: implement phonetic, and any others that have no path

				if ("Questionnaire".equals(resourceName) && nextSpDef.getName().equals("title")) {
					Questionnaire q = (Questionnaire) theResource;
					String title = q.getGroup().getTitle();
					addSearchTerm(theEntity, retVal, nextSpName, title);
				}
				continue;
			}

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

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

				if (nextObject instanceof IPrimitiveDatatype<?>) {
					IPrimitiveDatatype<?> nextValue = (IPrimitiveDatatype<?>) nextObject;
					String searchTerm = nextValue.getValueAsString();
					addSearchTerm(theEntity, retVal, nextSpName, searchTerm);
				} else {
					if (nextObject instanceof BaseHumanNameDt) {
						ArrayList<StringDt> allNames = new ArrayList<StringDt>();
						HumanNameDt nextHumanName = (HumanNameDt) nextObject;
						allNames.addAll(nextHumanName.getFamily());
						allNames.addAll(nextHumanName.getGiven());
						for (StringDt nextName : allNames) {
							addSearchTerm(theEntity, retVal, nextSpName, nextName.getValue());
						}
					} else if (nextObject instanceof AddressDt) {
						ArrayList<StringDt> allNames = new ArrayList<StringDt>();
						AddressDt nextAddress = (AddressDt) nextObject;
						allNames.addAll(nextAddress.getLine());
						allNames.add(nextAddress.getCityElement());
						allNames.add(nextAddress.getStateElement());
						allNames.add(nextAddress.getCountryElement());
						allNames.add(nextAddress.getPostalCodeElement());
						for (StringDt nextName : allNames) {
							addSearchTerm(theEntity, retVal, nextSpName, nextName.getValue());
						}
					} else if (nextObject instanceof ContactPointDt) {
						ContactPointDt nextContact = (ContactPointDt) nextObject;
						if (nextContact.getValueElement().isEmpty() == false) {
							addSearchTerm(theEntity, retVal, nextSpName, nextContact.getValue());
						}
					} else {
						if (!multiType) {
							throw new ConfigurationException("Search param " + nextSpName + " is of unexpected datatype: " + nextObject.getClass());
						}
					}
				}
			}
		}

		return retVal;
	}
1304489
public static IQueryParameterAnd<?> parseQueryParams(FhirContext theContext, RuntimeSearchParam theParamDef,
			String theUnqualifiedParamName, List<QualifiedParamList> theParameters) {
		RestSearchParameterTypeEnum paramType = theParamDef.getParamType();
		return parseQueryParams(theContext, paramType, theUnqualifiedParamName, theParameters);
	}
1189102
@SuppressWarnings("unchecked")
    @Override
    public Set<JsonEntityBean> search(String entityType, String searchTerm) {

        Set<JsonEntityBean> results = new HashSet<>();

        EntityEnum entityEnum = EntityEnum.getEntityEnum(entityType);
        if (entityEnum == null) {
            throw new IllegalArgumentException(
                    String.format("Parameter entityType has an unknown value of [%s]", entityType));
        }

        EntityIdentifier[] identifiers;

        Class identifierType;

        // if the entity type is a group, use the group service's findGroup method
        // to locate it
        if (entityEnum.isGroup()) {
            identifiers =
                    GroupService.searchForGroups(
                            searchTerm,
                            GroupService.SearchMethod.CONTAINS_CI,
                            entityEnum.getClazz());
            identifierType = IEntityGroup.class;
        }

        // otherwise use the getGroupMember method
        else {
            identifiers =
                    GroupService.searchForEntities(
                            searchTerm,
                            GroupService.SearchMethod.CONTAINS_CI,
                            entityEnum.getClazz());
            identifierType = entityEnum.getClazz();
        }

        for (int i = 0; i < identifiers.length; i++) {
            if (identifiers[i].getType().equals(identifierType)) {
                IGroupMember entity = GroupService.getGroupMember(identifiers[i]);
                if (entity != null) {
                    JsonEntityBean jsonBean = getEntity(entity);
                    results.add(jsonBean);
                } else {
                    log.warn("Grouper member entity of " + identifiers[i].getKey() + " is null.");
                }
            }
        }

        return results;
    }
929761
private Set<Resource> extractRelationshipField(List<Resource> sourceResources, ResourceField relationshipField, QueryAdapter queryAdapter, Map<ResourceIdentifier, Resource> resourceMap,
			Map<ResourceIdentifier, Object> entityMap, boolean lookUp) {
		Set<Resource> loadedEntities = new HashSet<>();
		for (Resource sourceResource : sourceResources) {
			ResourceIdentifier id = sourceResource.toIdentifier();

			Object source = entityMap.get(id);
			if (source != null && !(source instanceof Resource)) {
				Object targetEntity = PropertyUtils.getProperty(source, relationshipField.getUnderlyingName());

				if (!lookUp && Iterable.class.isAssignableFrom(relationshipField.getType()) && targetEntity == null) {
					throw new InternalServerErrorException(id + " relationship field collection '" + relationshipField.getJsonName() + "' can not be null. Either set the relationship as an empty "
							+ Iterable.class.getCanonicalName() + " or add annotation @" + JsonApiLookupIncludeAutomatically.class.getCanonicalName());
				}
				if (targetEntity == null) {
					continue;
				}
				List<Resource> targetIds = setupRelation(sourceResource, relationshipField, targetEntity, queryAdapter, resourceMap, entityMap);
				loadedEntities.addAll(targetIds);
			}
		}
		return loadedEntities;
	}
1271667
@Override
	protected List<Object> extractValues(String thePaths, IBaseResource theResource) {
		FHIRPathEngine fp = new FHIRPathEngine(myWorkerContext);

		List<Object> values = new ArrayList<>();
		String[] nextPathsSplit = SPLIT.split(thePaths);
		for (String nextPath : nextPathsSplit) {
			List<Base> allValues;
			try {
				allValues = fp.evaluate((Base) theResource, trim(nextPath));
			} catch (FHIRException e) {
				String msg = getContext().getLocalizer().getMessage(BaseSearchParamExtractor.class, "failedToExtractPaths", nextPath, e.toString());
				throw new InternalErrorException(msg, e);
			}
			if (allValues.isEmpty() == false) {
				values.addAll(allValues);
			}
		}

		for (int i = 0; i < values.size(); i++) {
			Object nextObject = values.get(i);
			if (nextObject instanceof Extension) {
				Extension nextExtension = (Extension) nextObject;
				nextObject = nextExtension.getValue();
				values.set(i, nextObject);
			}
		}

		return values;
	}
1068926
@Override
	public Set<BaseResourceIndexedSearchParam> extractSearchParamTokens(ResourceTable theEntity, IBaseResource theResource) {
		HashSet<BaseResourceIndexedSearchParam> retVal = new HashSet<BaseResourceIndexedSearchParam>();

		String useSystem = null;
		if (theResource instanceof ValueSet) {
			ValueSet vs = (ValueSet) theResource;
			useSystem = vs.getCodeSystem().getSystem();
		}

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

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

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

			List<String> systems = new ArrayList<String>();
			List<String> codes = new ArrayList<String>();

			String needContactPointSystem = null;
			if (nextPath.endsWith("(system=phone)")) {
				nextPath = nextPath.substring(0, nextPath.length() - "(system=phone)".length());
				needContactPointSystem = "phone";
			}
			if (nextPath.endsWith("(system=email)")) {
				nextPath = nextPath.substring(0, nextPath.length() - "(system=email)".length());
				needContactPointSystem = "email";
			}

			for (Object nextObject : extractValues(nextPath, theResource)) {

				// Patient:language
				if (nextObject instanceof Patient.Communication) {
					Communication nextValue = (Patient.Communication) nextObject;
					nextObject = nextValue.getLanguage();
				}

				if (nextObject instanceof IdentifierDt) {
					IdentifierDt nextValue = (IdentifierDt) nextObject;
					if (nextValue.isEmpty()) {
						continue;
					}
					String system = StringUtils.defaultIfBlank(nextValue.getSystemElement().getValueAsString(), null);
					String value = nextValue.getValueElement().getValue();
					if (isNotBlank(value)) {
						systems.add(system);
						codes.add(value);
					}

					if (isNotBlank(nextValue.getType().getText())) {
						addStringParam(theEntity, retVal, nextSpDef, nextValue.getType().getText());
					}

				} else if (nextObject instanceof ContactPointDt) {
					ContactPointDt nextValue = (ContactPointDt) nextObject;
					if (nextValue.isEmpty()) {
						continue;
					}
					if (isNotBlank(needContactPointSystem)) {
						if (!needContactPointSystem.equals(nextValue.getSystemElement().getValueAsString())) {
							continue;
						}
					}
					systems.add(nextValue.getSystemElement().getValueAsString());
					codes.add(nextValue.getValueElement().getValue());
				} else if (nextObject instanceof BoundCodeDt) {
					BoundCodeDt<?> obj = (BoundCodeDt<?>) nextObject;
					String system = extractSystem(obj);
					String code = obj.getValue();
					if (isNotBlank(code)) {
						systems.add(system);
						codes.add(code);
					}
				} else if (nextObject instanceof IPrimitiveDatatype<?>) {
					IPrimitiveDatatype<?> nextValue = (IPrimitiveDatatype<?>) nextObject;
					if (nextValue.isEmpty()) {
						continue;
					}
					if ("ValueSet.codeSystem.concept.code".equals(nextPath)) {
						systems.add(useSystem);
					} else {
						systems.add(null);
					}
					codes.add(nextValue.getValueAsString());
				} else if (nextObject instanceof CodingDt) {
					CodingDt nextValue = (CodingDt) nextObject;
					extractTokensFromCoding(systems, codes, theEntity, retVal, nextSpDef, nextValue);
				} else if (nextObject instanceof CodeableConceptDt) {
					CodeableConceptDt nextCC = (CodeableConceptDt) nextObject;
					if (!nextCC.getTextElement().isEmpty()) {
						addStringParam(theEntity, retVal, nextSpDef, nextCC.getTextElement().getValue());
					}

					extractTokensFromCodeableConcept(systems, codes, nextCC, theEntity, retVal, nextSpDef);
				} else if (nextObject instanceof RestSecurity) {
					// Conformance.security search param points to something kind of useless right now - This should probably
					// be fixed.
					RestSecurity sec = (RestSecurity) nextObject;
					for (BoundCodeableConceptDt<RestfulSecurityServiceEnum> nextCC : sec.getService()) {
						extractTokensFromCodeableConcept(systems, codes, nextCC, theEntity, retVal, nextSpDef);
					}
				} else if (nextObject instanceof Location.Position) {
					ourLog.warn("Position search not currently supported, not indexing location");
					continue;
				} else {
					if (!multiType) {
						throw new ConfigurationException("Search param " + nextSpDef.getName() + " is of unexpected datatype: " + nextObject.getClass());
					} else {
						continue;
					}
				}
			}

			assert systems.size() == codes.size() : "Systems contains " + systems + ", codes contains: " + codes;

			Set<Pair<String, String>> haveValues = new HashSet<Pair<String, String>>();
			for (int i = 0; i < systems.size(); i++) {
				String system = systems.get(i);
				String code = codes.get(i);
				if (isBlank(system) && isBlank(code)) {
					continue;
				}

				if (system != null && system.length() > ResourceIndexedSearchParamToken.MAX_LENGTH) {
					system = system.substring(0, ResourceIndexedSearchParamToken.MAX_LENGTH);
				}
				if (code != null && code.length() > ResourceIndexedSearchParamToken.MAX_LENGTH) {
					code = code.substring(0, ResourceIndexedSearchParamToken.MAX_LENGTH);
				}

				Pair<String, String> nextPair = Pair.of(system, code);
				if (haveValues.contains(nextPair)) {
					continue;
				}
				haveValues.add(nextPair);

				ResourceIndexedSearchParamToken nextEntity;
				nextEntity = new ResourceIndexedSearchParamToken(nextSpDef.getName(), system, code);
				nextEntity.setResource(theEntity);
				retVal.add(nextEntity);

			}

		}

		return retVal;
	}
839547
private void searchProperties(List<CmsResource> resources) {

        if (CmsSourceSearchForm.REGEX_ALL.equals(m_settings.getSearchpattern())) {
            for (CmsResource resource : resources) {
                m_matchedResources.add(resource);
                getReport().println(
                    Messages.get().container(Messages.RPT_SOURCESEARCH_MATCHED_0),
                    I_CmsReport.FORMAT_OK);
            }

        } else {
            for (CmsResource resource : resources) {
                Matcher matcher;
                try {
                    CmsProperty prop = getCms().readPropertyObject(resource, m_settings.getProperty().getName(), false);
                    matcher = Pattern.compile(m_settings.getSearchpattern()).matcher(prop.getValue());
                    if (matcher.find()) {
                        m_matchedResources.add(resource);
                        getReport().println(
                            Messages.get().container(Messages.RPT_SOURCESEARCH_MATCHED_0),
                            I_CmsReport.FORMAT_OK);
                    } else {
                        getReport().println(
                            Messages.get().container(Messages.RPT_SOURCESEARCH_NOT_MATCHED_0),
                            I_CmsReport.FORMAT_NOTE);
                    }

                } catch (CmsException e) {
                    LOG.error("Ubable to read property", e);
                }
            }
        }
        if (m_replace) {
            replaceProperties(m_matchedResources);
        }
        // report results
        reportResults(resources.size());
    }
754926
public Map<String, String> getUriVariablesForSearch(BullhornEntityInfo entityInfo, String query, Set<String> fieldSet, SearchParams params) {

		Map<String, String> uriVariables = params.getParameterMap();

		this.addCommonUriVariables(fieldSet, entityInfo, uriVariables);
		uriVariables.put(QUERY, query);

		return uriVariables;
	}
37845
@Override
	public Set<String> getResourcePaths(final String name) {
		final String normalizedname = Path.normalizeResourcePath(name);
		LOG.debug("Searching bundle [" + bundle + "] for resource paths of ["
				+ normalizedname + "]");
		final Enumeration<String> entryPaths = bundle
				.getEntryPaths(normalizedname);
		if (entryPaths == null || !entryPaths.hasMoreElements()) {
			return null;
		}
		Set<String> foundPaths = new HashSet<>();
		while (entryPaths.hasMoreElements()) {
			foundPaths.add(entryPaths.nextElement());
		}
		return foundPaths;
	}
1074189
public static String parseQueryFields(UriInfo uriInfo) {
        List<String> selectables = uriInfo.getQueryParameters()
                .get(EntityFieldsScopeResolver.FIELDS_PARAM_NAME);
        StringBuilder builder = new StringBuilder();
        if (selectables != null) {
            for (int i = 0; i < selectables.size(); i++) {
                String s = selectables.get(i);
                if (StringUtils.isNotBlank(s)) {
                    if (!s.startsWith("(")) {
                        builder.append("(");
                    }
                    builder.append(s);
                    if (!s.endsWith(")")) {
                        builder.append(")");
                    }
                    if (i < selectables.size() - 1) {
                        builder.append(":");
                    }
                }
            }
        }
        return builder.length() == 0 ? null : builder.toString();
    }
761607
private void processResources()
   {
      FastTrackTable table = m_data.getTable(FastTrackTableType.RESOURCES);
      for (MapRow row : table)
      {
         int uniqueID = row.getInt(ResourceField.RESOURCE_ID);
         if (uniqueID <= 0)
         {
            continue;
         }

         Resource resource = m_project.addResource();
         resource.setCode(row.getString(ResourceField.CODE));
         resource.setCostPerUse(row.getCurrency(ResourceField.PER_USE_COST));
         resource.setEmailAddress(row.getString(ResourceField.EMAIL_ADDRESS));
         resource.setFlag(1, row.getBoolean(ResourceField.FLAG_1));
         resource.setFlag(2, row.getBoolean(ResourceField.FLAG_2));
         resource.setFlag(3, row.getBoolean(ResourceField.FLAG_3));
         resource.setFlag(4, row.getBoolean(ResourceField.FLAG_4));
         resource.setFlag(5, row.getBoolean(ResourceField.FLAG_5));
         resource.setFlag(6, row.getBoolean(ResourceField.FLAG_6));
         resource.setFlag(7, row.getBoolean(ResourceField.FLAG_7));
         resource.setFlag(8, row.getBoolean(ResourceField.FLAG_8));
         resource.setFlag(9, row.getBoolean(ResourceField.FLAG_9));
         resource.setFlag(10, row.getBoolean(ResourceField.FLAG_10));
         resource.setFlag(11, row.getBoolean(ResourceField.FLAG_11));
         resource.setFlag(12, row.getBoolean(ResourceField.FLAG_12));
         resource.setFlag(13, row.getBoolean(ResourceField.FLAG_13));
         resource.setFlag(14, row.getBoolean(ResourceField.FLAG_14));
         resource.setFlag(15, row.getBoolean(ResourceField.FLAG_15));
         resource.setFlag(16, row.getBoolean(ResourceField.FLAG_16));
         resource.setFlag(17, row.getBoolean(ResourceField.FLAG_17));
         resource.setFlag(18, row.getBoolean(ResourceField.FLAG_18));
         resource.setFlag(19, row.getBoolean(ResourceField.FLAG_19));
         resource.setFlag(20, row.getBoolean(ResourceField.FLAG_20));
         resource.setGroup(row.getString(ResourceField.GROUP));
         resource.setGUID(row.getUUID(ResourceField._RESOURCE_GUID));
         resource.setInitials(row.getString(ResourceField.INITIALS));
         resource.setMaterialLabel(row.getString(ResourceField.MATERIAL_LABEL));
         resource.setName(row.getString(ResourceField.RESOURCE_NAME));
         resource.setNotes(row.getString(ResourceField.RESOURCE_NOTES));
         resource.setNumber(1, row.getDouble(ResourceField.NUMBER_1));
         resource.setNumber(2, row.getDouble(ResourceField.NUMBER_2));
         resource.setNumber(3, row.getDouble(ResourceField.NUMBER_3));
         resource.setNumber(4, row.getDouble(ResourceField.NUMBER_4));
         resource.setNumber(5, row.getDouble(ResourceField.NUMBER_5));
         resource.setNumber(6, row.getDouble(ResourceField.NUMBER_6));
         resource.setNumber(7, row.getDouble(ResourceField.NUMBER_7));
         resource.setNumber(8, row.getDouble(ResourceField.NUMBER_8));
         resource.setNumber(9, row.getDouble(ResourceField.NUMBER_9));
         resource.setNumber(10, row.getDouble(ResourceField.NUMBER_10));
         resource.setNumber(11, row.getDouble(ResourceField.NUMBER_11));
         resource.setNumber(12, row.getDouble(ResourceField.NUMBER_12));
         resource.setNumber(13, row.getDouble(ResourceField.NUMBER_13));
         resource.setNumber(14, row.getDouble(ResourceField.NUMBER_14));
         resource.setNumber(15, row.getDouble(ResourceField.NUMBER_15));
         resource.setNumber(16, row.getDouble(ResourceField.NUMBER_16));
         resource.setNumber(17, row.getDouble(ResourceField.NUMBER_17));
         resource.setNumber(18, row.getDouble(ResourceField.NUMBER_18));
         resource.setNumber(19, row.getDouble(ResourceField.NUMBER_19));
         resource.setNumber(20, row.getDouble(ResourceField.NUMBER_20));
         resource.setText(1, row.getString(ResourceField.TEXT_1));
         resource.setText(2, row.getString(ResourceField.TEXT_2));
         resource.setText(3, row.getString(ResourceField.TEXT_3));
         resource.setText(4, row.getString(ResourceField.TEXT_4));
         resource.setText(5, row.getString(ResourceField.TEXT_5));
         resource.setText(6, row.getString(ResourceField.TEXT_6));
         resource.setText(7, row.getString(ResourceField.TEXT_7));
         resource.setText(8, row.getString(ResourceField.TEXT_8));
         resource.setText(9, row.getString(ResourceField.TEXT_9));
         resource.setText(10, row.getString(ResourceField.TEXT_10));
         resource.setText(11, row.getString(ResourceField.TEXT_11));
         resource.setText(12, row.getString(ResourceField.TEXT_12));
         resource.setText(13, row.getString(ResourceField.TEXT_13));
         resource.setText(14, row.getString(ResourceField.TEXT_14));
         resource.setText(15, row.getString(ResourceField.TEXT_15));
         resource.setText(16, row.getString(ResourceField.TEXT_16));
         resource.setText(17, row.getString(ResourceField.TEXT_17));
         resource.setText(18, row.getString(ResourceField.TEXT_18));
         resource.setText(19, row.getString(ResourceField.TEXT_19));
         resource.setText(20, row.getString(ResourceField.TEXT_20));
         resource.setText(21, row.getString(ResourceField.TEXT_21));
         resource.setText(22, row.getString(ResourceField.TEXT_22));
         resource.setText(23, row.getString(ResourceField.TEXT_23));
         resource.setText(24, row.getString(ResourceField.TEXT_24));
         resource.setText(25, row.getString(ResourceField.TEXT_25));
         resource.setText(26, row.getString(ResourceField.TEXT_26));
         resource.setText(27, row.getString(ResourceField.TEXT_27));
         resource.setText(28, row.getString(ResourceField.TEXT_28));
         resource.setText(29, row.getString(ResourceField.TEXT_29));
         resource.setText(30, row.getString(ResourceField.TEXT_30));
         resource.setUniqueID(Integer.valueOf(uniqueID));
         m_eventManager.fireResourceReadEvent(resource);
      }
   }
1095818
static public String extractStringResult(ResultSet rs, ResultSetMetaData rsmd, int index) throws Exception {

		int count = rsmd.getColumnCount();
		if( index > count || index < 1 ) {
			throw new Exception("Invalid index");
		}
		
		int type = rsmd.getColumnType(index);
		switch (type) {
			case java.sql.Types.VARCHAR:
			case java.sql.Types.CHAR:
				return rs.getString(index);
		}

		throw new Exception("Column type ("+type+") invalid for a string at index: "+index);
	}
871878
@SuppressWarnings("unchecked")
	private IResource[] getSelectedResources(IStructuredSelection selection) {
		ArrayList<Object> selectedResources = new ArrayList<Object>();

		for (Iterator<Object> i = selection.iterator(); i.hasNext();) {
			Object o = i.next();
			if (o instanceof IResource) {
				selectedResources.add(o);
			} else if (o instanceof IAdaptable) {
				IAdaptable a = (IAdaptable) o;
				IResource r = (IResource) a.getAdapter(IResource.class);
				if (r != null) {
					selectedResources.add(r);
				}
			}
		}
		return (IResource[]) selectedResources
				.toArray(new IResource[selectedResources.size()]);
	}
37409
@Override
    public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
        Cursor result = null;

        if (!controller.hasPreinitialized()) {
            throw new IllegalStateException("Controller has not been initialized.");
        }

        int patternCode = controller.getUriMatcher().match(uri);
        MatcherPattern pattern = controller.findMatcherPattern(patternCode);
        if (pattern == null) {
            throw new IllegalArgumentException("unknown uri : " + uri.toString());
        }

        Parameter parameter = new Parameter(uri, projection, selection, selectionArgs, sortOrder);
        SQLiteDatabase db = this.getHelper().getReadableDatabase();

        result = onQuery(this.getHelper(), db, pattern, parameter);
        if (result != null) {
            this.onQueryCompleted(result, uri, pattern, parameter);
        }
        return result;
    }
434222
public static String parseSource(ResourceInfo resourceInfo) {
        if (resourceInfo != null) {
            Class clazz = resourceInfo.getResourceClass();
            if (clazz != null)
                return ClassUtils.toString(clazz, resourceInfo.getResourceMethod());
        }
        return null;
    }
233711
protected void setResourcesParam(List<String> resources) {

        m_collectorParameter += I_CmsListResourceCollector.SEP_PARAM
            + I_CmsListResourceCollector.PARAM_RESOURCES
            + I_CmsListResourceCollector.SEP_KEYVAL;
        if (resources == null) {
            // search anywhere
            m_collectorParameter += "/";
        } else {
            m_collectorParameter += CmsStringUtil.collectionAsString(resources, "#");
        }
    }
551526
public Map<String, String> getUriVariablesForIdSearch(BullhornEntityInfo entityInfo,
                                                                 String query,
                                                                 SearchParams params) {

        Map<String, String> uriVariables = params.getParameterMap();

        uriVariables.put(BH_REST_TOKEN, bullhornApiRest.getBhRestToken());
        uriVariables.put(ENTITY_TYPE, entityInfo.getName());
        uriVariables.put(QUERY, query);

        return uriVariables;
    }