/** * Checks for existing SalaryCurrencyDetail for a given currency * @param SalaryCurrencyDetail $salaryCurrencyDetail * @returns boolean * @throws DaoException */ public function isExistingSalleryGradeCurrency(SalaryCurrencyDetail $salaryCurrencyDetail) { try { $q = Doctrine_Query::create()->from('SalaryCurrencyDetail')->where("sal_grd_code='" . $salaryCurrencyDetail->getSalGrdCode() . "' AND currency_id='" . $salaryCurrencyDetail->getCurrencyId() . "'"); if ($q->count() > 0) { return true; } return false; } catch (Exception $e) { throw new DaoException($e->getMessage()); } }