/**
  * 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(MessageEventDefinitionPeer::DATABASE_NAME);
     }
     try {
         $con->begin();
         MessageEventDefinitionPeer::doDelete($this, $con);
         $this->setDeleted(true);
         $con->commit();
     } catch (PropelException $e) {
         $con->rollback();
         throw $e;
     }
 }
 /**
  * Delete Message-Event-Definition
  *
  * @param string $messageEventDefinitionUid Unique id of Message-Event-Definition
  *
  * return void
  */
 public function delete($messageEventDefinitionUid)
 {
     try {
         //Verify data
         $this->throwExceptionIfNotExistsMessageEventDefinition($messageEventDefinitionUid, $this->arrayFieldNameForException["messageEventDefinitionUid"]);
         //Delete
         $criteria = new \Criteria("workflow");
         $criteria->add(\MessageEventDefinitionPeer::MSGED_UID, $messageEventDefinitionUid, \Criteria::EQUAL);
         $result = \MessageEventDefinitionPeer::doDelete($criteria);
     } catch (\Exception $e) {
         throw $e;
     }
 }