Example #1
0
 public function setup()
 {
     $dataSource = new Atrox_Core_Data_Source();
     $dataSource->addProperty(new Atrox_Core_Data_Property("Id", Atrox_Core_Data_Property::TYPE_INTEGER));
     $dataSource->addProperty(new Atrox_Core_Data_Property("Start", Atrox_Core_Data_Property::TYPE_STRING));
     $dataSource->addProperty(new Atrox_Core_Data_Property("Destination", Atrox_Core_Data_Property::TYPE_STRING));
 }
Example #2
0
 /**
  *
  * @param string $tableName
  * @param string $idName
  * @param string $sequenceName
  * @param Atrox_Core_Data_IConnection $connection
  * @return void
  */
 public function __construct($tableName, $idName = "Id", $sequenceName = null, Atrox_Core_Data_IConnection $connection = null)
 {
     parent::__construct($connection);
     $this->setTableName($tableName);
     $this->setIdName($idName);
     if ($sequenceName) {
         $this->parsedSequenceName = $this->connection->parseField($sequenceName);
     } else {
         $this->parsedSequenceName = $this->connection->parseTable($tableName);
     }
     $this->application = Atrox_Application_Application::getInstance();
 }
Example #3
0
 public function addJoin($tableFrom, $propertyFrom, $tableTo, $propertyTo, $as = null)
 {
     $connection = $this->dataSource->getConnection();
     $newJoin["FullTableFrom"] = $connection->parseTable($tableFrom);
     $newJoin["FullPropertyFrom"] = $connection->parseField($propertyFrom);
     $newJoin["FullTableTo"] = $connection->parseTable($tableTo);
     $newJoin["FullPropertyTo"] = $connection->parseField($propertyTo);
     $newJoin["As"] = null;
     if ($as) {
         $newJoin["As"] = $connection->parseTable($as);
     }
     $this->joins[] = $newJoin;
 }
Example #4
0
 public function format($value)
 {
     return $this->source->getCurrentDateTime();
 }
Example #5
0
 /**
  *
  * @param string $name
  * @param string $id
  * @param Atrox_Core_Data_IConnection $connection
  * @return void
  */
 public function __construct($name, $id = "Id", Atrox_Core_Data_IConnection $connection = null)
 {
     parent::__construct($name, $id, $connection);
     $this->serviceLocator = Atrox_Core_ServiceLocator::getInstance();
     $this->parsedSequenceName = $this->connection->parsePropertyName("{$name}_{$id}_seq");
 }
Example #6
0
 /**
  *
  * @return int
  */
 public function getCount()
 {
     return $this->dataSource->getConnection()->getRowCount($this->result);
 }