1 <?php
2
3 /* --------------------------------------------------------------
4 OrderItemAttributeRepositoryInterface.inc.php 2015-10-27 gm
5 Gambio GmbH
6 http://www.gambio.de
7 Copyright (c) 2015 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 OrderItemAttributeRepositoryInterface
15 *
16 * @category System
17 * @package Order
18 * @subpackage Interfaces
19 */
20 interface OrderItemAttributeRepositoryInterface
21 {
22 /**
23 * Adds an attribute to an order item.
24 *
25 * @param IdType $orderItemId ID of the order item.
26 * @param OrderItemAttributeInterface $orderItemAttribute Order item attribute to add.
27 *
28 * @return int ID of stored order item attribute.
29 */
30 public function addToOrderItem(IdType $orderItemId, OrderItemAttributeInterface $orderItemAttribute);
31
32
33 /**
34 * Saves the attribute to the repository.
35 *
36 * @param StoredOrderItemAttributeInterface $orderItemAttribute Attribute to save.
37 *
38 * @return OrderItemAttributeRepositoryInterface Same instance for method chaining.
39 */
40 public function store(StoredOrderItemAttributeInterface $orderItemAttribute);
41
42
43 /**
44 * Returns a stored attribute by the given ID.
45 *
46 * @param IdType $orderItemAttributeId ID of item attribute.
47 *
48 * @return StoredOrderItemAttributeInterface Stored attribute.
49 */
50 public function getItemAttributeById(IdType $orderItemAttributeId);
51
52
53 /**
54 * Returns a stored attribute collection by the given order item ID.
55 *
56 * @param IdType $orderItemId ID of order item.
57 *
58 * @return StoredOrderItemAttributeCollection Stored item attribute collection.
59 */
60 public function getItemAttributesByOrderItemId(IdType $orderItemId);
61
62
63 /**
64 * Deletes an item attribute by the given item attribute ID.
65 *
66 * @param IdType $orderItemAttributeId ID of order item attribute.
67 *
68 * @return OrderItemAttributeRepositoryInterface Same instance for method chaining.
69 */
70 public function deleteItemAttributeById(IdType $orderItemAttributeId);
71
72
73 /**
74 * Deletes an item attribute by the given order item ID.
75 *
76 * @param IdType $orderItemId ID of order item.
77 *
78 * @return OrderItemAttributeRepositoryInterface Same instance for method chaining.
79 */
80 public function deleteItemAttributesByOrderItemId(IdType $orderItemId);
81 }