/** * 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 MessageEventRelationPeer::populateObjects(MessageEventRelationPeer::doSelectRS($criteria, $con)); }
/** * Get data of a Message-Event-Relation * * @param array $arrayCondition Conditions * @param bool $flagGetRecord Value that set the getting * * return array Return an array with data of a Message-Event-Relation, otherwise null */ public function getMessageEventRelationWhere(array $arrayCondition, $flagGetRecord = false) { try { //Get data $criteria = $this->getMessageEventRelationCriteria(); foreach ($arrayCondition as $key => $value) { if (is_array($value)) { $criteria->add($key, $value[0], $value[1]); } else { $criteria->add($key, $value, \Criteria::EQUAL); } } $rsCriteria = \MessageEventRelationPeer::doSelectRS($criteria); $rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC); if ($rsCriteria->next()) { $row = $rsCriteria->getRow(); //Return return !$flagGetRecord ? $this->getMessageEventRelationDataFromRecord($row) : $row; } else { //Return return null; } } catch (\Exception $e) { throw $e; } }