Class DefaultModelLoader
- java.lang.Object
-
- de.hybris.platform.solrfacetsearch.loader.impl.DefaultModelLoader
-
- All Implemented Interfaces:
ModelLoader<java.lang.Object>
public class DefaultModelLoader extends java.lang.Object implements ModelLoader<java.lang.Object>
ModelLoader implementation forProductModel.
Gets information on ProductModels from given collection ofSolrDocuments
-
-
Constructor Summary
Constructors Constructor Description DefaultModelLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringgetModelAttribute(java.lang.String attribute, java.lang.Object model, PK pk)protected PKgetPKFromDocument(org.apache.solr.common.SolrDocument doc)java.util.List<java.lang.String>loadCodes(java.util.Collection<org.apache.solr.common.SolrDocument> documents)Retrieves codes of items contained within the collection ofSolrDocumentsjava.util.List<java.lang.Object>loadModels(java.util.Collection<org.apache.solr.common.SolrDocument> documents)Retrieves information on models that are contained within the collection ofSolrDocumentsvoidsetModelService(ModelService modelService)
-
-
-
Method Detail
-
loadModels
public java.util.List<java.lang.Object> loadModels(java.util.Collection<org.apache.solr.common.SolrDocument> documents) throws ModelLoadingExceptionDescription copied from interface:ModelLoaderRetrieves information on models that are contained within the collection ofSolrDocuments- Specified by:
loadModelsin interfaceModelLoader<java.lang.Object>- Throws:
ModelLoadingException
-
loadCodes
public java.util.List<java.lang.String> loadCodes(java.util.Collection<org.apache.solr.common.SolrDocument> documents) throws ModelLoadingExceptionDescription copied from interface:ModelLoaderRetrieves codes of items contained within the collection ofSolrDocuments- Specified by:
loadCodesin interfaceModelLoader<java.lang.Object>- Returns:
- Codes of items as Strings
- Throws:
ModelLoadingException
-
getModelAttribute
protected java.lang.String getModelAttribute(java.lang.String attribute, java.lang.Object model, PK pk) throws ModelLoadingException- Parameters:
attribute-model-pk-- Returns:
- string
- Throws:
ModelLoadingException
-
getPKFromDocument
protected PK getPKFromDocument(org.apache.solr.common.SolrDocument doc) throws ModelLoadingException
- Parameters:
doc-- Returns:
- PK
- Throws:
ModelLoadingException
-
setModelService
public void setModelService(ModelService modelService)
-
-