Beispiel #1
0
 /**
  * Reads the dataset with the given primary key
  *
  * @param type $datasetId
  * @return \Qsardw\Frontend\Data\Beans\Dataset
  */
 public function read($datasetId)
 {
     $sql = "SELECT * FROM {$this->getTable()} WHERE id = :datasetId";
     $params = array('datasetId' => $datasetId);
     $row = $this->executeQueryAndReturnRow($sql, $params);
     $datasetBean = new Beans\Dataset();
     $datasetBean->fromRow($row);
     return $datasetBean;
 }
Beispiel #2
0
 /**
  * Gets an empty dataset
  * @return \Qsardw\Frontend\Data\Beans\Dataset
  */
 public static function getDataset()
 {
     $dataset = new Beans\Dataset();
     $dataset->setStatus(0);
     $dataset->setCreatedOn(date(Application::TIMESTAMP));
     $dataset->setDistinctMolecules(0);
     $dataset->setInitialMolecules(0);
     $dataset->setIsCleaned(0);
     $dataset->setTs(date(Application::TIMESTAMP));
     return $dataset;
 }