1 <?php
2
3 /* --------------------------------------------------------------
4 ProductRepositoryWriterInterface.inc.php 2016-01-15
5 Gambio GmbH
6 http://www.gambio.de
7 Copyright (c) 2016 Gambio GmbH
8 Released under the GNU General Public License (Version 2)
9 [http://www.gnu.org/licenses/gpl-2.0.html]
10 --------------------------------------------------------------
11 */
12
13 /**
14 * Interface ProductRepositoryWriterInterface
15 *
16 * @category System
17 * @package Product
18 * @subpackage Interfaces
19 */
20 interface ProductRepositoryWriterInterface
21 {
22 /**
23 * Inserts a new product in the database.
24 *
25 * @param ProductInterface $product Product entity which holds the values for the database columns.
26 *
27 * @return int Id of inserted product.
28 */
29 public function insert(ProductInterface $product);
30
31
32 /**
33 * Updates a product in the database.
34 *
35 * @param StoredProductInterface $product Product entity to update.
36 *
37 * @return ProductRepositoryWriterInterface|$this Same instance for chained method calls.
38 */
39 public function update(StoredProductInterface $product);
40 }