public function storeItemVariable(core_kernel_classes_Resource $deliveryResult, $test, $item, taoResultServer_models_classes_Variable $itemVariable, $callId)
 {
     $start = microtime();
     $itemResult = $this->getItemResult($deliveryResult, $callId, $test, $item);
     $end = microtime();
     common_Logger::i(' Time to retrieve container for his execution of item ' . ($end - $start));
     common_Logger::i(' createInstanceWithProperties : ' . $itemVariable->getIdentifier());
     $storedVariable = $this->storeVariable($itemVariable, $itemResult->getUri());
     $storageEnd = microtime();
     common_Logger::i('     Time Needed for this variable' . ($storageEnd - $end));
     return $storedVariable;
 }
 public function storeItemVariable($deliveryResultIdentifier, $test, $item, taoResultServer_models_classes_Variable $itemVariable, $callIdItem)
 {
     //for testing purpose
     common_Logger::i("Item Variable Submission: " . $itemVariable->getIdentifier());
     $this->storeTestVariable($deliveryResultIdentifier, $test, $itemVariable, $callIdItem);
 }
 /**
  * Store the test variable in table and its value in key/value storage
  *
  * @param type $deliveryResultIdentifier
  *            lis_result_sourcedid
  * @param type $test
  *            ignored
  * @param \taoResultServer_models_classes_Variable $testVariable
  * @param type $callIdTest
  *            ignored
  */
 public function storeTestVariable($deliveryResultIdentifier, $test, \taoResultServer_models_classes_Variable $testVariable, $callIdTest)
 {
     $sql = 'SELECT COUNT(*) FROM ' . self::VARIABLES_TABLENAME . ' WHERE ' . self::VARIABLES_FK_COLUMN . ' = ? AND ' . self::TEST_COLUMN . ' = ?
         AND ' . self::VARIABLE_IDENTIFIER . ' = ?';
     $params = array($deliveryResultIdentifier, $test, $testVariable->getIdentifier());
     // if there is already a record for this item we update it
     if ($this->persistence->query($sql, $params)->fetchColumn() > 0) {
         $sqlUpdate = 'UPDATE ' . self::VARIABLES_TABLENAME . ' SET ' . self::CALL_ID_TEST_COLUMN . ' = ?
         WHERE ' . self::VARIABLES_FK_COLUMN . ' = ? AND ' . self::TEST_COLUMN . ' = ? AND ' . self::VARIABLE_IDENTIFIER . ' = ?';
         $paramsUpdate = array($callIdTest, $deliveryResultIdentifier, $test, $testVariable->getIdentifier());
         $this->persistence->exec($sqlUpdate, $paramsUpdate);
     } else {
         $variableClass = get_class($testVariable);
         $this->persistence->insert(self::VARIABLES_TABLENAME, array(self::VARIABLES_FK_COLUMN => $deliveryResultIdentifier, self::TEST_COLUMN => $test, self::CALL_ID_TEST_COLUMN => $callIdTest, self::VARIABLE_CLASS => $variableClass, self::VARIABLE_IDENTIFIER => $testVariable->getIdentifier()));
         $variableId = $this->persistence->lastInsertId(self::VARIABLES_TABLENAME);
         $this->storeKeysValues($variableId, $testVariable);
     }
 }
 /**
  * @param type $deliveryResultIdentifier lis_result_sourcedid
  * @param type $test ignored
  * @param taoResultServer_models_classes_Variable $testVariable
  * @param type $callIdTest ignored
  */
 public function storeTestVariable($deliveryResultIdentifier, $test, taoResultServer_models_classes_Variable $testVariable, $callIdTest)
 {
     $this->send($deliveryResultIdentifier . " Test Variable " . $testVariable->getIdentifier() . " " . $itemVariable->getValue());
 }
 /**
  * Store the item in table and its value in key/value storage
  * @param $deliveryResultIdentifier
  * @param $test
  * @param $item
  * @param \taoResultServer_models_classes_Variable $itemVariable
  * @param $callIdItem
  */
 public function storeItemVariable($deliveryResultIdentifier, $test, $item, \taoResultServer_models_classes_Variable $itemVariable, $callIdItem)
 {
     //ensure that variable have epoch
     if (!$itemVariable->isSetEpoch()) {
         $itemVariable->setEpoch(microtime());
     }
     //store value in all case
     $this->persistence->insert(self::VARIABLES_TABLENAME, array(self::VARIABLES_FK_COLUMN => $deliveryResultIdentifier, self::TEST_COLUMN => $test, self::ITEM_COLUMN => $item, self::CALL_ID_ITEM_COLUMN => $callIdItem, self::VARIABLE_IDENTIFIER => $itemVariable->getIdentifier(), self::VARIABLE_VALUE => serialize($itemVariable)));
 }
 public function storeItemVariable($deliveryResultIdentifier, $test, $item, taoResultServer_models_classes_Variable $itemVariable, $callIdItem)
 {
     if (!$itemVariable->isSetEpoch()) {
         $itemVariable->setEpoch(microtime());
     }
     $data = array("deliveryResultIdentifier" => $deliveryResultIdentifier, "test" => $test, "item" => $item, "variable" => serialize($itemVariable), "callIdItem" => $callIdItem, "callIdTest" => null, "uri" => $deliveryResultIdentifier . $callIdItem, "class" => get_class($itemVariable));
     $this->storeVariableKeyValue($callIdItem, $itemVariable->getIdentifier(), $data);
 }