/** * Remove record * * @param string $applicationUid Unique id of Case * @param int $delIndex Delegation index * * return void */ public function remove($applicationUid, $delIndex = 0) { try { $criteria = new Criteria("workflow"); $criteria->add(AppAssignSelfServiceValuePeer::APP_UID, $applicationUid, Criteria::EQUAL); if ($delIndex != 0) { $criteria->add(AppAssignSelfServiceValuePeer::DEL_INDEX, $delIndex, Criteria::EQUAL); } $result = AppAssignSelfServiceValuePeer::doDelete($criteria); } catch (Exception $e) { throw $e; } }
/** * Removes this object from datastore and sets delete attribute. * * @param Connection $con * @return void * @throws PropelException * @see BaseObject::setDeleted() * @see BaseObject::isDeleted() */ public function delete($con = null) { if ($this->isDeleted()) { throw new PropelException("This object has already been deleted."); } if ($con === null) { $con = Propel::getConnection(AppAssignSelfServiceValuePeer::DATABASE_NAME); } try { $con->begin(); AppAssignSelfServiceValuePeer::doDelete($this, $con); $this->setDeleted(true); $con->commit(); } catch (PropelException $e) { $con->rollback(); throw $e; } }