static function createForRequest($data) { $obj = new Entity_AppSolrQueue(); $obj->initializeObject($data); $requiredFields = array("appUid", "appUpdated"); $obj->validateRequiredFields($requiredFields); return $obj; }
/** * Returns the list of updated applications * array of Entity_AppSolrQueue */ public function getListUpdatedApplications($updated = true, $deleted = true) { $updatedApplications = array(); try { $c = new Criteria(); $c->addSelectColumn(AppSolrQueuePeer::APP_UID); $c->addSelectColumn(AppSolrQueuePeer::APP_CHANGE_DATE); $c->addSelectColumn(AppSolrQueuePeer::APP_CHANGE_TRACE); $c->addSelectColumn(AppSolrQueuePeer::APP_UPDATED); //"WHERE if ($updated == true && $deleted == true) { $c->add(AppSolrQueuePeer::APP_UPDATED, 0, Criteria::NOT_EQUAL); } if ($updated == true && $deleted == false) { $c->add(AppSolrQueuePeer::APP_UPDATED, 1, Criteria::EQUAL); } if ($updated == false && $deleted == true) { $c->add(AppSolrQueuePeer::APP_UPDATED, 2, Criteria::EQUAL); } $rs = AppSolrQueuePeer::doSelectRS($c); $rs->setFetchmode(ResultSet::FETCHMODE_ASSOC); //echo $c->toString(); $rs->next(); $row = $rs->getRow(); while (is_array($row)) { $appSolrQueue = Entity_AppSolrQueue::createEmpty(); $appSolrQueue->appUid = $row["APP_UID"]; $appSolrQueue->appChangeDate = $row["APP_CHANGE_DATE"]; $appSolrQueue->appChangeTrace = $row["APP_CHANGE_TRACE"]; $appSolrQueue->appUpdated = $row["APP_UPDATED"]; $updatedApplications[] = $appSolrQueue; $rs->next(); $row = $rs->getRow(); } return $updatedApplications; } catch (Exception $e) { $con->rollback(); throw $e; } }
/** * Returns the list of updated applications * array of Entity_AppSolrQueue */ public function getListUpdatedApplications() { $updatedApplications = array(); try { $c = new Criteria(); $c->addSelectColumn(AppSolrQueuePeer::APP_UID); $c->addSelectColumn(AppSolrQueuePeer::APP_UPDATED); //"WHERE $c->add(AppSolrQueuePeer::APP_UPDATED, 0, Criteria::NOT_EQUAL); $rs = AppSolrQueuePeer::doSelectRS($c); $rs->setFetchmode(ResultSet::FETCHMODE_ASSOC); //echo $c->toString(); $rs->next(); $row = $rs->getRow(); while (is_array($row)) { $appSolrQueue = Entity_AppSolrQueue::createEmpty(); $appSolrQueue->appUid = $row['APP_UID']; $appSolrQueue->appUpdated = $row['APP_UPDATED']; $updatedApplications[] = $appSolrQueue; $rs->next(); $row = $rs->getRow(); } return $updatedApplications; } catch (Exception $e) { $con->rollback(); throw $e; } }