loadQuery(PointSaleDistributionRepositoryQuery::class); } public function getDefaultOptionsSearch(): array { return [ self::WITH => ['distribution', 'pointSale'], self::JOIN_WITH => [], self::ORDER_BY => '', self::ATTRIBUTE_ID_PRODUCER => '' ]; } public function findOnePointSaleDistribution(Distribution $distribution, PointSale $pointSale): ?PointSaleDistribution { return $this->createDefaultQuery() ->filterByDistribution($distribution) ->filterByPointSale($pointSale) ->findOne(); } public function findPointSaleDistributionsByDistribution(Distribution $distribution): array { return $this->createDefaultQuery() ->filterByDistribution($distribution) ->find(); } public function countPointSaleDistributionsByDistribution(Distribution $distribution): int { return $this->createDefaultQuery() ->filterByDistribution($distribution) ->count(); } }