Class DefaultModelLoader

  • All Implemented Interfaces:
    ModelLoader<java.lang.Object>

    public class DefaultModelLoader
    extends java.lang.Object
    implements ModelLoader<java.lang.Object>
    ModelLoader implementation for ProductModel.
    Gets information on ProductModels from given collection of SolrDocuments
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String getModelAttribute​(java.lang.String attribute, java.lang.Object model, PK pk)  
      protected PK getPKFromDocument​(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 of SolrDocuments
      java.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 of SolrDocuments
      void setModelService​(ModelService modelService)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultModelLoader

        public DefaultModelLoader()
    • Method Detail

      • loadModels

        public java.util.List<java.lang.Object> loadModels​(java.util.Collection<org.apache.solr.common.SolrDocument> documents)
                                                    throws ModelLoadingException
        Description copied from interface: ModelLoader
        Retrieves information on models that are contained within the collection of SolrDocuments
        Specified by:
        loadModels in interface ModelLoader<java.lang.Object>
        Throws:
        ModelLoadingException
      • loadCodes

        public java.util.List<java.lang.String> loadCodes​(java.util.Collection<org.apache.solr.common.SolrDocument> documents)
                                                   throws ModelLoadingException
        Description copied from interface: ModelLoader
        Retrieves codes of items contained within the collection of SolrDocuments
        Specified by:
        loadCodes in interface ModelLoader<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
      • setModelService

        public void setModelService​(ModelService modelService)