/** * 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; } }
/** * 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; } }
/** * Method to do selects. * * @param Criteria $criteria The Criteria object used to build the SELECT statement. * @param Connection $con * @return array Array of selected Objects * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ public static function doSelect(Criteria $criteria, $con = null) { return AppSolrQueuePeer::populateObjects(AppSolrQueuePeer::doSelectRS($criteria, $con)); }