public function loadData($printQuery = false, $logQuery = false)
    {
        if (!$this->isLoaded()) {
            $searchCriteria = $this->getSearchCriteria();
            $searchResults = $this->stockistRepository->getList($searchCriteria);
            $this->_totalRecords = $searchResults->getTotalCount();
            /** @var StockistInterface[] $stockists */
            $stockists = $searchResults->getItems();
            foreach ($stockists as $stockist) {
                $stockistItem = new DataObject();
                $stockistItem->addData(
                    $this->simpleDataObjectConverter->toFlatArray($stockist, StockistInterface::class)
                );
                $this->_addItem($stockistItem);
            }
            $this->_setIsLoaded();
        }
        return $this;
    }
public function loadData($printQuery = false, $logQuery = false)
    {
        if (!$this->isLoaded()) {
            $searchCriteria = $this->getSearchCriteria();
            $searchResults = $this->stockistRepository->getList($searchCriteria);
            $this->_totalRecords = $searchResults->getTotalCount();
            /** @var StockistInterface[] $stockists */
            $stockists = $searchResults->getItems();
            foreach ($stockists as $stockist) {
                $stockistItem = new DataObject();
                $stockistItem->addData(
                    $this->simpleDataObjectConverter->toFlatArray($stockist, StockistInterface::class)
                );
                $this->_addItem($stockistItem);
            }
            $this->_setIsLoaded();
        }
        return $this;
    }
public function loadData ( $ printQuery = false , $ logQuery = false ) { if ( ! $ this -> isLoaded ( ) ) { $ searchCriteria = $ this -> getSearchCriteria ( ) ; $ searchResults = $ this -> stockistRepository -> getList ( $ searchCriteria ) ; $ this -> _totalRecords = $ searchResults -> getTotalCount ( ) ; /** @var StockistInterface[] $stockists */ $ stockists = $ searchResults -> getItems ( ) ; foreach ( $ stockists as $ stockist ) { $ stockistItem = new DataObject ( ) ; $ stockistItem -> addData ( $ this -> simpleDataObjectConverter -> toFlatArray ( $ stockist , StockistInterface :: class ) ) ; $ this -> _addItem ( $ stockistItem ) ; } $ this -> _setIsLoaded ( ) ; } return $ this ; }
Load customer group collection data from service

@param bool $printQuery
@param bool $logQuery
@return $this
@SuppressWarnings(PHPMD.UnusedFormalParameter)
Load customer group collection data from service