-
-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathExportEntityRepositoryInterface.php
69 lines (62 loc) · 1.97 KB
/
ExportEntityRepositoryInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/**
* Copyright © OpenGento, All rights reserved.
* See LICENSE bundled with this library for license details.
*/
declare(strict_types=1);
namespace Opengento\Gdpr\Api;
use Magento\Framework\Api\SearchCriteriaInterface;
use Magento\Framework\Api\SearchResultsInterface;
use Magento\Framework\Exception\CouldNotDeleteException;
use Magento\Framework\Exception\CouldNotSaveException;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Exception\NoSuchEntityException;
use Opengento\Gdpr\Api\Data\ExportEntityInterface;
use Opengento\Gdpr\Api\Data\ExportEntitySearchResultsInterface;
/**
* @api
*/
interface ExportEntityRepositoryInterface
{
/**
* Save export entity
*
* @param ExportEntityInterface $exportEntity
* @return ExportEntityInterface
* @throws CouldNotSaveException
*/
public function save(ExportEntityInterface $exportEntity): ExportEntityInterface;
/**
* Retrieve export entity by ID
*
* @param int $exportId
* @return ExportEntityInterface
* @throws NoSuchEntityException
*/
public function getById(int $exportId): ExportEntityInterface;
/**
* Retrieve export by entity
*
* @param int $entityId
* @param string $entityType
* @return ExportEntityInterface
* @throws NoSuchEntityException
*/
public function getByEntity(int $entityId, string $entityType): ExportEntityInterface;
/**
* Retrieve export entity list by search filter criteria
*
* @param SearchCriteriaInterface $searchCriteria
* @return ExportEntitySearchResultsInterface
* @throws LocalizedException
*/
public function getList(SearchCriteriaInterface $searchCriteria): SearchResultsInterface;
/**
* Delete export entity
*
* @param ExportEntityInterface $exportEntity
* @return bool true on success
* @throws CouldNotDeleteException
*/
public function delete(ExportEntityInterface $exportEntity): bool;
}