1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* TechDivision\Import\Product\Link\Services\ProductLinkProcessor |
5
|
|
|
* |
6
|
|
|
* NOTICE OF LICENSE |
7
|
|
|
* |
8
|
|
|
* This source file is subject to the Open Software License (OSL 3.0) |
9
|
|
|
* that is available through the world-wide-web at this URL: |
10
|
|
|
* http://opensource.org/licenses/osl-3.0.php |
11
|
|
|
* |
12
|
|
|
* PHP version 5 |
13
|
|
|
* |
14
|
|
|
* @author Tim Wagner <[email protected]> |
15
|
|
|
* @copyright 2016 TechDivision GmbH <[email protected]> |
16
|
|
|
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
17
|
|
|
* @link https://github.com/techdivision/import-product-link |
18
|
|
|
* @link http://www.techdivision.com |
19
|
|
|
*/ |
20
|
|
|
|
21
|
|
|
namespace TechDivision\Import\Product\Link\Services; |
22
|
|
|
|
23
|
|
|
use TechDivision\Import\Actions\ActionInterface; |
24
|
|
|
use TechDivision\Import\Connection\ConnectionInterface; |
25
|
|
|
use TechDivision\Import\Product\Link\Repositories\ProductLinkRepositoryInterface; |
26
|
|
|
use TechDivision\Import\Product\Link\Repositories\ProductLinkAttributeIntRepositoryInterface; |
27
|
|
|
use TechDivision\Import\Product\Link\Repositories\ProductLinkAttributeDecimalRepositoryInterface; |
28
|
|
|
use TechDivision\Import\Product\Link\Repositories\ProductLinkAttributeVarcharRepositoryInterface; |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* The product link processor implementation. |
32
|
|
|
* |
33
|
|
|
* @author Tim Wagner <[email protected]> |
34
|
|
|
* @copyright 2016 TechDivision GmbH <[email protected]> |
35
|
|
|
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
36
|
|
|
* @link https://github.com/techdivision/import-product-link |
37
|
|
|
* @link http://www.techdivision.com |
38
|
|
|
*/ |
39
|
|
|
class ProductLinkProcessor implements ProductLinkProcessorInterface |
40
|
|
|
{ |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* A PDO connection initialized with the values from the Doctrine EntityManager. |
44
|
|
|
* |
45
|
|
|
* @var \TechDivision\Import\Connection\ConnectionInterface |
46
|
|
|
*/ |
47
|
|
|
protected $connection; |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* The repository to load product links. |
51
|
|
|
* |
52
|
|
|
* @var \TechDivision\Import\Product\Link\Repositories\ProductLinkRepositoryInterface |
53
|
|
|
*/ |
54
|
|
|
protected $productLinkRepository; |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* The repository to load product link attribute integer attributes. |
58
|
|
|
* |
59
|
|
|
* @var \TechDivision\Import\Product\Link\Repositories\ProductLinkAttributeIntRepositoryInterface |
60
|
|
|
*/ |
61
|
|
|
protected $productLinkAttributeIntRepository; |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* The repository to load product link attribute decimal attributes. |
65
|
|
|
* |
66
|
|
|
* @var \TechDivision\Import\Product\Link\Repositories\ProductLinkAttributeDecimalRepositoryInterface |
67
|
|
|
*/ |
68
|
|
|
protected $productLinkAttributeDecimalRepository; |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* The repository to load product link attribute varchar attributes. |
72
|
|
|
* |
73
|
|
|
* @var \TechDivision\Import\Product\Link\Repositories\ProductLinkAttributeVarcharRepositoryInterface |
74
|
|
|
*/ |
75
|
|
|
protected $productLinkAttributeVarcharRepository; |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* The action with the product link CRUD methods. |
79
|
|
|
* |
80
|
|
|
* @var \TechDivision\Import\Actions\ActionInterface |
81
|
|
|
*/ |
82
|
|
|
protected $productLinkAction; |
83
|
|
|
|
84
|
|
|
/** |
85
|
|
|
* The action with the product link attribute integer CRUD methods. |
86
|
|
|
* |
87
|
|
|
* @var \TechDivision\Import\Actions\ActionInterface |
88
|
|
|
*/ |
89
|
|
|
protected $productLinkAttributeIntAction; |
90
|
|
|
|
91
|
|
|
/** |
92
|
|
|
* The action with the product link attribute deciam CRUD methods. |
93
|
|
|
* |
94
|
|
|
* @var \TechDivision\Import\Actions\ActionInterface |
95
|
|
|
*/ |
96
|
|
|
protected $productLinkAttributeDecimalAction; |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* The action with the product link attribute varchar CRUD methods. |
100
|
|
|
* |
101
|
|
|
* @var \TechDivision\Import\Actions\ActionInterface |
102
|
|
|
*/ |
103
|
|
|
protected $productLinkAttributeVarcharAction; |
104
|
|
|
|
105
|
|
|
/** |
106
|
|
|
* Initialize the processor with the necessary assembler and repository instances. |
107
|
|
|
* |
108
|
|
|
* @param \TechDivision\Import\Connection\ConnectionInterface $connection The connection to use |
109
|
|
|
* @param \TechDivision\Import\Product\Link\Repositories\\ProductLinkRepositoryInterface $productLinkRepository The product link repository to use |
110
|
|
|
* @param \TechDivision\Import\Product\Link\Repositories\\ProductLinkAttributeIntRepositoryInterface $productLinkAttributeIntRepository The product link attribute integer repository to use |
111
|
|
|
* @param \TechDivision\Import\Product\Link\Repositories\\ProductLinkAttributeDecimalRepositoryInterface $productLinkAttributeDecimalRepository The product link attribute decimal repository to use |
112
|
|
|
* @param \TechDivision\Import\Product\Link\Repositories\\ProductLinkAttributeVarcharRepositoryInterface $productLinkAttributeVarcharRepository The product link attribute varchar repository to use |
113
|
|
|
* @param \TechDivision\Import\Actions\ActionInterface $productLinkAction The product link action to use |
114
|
|
|
* @param \TechDivision\Import\Actions\ActionInterface $productLinkAttributeIntAction The product link attribute integer action to use |
115
|
|
|
* @param \TechDivision\Import\Actions\ActionInterface $productLinkAttributeDecimalAction The product link attribute decimal action to use |
116
|
|
|
* @param \TechDivision\Import\Actions\ActionInterface $productLinkAttributeVarcharAction The product link attribute varchar action to use |
117
|
|
|
*/ |
118
|
|
|
public function __construct( |
119
|
|
|
ConnectionInterface $connection, |
120
|
|
|
ProductLinkRepositoryInterface $productLinkRepository, |
121
|
|
|
ProductLinkAttributeIntRepositoryInterface $productLinkAttributeIntRepository, |
122
|
|
|
ProductLinkAttributeDecimalRepositoryInterface $productLinkAttributeDecimalRepository, |
123
|
|
|
ProductLinkAttributeVarcharRepositoryInterface $productLinkAttributeVarcharRepository, |
124
|
|
|
ActionInterface $productLinkAction, |
125
|
|
|
ActionInterface $productLinkAttributeIntAction, |
126
|
|
|
ActionInterface $productLinkAttributeDecimalAction, |
127
|
|
|
ActionInterface $productLinkAttributeVarcharAction |
128
|
|
|
) { |
129
|
|
|
$this->setConnection($connection); |
130
|
|
|
$this->setProductLinkRepository($productLinkRepository); |
131
|
|
|
$this->setProductLinkAttributeIntRepository($productLinkAttributeIntRepository); |
132
|
|
|
$this->setProductLinkAttributeDecimalRepository($productLinkAttributeDecimalRepository); |
133
|
|
|
$this->setProductLinkAttributeVarcharRepository($productLinkAttributeVarcharRepository); |
134
|
|
|
$this->setProductLinkAction($productLinkAction); |
135
|
|
|
$this->setProductLinkAttributeIntAction($productLinkAttributeIntAction); |
136
|
|
|
$this->setProductLinkAttributeDecimalAction($productLinkAttributeDecimalAction); |
137
|
|
|
$this->setProductLinkAttributeVarcharAction($productLinkAttributeVarcharAction); |
138
|
|
|
} |
139
|
|
|
|
140
|
|
|
/** |
141
|
|
|
* Set's the passed connection. |
142
|
|
|
* |
143
|
|
|
* @param \TechDivision\Import\Connection\ConnectionInterface $connection The connection to set |
144
|
|
|
* |
145
|
|
|
* @return void |
146
|
|
|
*/ |
147
|
|
|
public function setConnection(ConnectionInterface $connection) |
148
|
|
|
{ |
149
|
|
|
$this->connection = $connection; |
150
|
|
|
} |
151
|
|
|
|
152
|
|
|
/** |
153
|
|
|
* Return's the connection. |
154
|
|
|
* |
155
|
|
|
* @return \TechDivision\Import\Connection\ConnectionInterface The connection instance |
156
|
|
|
*/ |
157
|
|
|
public function getConnection() |
158
|
|
|
{ |
159
|
|
|
return $this->connection; |
160
|
|
|
} |
161
|
|
|
|
162
|
|
|
/** |
163
|
|
|
* Turns off autocommit mode. While autocommit mode is turned off, changes made to the database via the PDO |
164
|
|
|
* object instance are not committed until you end the transaction by calling ProductProcessor::commit(). |
165
|
|
|
* Calling ProductProcessor::rollBack() will roll back all changes to the database and return the connection |
166
|
|
|
* to autocommit mode. |
167
|
|
|
* |
168
|
|
|
* @return boolean Returns TRUE on success or FALSE on failure |
169
|
|
|
* @link http://php.net/manual/en/pdo.begintransaction.php |
170
|
|
|
*/ |
171
|
|
|
public function beginTransaction() |
172
|
|
|
{ |
173
|
|
|
return $this->connection->beginTransaction(); |
174
|
|
|
} |
175
|
|
|
|
176
|
|
|
/** |
177
|
|
|
* Commits a transaction, returning the database connection to autocommit mode until the next call to |
178
|
|
|
* ProductProcessor::beginTransaction() starts a new transaction. |
179
|
|
|
* |
180
|
|
|
* @return boolean Returns TRUE on success or FALSE on failure |
181
|
|
|
* @link http://php.net/manual/en/pdo.commit.php |
182
|
|
|
*/ |
183
|
|
|
public function commit() |
184
|
|
|
{ |
185
|
|
|
return $this->connection->commit(); |
186
|
|
|
} |
187
|
|
|
|
188
|
|
|
/** |
189
|
|
|
* Rolls back the current transaction, as initiated by ProductProcessor::beginTransaction(). |
190
|
|
|
* |
191
|
|
|
* If the database was set to autocommit mode, this function will restore autocommit mode after it has |
192
|
|
|
* rolled back the transaction. |
193
|
|
|
* |
194
|
|
|
* Some databases, including MySQL, automatically issue an implicit COMMIT when a database definition |
195
|
|
|
* language (DDL) statement such as DROP TABLE or CREATE TABLE is issued within a transaction. The implicit |
196
|
|
|
* COMMIT will prevent you from rolling back any other changes within the transaction boundary. |
197
|
|
|
* |
198
|
|
|
* @return boolean Returns TRUE on success or FALSE on failure |
199
|
|
|
* @link http://php.net/manual/en/pdo.rollback.php |
200
|
|
|
*/ |
201
|
|
|
public function rollBack() |
202
|
|
|
{ |
203
|
|
|
return $this->connection->rollBack(); |
204
|
|
|
} |
205
|
|
|
|
206
|
|
|
/** |
207
|
|
|
* Set's the repository to load product links. |
208
|
|
|
* |
209
|
|
|
* @param \TechDivision\Import\Product\Link\Repositories\ProductLinkRepositoryInterface $productLinkRepository The repository instance |
210
|
|
|
* |
211
|
|
|
* @return void |
212
|
|
|
*/ |
213
|
|
|
public function setProductLinkRepository(ProductLinkRepositoryInterface $productLinkRepository) |
214
|
|
|
{ |
215
|
|
|
$this->productLinkRepository = $productLinkRepository; |
216
|
|
|
} |
217
|
|
|
|
218
|
|
|
/** |
219
|
|
|
* Return's the repository to load product links. |
220
|
|
|
* |
221
|
|
|
* @return \TechDivision\Import\Product\Link\Repositories\ProductLinkRepositoryInterface The repository instance |
222
|
|
|
*/ |
223
|
|
|
public function getProductLinkRepository() |
224
|
|
|
{ |
225
|
|
|
return $this->productLinkRepository; |
226
|
|
|
} |
227
|
|
|
|
228
|
|
|
/** |
229
|
|
|
* Set's the repository to load product link attribute integer attributes. |
230
|
|
|
* |
231
|
|
|
* @param \TechDivision\Import\Product\Link\Repositories\ProductLinkAttributeIntRepositoryInterface $productLinkAttributeIntRepository The repository instance |
232
|
|
|
* |
233
|
|
|
* @return void |
234
|
|
|
*/ |
235
|
|
|
public function setProductLinkAttributeIntRepository(ProductLinkAttributeIntRepositoryInterface $productLinkAttributeIntRepository) |
236
|
|
|
{ |
237
|
|
|
$this->productLinkAttributeIntRepository = $productLinkAttributeIntRepository; |
238
|
|
|
} |
239
|
|
|
|
240
|
|
|
/** |
241
|
|
|
* Return's the repository to load product link attribute integer attributes. |
242
|
|
|
* |
243
|
|
|
* @return \TechDivision\Import\Product\Link\Repositories\ProductLinkAttributeIntRepositoryInterface The repository instance |
244
|
|
|
*/ |
245
|
|
|
public function getProductLinkAttributeIntRepository() |
246
|
|
|
{ |
247
|
|
|
return $this->productLinkAttributeIntRepository; |
248
|
|
|
} |
249
|
|
|
|
250
|
|
|
/** |
251
|
|
|
* Set's the repository to load product link attribute decimal attributes. |
252
|
|
|
* |
253
|
|
|
* @param \TechDivision\Import\Product\Link\Repositories\ProductLinkAttributeDecimalRepositoryInterface $productLinkAttributeDecimalRepository The repository instance |
254
|
|
|
* |
255
|
|
|
* @return void |
256
|
|
|
*/ |
257
|
|
|
public function setProductLinkAttributeDecimalRepository(ProductLinkAttributeDecimalRepositoryInterface $productLinkAttributeDecimalRepository) |
258
|
|
|
{ |
259
|
|
|
$this->productLinkAttributeDecimalRepository = $productLinkAttributeDecimalRepository; |
260
|
|
|
} |
261
|
|
|
|
262
|
|
|
/** |
263
|
|
|
* Return's the repository to load product link attribute decimal attributes. |
264
|
|
|
* |
265
|
|
|
* @return \TechDivision\Import\Product\Link\Repositories\ProductLinkAttributeDecimalRepositoryInterface The repository instance |
266
|
|
|
*/ |
267
|
|
|
public function getProductLinkAttributeDecimalRepository() |
268
|
|
|
{ |
269
|
|
|
return $this->productLinkAttributeDecimalRepository; |
270
|
|
|
} |
271
|
|
|
|
272
|
|
|
/** |
273
|
|
|
* Set's the repository to load product link attribute varchar attributes. |
274
|
|
|
* |
275
|
|
|
* @param \TechDivision\Import\Product\Link\Repositories\ProductLinkAttributeVarcharRepositoryInterface $productLinkAttributeVarcharRepository The repository instance |
276
|
|
|
* |
277
|
|
|
* @return void |
278
|
|
|
*/ |
279
|
|
|
public function setProductLinkAttributeVarcharRepository(ProductLinkAttributeVarcharRepositoryInterface $productLinkAttributeVarcharRepository) |
280
|
|
|
{ |
281
|
|
|
$this->productLinkAttributeVarcharRepository = $productLinkAttributeVarcharRepository; |
282
|
|
|
} |
283
|
|
|
|
284
|
|
|
/** |
285
|
|
|
* Return's the repository to load product link attribute varchar attributes. |
286
|
|
|
* |
287
|
|
|
* @return \TechDivision\Import\Product\Link\Repositories\ProductLinkAttributeVarcharRepositoryInterface The repository instance |
288
|
|
|
*/ |
289
|
|
|
public function getProductLinkAttributeVarcharRepository() |
290
|
|
|
{ |
291
|
|
|
return $this->productLinkAttributeVarcharRepository; |
292
|
|
|
} |
293
|
|
|
|
294
|
|
|
/** |
295
|
|
|
* Set's the action with the product link CRUD methods. |
296
|
|
|
* |
297
|
|
|
* @param \TechDivision\Import\Actions\ActionInterface $productLinkAction The action with the product link CRUD methods |
298
|
|
|
* |
299
|
|
|
* @return void |
300
|
|
|
*/ |
301
|
|
|
public function setProductLinkAction(ActionInterface $productLinkAction) |
302
|
|
|
{ |
303
|
|
|
$this->productLinkAction = $productLinkAction; |
304
|
|
|
} |
305
|
|
|
|
306
|
|
|
/** |
307
|
|
|
* Return's the action with the product link CRUD methods. |
308
|
|
|
* |
309
|
|
|
* @return \TechDivision\Import\Actions\ActionInterface The action with the product link CRUD methods |
310
|
|
|
*/ |
311
|
|
|
public function getProductLinkAction() |
312
|
|
|
{ |
313
|
|
|
return $this->productLinkAction; |
314
|
|
|
} |
315
|
|
|
|
316
|
|
|
/** |
317
|
|
|
* Set's the action with the product link attribute integer CRUD methods. |
318
|
|
|
* |
319
|
|
|
* @param \TechDivision\Import\Actions\ActionInterface $productLinkAttributeIntAction The action with the product link attribute integer CRUD methods |
320
|
|
|
* |
321
|
|
|
* @return void |
322
|
|
|
*/ |
323
|
|
|
public function setProductLinkAttributeIntAction(ActionInterface $productLinkAttributeIntAction) |
324
|
|
|
{ |
325
|
|
|
$this->productLinkAttributeIntAction = $productLinkAttributeIntAction; |
326
|
|
|
} |
327
|
|
|
|
328
|
|
|
/** |
329
|
|
|
* Return's the action with the product link attribute integer CRUD methods. |
330
|
|
|
* |
331
|
|
|
* @return \TechDivision\Import\Actions\ActionInterface The action with the product link attribute integer CRUD methods |
332
|
|
|
*/ |
333
|
|
|
public function getProductLinkAttributeIntAction() |
334
|
|
|
{ |
335
|
|
|
return $this->productLinkAttributeIntAction; |
336
|
|
|
} |
337
|
|
|
|
338
|
|
|
/** |
339
|
|
|
* Set's the action with the product link attribute decimal CRUD methods. |
340
|
|
|
* |
341
|
|
|
* @param \TechDivision\Import\Actions\ActionInterface $productLinkAttributeDecimalAction The action with the product link attribute decimal CRUD methods |
342
|
|
|
* |
343
|
|
|
* @return void |
344
|
|
|
*/ |
345
|
|
|
public function setProductLinkAttributeDecimalAction(ActionInterface $productLinkAttributeDecimalAction) |
346
|
|
|
{ |
347
|
|
|
$this->productLinkAttributeDecimalAction = $productLinkAttributeDecimalAction; |
348
|
|
|
} |
349
|
|
|
|
350
|
|
|
/** |
351
|
|
|
* Return's the action with the product link attribute decimal CRUD methods. |
352
|
|
|
* |
353
|
|
|
* @return \TechDivision\Import\Actions\ActionInterface The action with the product link attribute decimal CRUD methods |
354
|
|
|
*/ |
355
|
|
|
public function getProductLinkAttributeDecimalAction() |
356
|
|
|
{ |
357
|
|
|
return $this->productLinkAttributeDecimalAction; |
358
|
|
|
} |
359
|
|
|
|
360
|
|
|
/** |
361
|
|
|
* Set's the action with the product link attribute varchar CRUD methods. |
362
|
|
|
* |
363
|
|
|
* @param \TechDivision\Import\Actions\ActionInterface $productLinkAttributeVarcharAction The action with the product link attribute varchar CRUD methods |
364
|
|
|
* |
365
|
|
|
* @return void |
366
|
|
|
*/ |
367
|
|
|
public function setProductLinkAttributeVarcharAction(ActionInterface $productLinkAttributeVarcharAction) |
368
|
|
|
{ |
369
|
|
|
$this->productLinkAttributeVarcharAction = $productLinkAttributeVarcharAction; |
370
|
|
|
} |
371
|
|
|
|
372
|
|
|
/** |
373
|
|
|
* Return's the action with the product link attribute varchar CRUD methods. |
374
|
|
|
* |
375
|
|
|
* @return \TechDivision\Import\Actions\ActionInterface The action with the product link attribute varchar CRUD methods |
376
|
|
|
*/ |
377
|
|
|
public function getProductLinkAttributeVarcharAction() |
378
|
|
|
{ |
379
|
|
|
return $this->productLinkAttributeVarcharAction; |
380
|
|
|
} |
381
|
|
|
|
382
|
|
|
/** |
383
|
|
|
* Load's the link with the passed product/linked product/link type ID. |
384
|
|
|
* |
385
|
|
|
* @param integer $productId The product ID of the link to load |
386
|
|
|
* @param integer $linkedProductId The linked product ID of the link to load |
387
|
|
|
* @param integer $linkTypeId The link type ID of the product to load |
388
|
|
|
* |
389
|
|
|
* @return array The link |
390
|
|
|
*/ |
391
|
|
|
public function loadProductLink($productId, $linkedProductId, $linkTypeId) |
392
|
|
|
{ |
393
|
|
|
return $this->getProductLinkRepository()->findOneByProductIdAndLinkedProductIdAndLinkTypeId($productId, $linkedProductId, $linkTypeId); |
394
|
|
|
} |
395
|
|
|
|
396
|
|
|
/** |
397
|
|
|
* Return's the product link attribute integer value with the passed product link attribute/link ID. |
398
|
|
|
* |
399
|
|
|
* @param integer $productLinkAttributeId The product link attribute ID of the attributes |
400
|
|
|
* @param integer $linkId The link ID of the attribute |
401
|
|
|
* |
402
|
|
|
* @return array The product link attribute integer value |
403
|
|
|
*/ |
404
|
|
|
public function loadProductLinkAttributeInt($productLinkAttributeId, $linkId) |
405
|
|
|
{ |
406
|
|
|
return $this->getProductLinkAttributeIntRepository()->findOneByProductLinkAttributeIdAndLinkId($productLinkAttributeId, $linkId); |
407
|
|
|
} |
408
|
|
|
|
409
|
|
|
/** |
410
|
|
|
* Return's the product link attribute decimal value with the passed product link attribute/link ID. |
411
|
|
|
* |
412
|
|
|
* @param integer $productLinkAttributeId The product link attribute ID of the attributes |
413
|
|
|
* @param integer $linkId The link ID of the attribute |
414
|
|
|
* |
415
|
|
|
* @return array The product link attribute decimal value |
416
|
|
|
*/ |
417
|
|
|
public function loadProductLinkAttributeDecimal($productLinkAttributeId, $linkId) |
418
|
|
|
{ |
419
|
|
|
return $this->getProductLinkAttributeDecimalRepository()->findOneByProductLinkAttributeIdAndLinkId($productLinkAttributeId, $linkId); |
420
|
|
|
} |
421
|
|
|
|
422
|
|
|
/** |
423
|
|
|
* Return's the product link attribute varchar value with the passed product link attribute/link ID. |
424
|
|
|
* |
425
|
|
|
* @param integer $productLinkAttributeId The product link attribute ID of the attributes |
426
|
|
|
* @param integer $linkId The link ID of the attribute |
427
|
|
|
* |
428
|
|
|
* @return array The product link attribute varchar value |
429
|
|
|
*/ |
430
|
|
|
public function loadProductLinkAttributeVarchar($productLinkAttributeId, $linkId) |
431
|
|
|
{ |
432
|
|
|
return $this->getProductLinkAttributeVarcharRepository()->findOneByProductLinkAttributeIdAndLinkId($productLinkAttributeId, $linkId); |
433
|
|
|
} |
434
|
|
|
|
435
|
|
|
/** |
436
|
|
|
* Persist's the passed product link data and return's the ID. |
437
|
|
|
* |
438
|
|
|
* @param array $productLink The product link data to persist |
439
|
|
|
* |
440
|
|
|
* @return string The ID of the persisted entity |
441
|
|
|
*/ |
442
|
|
|
public function persistProductLink($productLink) |
443
|
|
|
{ |
444
|
|
|
return $this->getProductLinkAction()->persist($productLink); |
445
|
|
|
} |
446
|
|
|
|
447
|
|
|
/** |
448
|
|
|
* Delete's the passed product link data. |
449
|
|
|
* |
450
|
|
|
* @param array $row The product link to be deleted |
451
|
|
|
* @param string|null $name The name of the prepared statement that has to be executed |
452
|
|
|
* |
453
|
|
|
* @return string The ID of the persisted entity |
454
|
|
|
*/ |
455
|
|
|
public function deleteProductLink(array $row, $name = null) |
456
|
|
|
{ |
457
|
|
|
return $this->getProductLinkAction()->delete($row, $name); |
458
|
|
|
} |
459
|
|
|
|
460
|
|
|
/** |
461
|
|
|
* Persist's the passed product link attribute integer data. |
462
|
|
|
* |
463
|
|
|
* @param array $productLinkAttributeInt The product link attribute integer data to persist |
464
|
|
|
* |
465
|
|
|
* @return void |
466
|
|
|
*/ |
467
|
|
|
public function persistProductLinkAttributeInt($productLinkAttributeInt) |
468
|
|
|
{ |
469
|
|
|
$this->getProductLinkAttributeIntAction()->persist($productLinkAttributeInt); |
470
|
|
|
} |
471
|
|
|
|
472
|
|
|
/** |
473
|
|
|
* Persist's the passed product link attribute decimal data. |
474
|
|
|
* |
475
|
|
|
* @param array $productLinkAttributeDecimal The product link attribute decimal data to persist |
476
|
|
|
* |
477
|
|
|
* @return void |
478
|
|
|
*/ |
479
|
|
|
public function persistProductLinkAttributeDecimal($productLinkAttributeDecimal) |
480
|
|
|
{ |
481
|
|
|
$this->getProductLinkAttributeDecimalAction()->persist($productLinkAttributeDecimal); |
482
|
|
|
} |
483
|
|
|
|
484
|
|
|
/** |
485
|
|
|
* Persist's the passed product link attribute varchar data. |
486
|
|
|
* |
487
|
|
|
* @param array $productLinkAttributeVarchar The product link attribute varchar data to persist |
488
|
|
|
* |
489
|
|
|
* @return void |
490
|
|
|
*/ |
491
|
|
|
public function persistProductLinkAttributeVarchar($productLinkAttributeVarchar) |
492
|
|
|
{ |
493
|
|
|
$this->getProductLinkAttributeVarcharAction()->persist($productLinkAttributeVarchar); |
494
|
|
|
} |
495
|
|
|
} |
496
|
|
|
|