| @@ 35-83 (lines=49) @@ | ||
| 32 | * @link https://github.com/techdivision/import-product-ee |
|
| 33 | * @link http://www.techdivision.com |
|
| 34 | */ |
|
| 35 | class ProductDatetimeRepository extends AbstractRepository |
|
| 36 | { |
|
| 37 | ||
| 38 | /** |
|
| 39 | * The prepared statement to load the existing product datetime attribute. |
|
| 40 | * |
|
| 41 | * @var \PDOStatement |
|
| 42 | */ |
|
| 43 | protected $productDatetimeStmt; |
|
| 44 | ||
| 45 | /** |
|
| 46 | * Initializes the repository's prepared statements. |
|
| 47 | * |
|
| 48 | * @return void |
|
| 49 | */ |
|
| 50 | public function init() |
|
| 51 | { |
|
| 52 | ||
| 53 | // load the utility class name |
|
| 54 | $utilityClassName = $this->getUtilityClassName(); |
|
| 55 | ||
| 56 | // initialize the prepared statements |
|
| 57 | $this->productDatetimeStmt = $this->getConnection()->prepare($utilityClassName::PRODUCT_DATETIME); |
|
| 58 | } |
|
| 59 | ||
| 60 | /** |
|
| 61 | * Load's and return's the varchar attribute with the passed row/attribute/store ID. |
|
| 62 | * |
|
| 63 | * @param integer $rowId The row ID of the attribute |
|
| 64 | * @param integer $attributeId The attribute ID of the attribute |
|
| 65 | * @param integer $storeId The store ID of the attribute |
|
| 66 | * |
|
| 67 | * @return array|null The varchar attribute |
|
| 68 | */ |
|
| 69 | public function findOneByRowIdAndAttributeIdAndStoreId($rowId, $attributeId, $storeId) |
|
| 70 | { |
|
| 71 | ||
| 72 | // prepare the params |
|
| 73 | $params = array( |
|
| 74 | MemberNames::ROW_ID => $rowId, |
|
| 75 | MemberNames::STORE_ID => $storeId, |
|
| 76 | MemberNames::ATTRIBUTE_ID => $attributeId |
|
| 77 | ); |
|
| 78 | ||
| 79 | // load and return the product datetime attribute with the passed store/entity/attribute ID |
|
| 80 | $this->productDatetimeStmt->execute($params); |
|
| 81 | return $this->productDatetimeStmt->fetch(\PDO::FETCH_ASSOC); |
|
| 82 | } |
|
| 83 | } |
|
| 84 | ||
| @@ 35-83 (lines=49) @@ | ||
| 32 | * @link https://github.com/techdivision/import-product-ee |
|
| 33 | * @link http://www.techdivision.com |
|
| 34 | */ |
|
| 35 | class ProductDecimalRepository extends AbstractRepository |
|
| 36 | { |
|
| 37 | ||
| 38 | /** |
|
| 39 | * The prepared statement to load the existing product decimal attribute. |
|
| 40 | * |
|
| 41 | * @var \PDOStatement |
|
| 42 | */ |
|
| 43 | protected $productDecimalStmt; |
|
| 44 | ||
| 45 | /** |
|
| 46 | * Initializes the repository's prepared statements. |
|
| 47 | * |
|
| 48 | * @return void |
|
| 49 | */ |
|
| 50 | public function init() |
|
| 51 | { |
|
| 52 | ||
| 53 | // load the utility class name |
|
| 54 | $utilityClassName = $this->getUtilityClassName(); |
|
| 55 | ||
| 56 | // initialize the prepared statements |
|
| 57 | $this->productDecimalStmt = $this->getConnection()->prepare($utilityClassName::PRODUCT_DECIMAL); |
|
| 58 | } |
|
| 59 | ||
| 60 | /** |
|
| 61 | * Load's and return's the varchar attribute with the passed row/attribute/store ID. |
|
| 62 | * |
|
| 63 | * @param integer $rowId The row ID of the attribute |
|
| 64 | * @param integer $attributeId The attribute ID of the attribute |
|
| 65 | * @param integer $storeId The store ID of the attribute |
|
| 66 | * |
|
| 67 | * @return array|null The varchar attribute |
|
| 68 | */ |
|
| 69 | public function findOneByRowIdAndAttributeIdAndStoreId($rowId, $attributeId, $storeId) |
|
| 70 | { |
|
| 71 | ||
| 72 | // prepare the params |
|
| 73 | $params = array( |
|
| 74 | MemberNames::ROW_ID => $rowId, |
|
| 75 | MemberNames::STORE_ID => $storeId, |
|
| 76 | MemberNames::ATTRIBUTE_ID => $attributeId |
|
| 77 | ); |
|
| 78 | ||
| 79 | // load and return the product decimal attribute with the passed store/entity/attribute ID |
|
| 80 | $this->productDecimalStmt->execute($params); |
|
| 81 | return $this->productDecimalStmt->fetch(\PDO::FETCH_ASSOC); |
|
| 82 | } |
|
| 83 | } |
|
| 84 | ||
| @@ 35-83 (lines=49) @@ | ||
| 32 | * @link https://github.com/techdivision/import-product-ee |
|
| 33 | * @link http://www.techdivision.com |
|
| 34 | */ |
|
| 35 | class ProductIntRepository extends AbstractRepository |
|
| 36 | { |
|
| 37 | ||
| 38 | /** |
|
| 39 | * The prepared statement to load the existing product integer attribute. |
|
| 40 | * |
|
| 41 | * @var \PDOStatement |
|
| 42 | */ |
|
| 43 | protected $productIntStmt; |
|
| 44 | ||
| 45 | /** |
|
| 46 | * Initializes the repository's prepared statements. |
|
| 47 | * |
|
| 48 | * @return void |
|
| 49 | */ |
|
| 50 | public function init() |
|
| 51 | { |
|
| 52 | ||
| 53 | // load the utility class name |
|
| 54 | $utilityClassName = $this->getUtilityClassName(); |
|
| 55 | ||
| 56 | // initialize the prepared statements |
|
| 57 | $this->productIntStmt = $this->getConnection()->prepare($utilityClassName::PRODUCT_INT); |
|
| 58 | } |
|
| 59 | ||
| 60 | /** |
|
| 61 | * Load's and return's the varchar attribute with the passed row/attribute/store ID. |
|
| 62 | * |
|
| 63 | * @param integer $rowId The row ID of the attribute |
|
| 64 | * @param integer $attributeId The attribute ID of the attribute |
|
| 65 | * @param integer $storeId The store ID of the attribute |
|
| 66 | * |
|
| 67 | * @return array|null The varchar attribute |
|
| 68 | */ |
|
| 69 | public function findOneByRowIdAndAttributeIdAndStoreId($rowId, $attributeId, $storeId) |
|
| 70 | { |
|
| 71 | ||
| 72 | // prepare the params |
|
| 73 | $params = array( |
|
| 74 | MemberNames::ROW_ID => $rowId, |
|
| 75 | MemberNames::STORE_ID => $storeId, |
|
| 76 | MemberNames::ATTRIBUTE_ID => $attributeId |
|
| 77 | ); |
|
| 78 | ||
| 79 | // load and return the product integer attribute with the passed store/entity/attribute ID |
|
| 80 | $this->productIntStmt->execute($params); |
|
| 81 | return $this->productIntStmt->fetch(\PDO::FETCH_ASSOC); |
|
| 82 | } |
|
| 83 | } |
|
| 84 | ||
| @@ 35-83 (lines=49) @@ | ||
| 32 | * @link https://github.com/techdivision/import-product-ee |
|
| 33 | * @link http://www.techdivision.com |
|
| 34 | */ |
|
| 35 | class ProductTextRepository extends AbstractRepository |
|
| 36 | { |
|
| 37 | ||
| 38 | /** |
|
| 39 | * The prepared statement to load the existing product text attribute. |
|
| 40 | * |
|
| 41 | * @var \PDOStatement |
|
| 42 | */ |
|
| 43 | protected $productTextStmt; |
|
| 44 | ||
| 45 | /** |
|
| 46 | * Initializes the repository's prepared statements. |
|
| 47 | * |
|
| 48 | * @return void |
|
| 49 | */ |
|
| 50 | public function init() |
|
| 51 | { |
|
| 52 | ||
| 53 | // load the utility class name |
|
| 54 | $utilityClassName = $this->getUtilityClassName(); |
|
| 55 | ||
| 56 | // initialize the prepared statements |
|
| 57 | $this->productTextStmt = $this->getConnection()->prepare($utilityClassName::PRODUCT_TEXT); |
|
| 58 | } |
|
| 59 | ||
| 60 | /** |
|
| 61 | * Load's and return's the varchar attribute with the passed row/attribute/store ID. |
|
| 62 | * |
|
| 63 | * @param integer $rowId The row ID of the attribute |
|
| 64 | * @param integer $attributeId The attribute ID of the attribute |
|
| 65 | * @param integer $storeId The store ID of the attribute |
|
| 66 | * |
|
| 67 | * @return array|null The varchar attribute |
|
| 68 | */ |
|
| 69 | public function findOneByRowIdAndAttributeIdAndStoreId($rowId, $attributeId, $storeId) |
|
| 70 | { |
|
| 71 | ||
| 72 | // prepare the params |
|
| 73 | $params = array( |
|
| 74 | MemberNames::ROW_ID => $rowId, |
|
| 75 | MemberNames::STORE_ID => $storeId, |
|
| 76 | MemberNames::ATTRIBUTE_ID => $attributeId |
|
| 77 | ); |
|
| 78 | ||
| 79 | // load and return the product text attribute with the passed store/entity/attribute ID |
|
| 80 | $this->productTextStmt->execute($params); |
|
| 81 | return $this->productTextStmt->fetch(\PDO::FETCH_ASSOC); |
|
| 82 | } |
|
| 83 | } |
|
| 84 | ||
| @@ 35-83 (lines=49) @@ | ||
| 32 | * @link https://github.com/techdivision/import-product-ee |
|
| 33 | * @link http://www.techdivision.com |
|
| 34 | */ |
|
| 35 | class ProductVarcharRepository extends AbstractRepository |
|
| 36 | { |
|
| 37 | ||
| 38 | /** |
|
| 39 | * The prepared statement to load the existing product varchar attribute. |
|
| 40 | * |
|
| 41 | * @var \PDOStatement |
|
| 42 | */ |
|
| 43 | protected $productVarcharStmt; |
|
| 44 | ||
| 45 | /** |
|
| 46 | * Initializes the repository's prepared statements. |
|
| 47 | * |
|
| 48 | * @return void |
|
| 49 | */ |
|
| 50 | public function init() |
|
| 51 | { |
|
| 52 | ||
| 53 | // load the utility class name |
|
| 54 | $utilityClassName = $this->getUtilityClassName(); |
|
| 55 | ||
| 56 | // initialize the prepared statements |
|
| 57 | $this->productVarcharStmt = $this->getConnection()->prepare($utilityClassName::PRODUCT_VARCHAR); |
|
| 58 | } |
|
| 59 | ||
| 60 | /** |
|
| 61 | * Load's and return's the varchar attribute with the passed row/attribute/store ID. |
|
| 62 | * |
|
| 63 | * @param integer $rowId The row ID of the attribute |
|
| 64 | * @param integer $attributeId The attribute ID of the attribute |
|
| 65 | * @param integer $storeId The store ID of the attribute |
|
| 66 | * |
|
| 67 | * @return array|null The varchar attribute |
|
| 68 | */ |
|
| 69 | public function findOneByRowIdAndAttributeIdAndStoreId($rowId, $attributeId, $storeId) |
|
| 70 | { |
|
| 71 | ||
| 72 | // prepare the params |
|
| 73 | $params = array( |
|
| 74 | MemberNames::ROW_ID => $rowId, |
|
| 75 | MemberNames::STORE_ID => $storeId, |
|
| 76 | MemberNames::ATTRIBUTE_ID => $attributeId |
|
| 77 | ); |
|
| 78 | ||
| 79 | // load and return the product varchar attribute with the passed row/store/attribute ID |
|
| 80 | $this->productVarcharStmt->execute($params); |
|
| 81 | return $this->productVarcharStmt->fetch(\PDO::FETCH_ASSOC); |
|
| 82 | } |
|
| 83 | } |
|
| 84 | ||