@Override public Map<String, SearchFacetDTO> getNamedFacetMap(List<SearchFacetDTO> facets, final SearchCriteria searchCriteria) { return BLCMapUtils.keyedMap(facets, new TypedClosure<String, SearchFacetDTO>() { @Override public String getKey(SearchFacetDTO facet) { return getPropertyNameForIndexField(facet.getFacet().getFieldType().getIndexField(), FieldType.getInstance(facet.getFacet().getFacetFieldType())); } }); }
public Map<String, Property> getPMap() { if (pMap == null) { pMap = BLCMapUtils.keyedMap(properties, new TypedClosure<String, Property>() { @Override public String getKey(Property value) { return value.getName(); } }); } return pMap; }
public Map<String, Property> getPMap() { if (pMap == null) { pMap = BLCMapUtils.keyedMap(properties, new TypedClosure<String, Property>() { @Override public String getKey(Property value) { return value.getName(); } }); } return pMap; }
public static void addToCache(List<Translation> translations) { long threadId = Thread.currentThread().getId(); Map<String, Translation> threadlocalCache = getThreadlocalCache(); if (threadlocalCache == null) { threadlocalCache = new HashMap<String, Translation>(); } Map<String, Translation> additionalTranslations = BLCMapUtils.keyedMap(translations, new TypedClosure<String, Translation>() { @Override public String getKey(Translation translation) { return buildCacheKey(translation); } }); threadlocalCache.putAll(additionalTranslations); getCache().put(new Element(threadId, threadlocalCache)); }