<?php
/**
 * @author Aitoc Team
 * @copyright Copyright (c) 2020 Aitoc (https://www.aitoc.com)
 * @package Aitoc_PreOrders
 */

/**
 * Copyright © 2018 Aitoc. All rights reserved.
 * Developed by Alex Yakimovich
 */

namespace Aitoc\PreOrders\Api;

use Aitoc\PreOrders\Api\Data\ProductAttributesInterface;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Framework\Api\SearchCriteriaInterface;
use Aitoc\PreOrders\Api\Data\ProductAttributesSearchResultsInterface;

/**
 * Interface ProductAttributesRepositoryInterface
 * @api
 */
interface ProductAttributesRepositoryInterface
{
    /**
     * Save entity.
     *
     * @param ProductAttributesInterface $attribute
     * @return ProductAttributesInterface
     * @throws LocalizedException
     */
    public function save(ProductAttributesInterface $attribute);

    /**
     * Retrieve entity.
     *
     * @param int $attributeId
     * @return ProductAttributesInterface
     * @throws LocalizedException
     */
    public function get($attributeId);

    /**
     * Retrieve entity list by criteria.
     *
     * @param SearchCriteriaInterface $searchCriteria
     * @return ProductAttributesSearchResultsInterface
     * @throws LocalizedException
     */
    public function getList(SearchCriteriaInterface $searchCriteria);

    /**
     * Delete entity.
     *
     * @param ProductAttributesInterface $model
     * @return bool true on success
     * @throws LocalizedException
     */
    public function delete(ProductAttributesInterface $model);
}
