fromArray( $aData, BasePeer::TYPE_FIELDNAME ); if ($this->validate()) { $result = $this->save(); } else { $e = new Exception( "Failed Validation in class " . get_class( $this ) . "." ); $e->aValidationFailures = $this->getValidationFailures(); throw ($e); } $con->commit(); return $result; } catch (Exception $e) { $con->rollback(); throw ($e); } } public function remove($sVarUid) { $oConnection = Propel::getConnection(ProcessVariablesPeer::DATABASE_NAME); try { $oProcessVariables = ProcessVariablesPeer::retrieveByPK($sVarUid); if (!is_null($oProcessVariables)) { $oConnection->begin(); $iResult = $oProcessVariables->delete(); $oConnection->commit(); return $iResult; } else { throw(new Exception('This row doesn\'t exist!')); } } catch (Exception $oError) { $oConnection->rollback(); throw($oError); } } public function Exists ($sVarUid) { try { $oObj = ProcessVariablesPeer::retrieveByPk($sVarUid); return (is_object($oObj) && get_class($oObj) == 'ProcessVariables'); } catch (Exception $oError) { throw($oError); } } /** * verify if process variable row specified in [sUid] exists. * * @param string $sUid the uid */ public function ProcessVariableExists($sUid) { $con = Propel::getConnection(ProcessVariablesPeer::DATABASE_NAME); try { $oObj = ProcessVariablesPeer::retrieveByPk($sUid); if (is_object($oObj) && get_class($oObj) == 'ProcessVariables') { return true; } else { return false; } } catch (Exception $oError) { throw ($oError); } } } // ProcessVariables