public static function retrieveByPK($department_id, $col_location_id, $cat_category_id, $con = null) { if ($con === null) { $con = Propel::getConnection(self::DATABASE_NAME); } $criteria = new Criteria(); $criteria->add(VTotalCollectionPeer::DEPARTMENT_ID, $department_id); $criteria->add(VTotalCollectionPeer::COL_LOCATION_ID, $col_location_id); $criteria->add(VTotalCollectionPeer::CAT_CATEGORY_ID, $cat_category_id); $v = VTotalCollectionPeer::doSelect($criteria, $con); return !empty($v) ? $v[0] : null; }
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = VTotalCollectionPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setDepartmentId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setColLocationId($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setCatCategoryId($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setTotalColItem($arr[$keys[3]]); } }