@@ 35-67 (lines=33) @@ | ||
32 | * @link https://github.com/wagnert/import-product-bundle-ee |
|
33 | * @link http://www.appserver.io |
|
34 | */ |
|
35 | class SequenceProductBundleOptionCreateProcessor extends AbstractCreateProcessor |
|
36 | { |
|
37 | ||
38 | /** |
|
39 | * Return's the array with the SQL statements that has to be prepared. |
|
40 | * |
|
41 | * @return array The SQL statements to be prepared |
|
42 | * @see \TechDivision\Import\Actions\Processors\AbstractBaseProcessor::getStatements() |
|
43 | */ |
|
44 | protected function getStatements() |
|
45 | { |
|
46 | ||
47 | // return the array with the SQL statements that has to be prepared |
|
48 | return array( |
|
49 | SqlStatementKeys::CREATE_SEQUENCE_PRODUCT_BUNDLE_OPTION => $this->loadStatement(SqlStatementKeys::CREATE_SEQUENCE_PRODUCT_BUNDLE_OPTION) |
|
50 | ); |
|
51 | } |
|
52 | ||
53 | /** |
|
54 | * Persist's the passed row. |
|
55 | * |
|
56 | * @param array $row The row to persist |
|
57 | * @param string|null $name The name of the prepared statement that has to be executed |
|
58 | * @param string|null $primaryKeyMemberName The primary key member name of the entity to use |
|
59 | * |
|
60 | * @return string The last inserted ID |
|
61 | */ |
|
62 | public function execute($row, $name = null, $primaryKeyMemberName = null) |
|
63 | { |
|
64 | parent::execute($row, $name); |
|
65 | return $this->getConnection()->lastInsertId(); |
|
66 | } |
|
67 | } |
|
68 |
@@ 35-67 (lines=33) @@ | ||
32 | * @link https://github.com/wagnert/import-product-bundle-ee |
|
33 | * @link http://www.appserver.io |
|
34 | */ |
|
35 | class SequenceProductBundleSelectionCreateProcessor extends AbstractCreateProcessor |
|
36 | { |
|
37 | ||
38 | /** |
|
39 | * Return's the array with the SQL statements that has to be prepared. |
|
40 | * |
|
41 | * @return array The SQL statements to be prepared |
|
42 | * @see \TechDivision\Import\Actions\Processors\AbstractBaseProcessor::getStatements() |
|
43 | */ |
|
44 | protected function getStatements() |
|
45 | { |
|
46 | ||
47 | // return the array with the SQL statements that has to be prepared |
|
48 | return array( |
|
49 | SqlStatementKeys::CREATE_SEQUENCE_PRODUCT_BUNDLE_SELECTION => $this->loadStatement(SqlStatementKeys::CREATE_SEQUENCE_PRODUCT_BUNDLE_SELECTION) |
|
50 | ); |
|
51 | } |
|
52 | ||
53 | /** |
|
54 | * Persist's the passed row. |
|
55 | * |
|
56 | * @param array $row The row to persist |
|
57 | * @param string|null $name The name of the prepared statement that has to be executed |
|
58 | * @param string|null $primaryKeyMemberName The primary key member name of the entity to use |
|
59 | * |
|
60 | * @return string The last inserted ID |
|
61 | */ |
|
62 | public function execute($row, $name = null, $primaryKeyMemberName = null) |
|
63 | { |
|
64 | parent::execute($row, $name); |
|
65 | return $this->getConnection()->lastInsertId(); |
|
66 | } |
|
67 | } |
|
68 |