public function execute()
    {
        $repositoryResponse = [];
        $arrayOfObjects = [];
        $resultCount    = 0;
        $responseStatus = ResponseAbstract::STATUS_SUCCESS;

        try {
            $this->executeDataGateway();
            if ($this->repository != null) {
                $arrayOfObjects = $this->repository->getEntitiesFromResponse();
                $repositoryResponse = $this->repository->getResponse();
                $responseStatus = $this->repository->isResponseStatusSuccess() == true ?
                    ResponseAbstract::STATUS_SUCCESS :
                    ResponseAbstract::STATUS_FAIL;
            }
            else {
                $arrayOfObjects = [];
                $repositoryResponse = [];
            }

            $resultCount    = $this->getTotalResultCount();
        }
        catch (\Exception $e) {
            $responseStatus = ResponseAbstract::STATUS_FAIL;
            $this->response->setMessages(['No result was found']);
        }

        $this->response->setStatus($responseStatus);
        $this->response->setResult($arrayOfObjects);
        $this->response->setSourceResponse($repositoryResponse);
        $this->response->setTotalResultCount($resultCount);
    }