id; } public function getPopis() { return $this->popis; } public function getCssStyl() { return $this->css_styl; } public function getLogin() { return $this->login; } public function getHeslo() { return $this->heslo; } public function getFltrZakVsPrefix() { return $this->fltr_zak_vs_prefix; } public function getFiltrZakBuNazev() { return $this->filtr_zak_bu_nazev; } public function setId($v) { if ($v !== null && !is_int($v) && is_numeric($v)) { $v = (int) $v; } if ($this->id !== $v) { $this->id = $v; $this->modifiedColumns[] = PristupyPeer::ID; } } public function setPopis($v) { if ($v !== null && !is_string($v)) { $v = (string) $v; } if ($this->popis !== $v) { $this->popis = $v; $this->modifiedColumns[] = PristupyPeer::POPIS; } } public function setCssStyl($v) { if ($v !== null && !is_string($v)) { $v = (string) $v; } if ($this->css_styl !== $v) { $this->css_styl = $v; $this->modifiedColumns[] = PristupyPeer::CSS_STYL; } } public function setLogin($v) { if ($v !== null && !is_string($v)) { $v = (string) $v; } if ($this->login !== $v) { $this->login = $v; $this->modifiedColumns[] = PristupyPeer::LOGIN; } } public function setHeslo($v) { if ($v !== null && !is_string($v)) { $v = (string) $v; } if ($this->heslo !== $v) { $this->heslo = $v; $this->modifiedColumns[] = PristupyPeer::HESLO; } } public function setFltrZakVsPrefix($v) { if ($v !== null && !is_int($v) && is_numeric($v)) { $v = (int) $v; } if ($this->fltr_zak_vs_prefix !== $v) { $this->fltr_zak_vs_prefix = $v; $this->modifiedColumns[] = PristupyPeer::FLTR_ZAK_VS_PREFIX; } } public function setFiltrZakBuNazev($v) { if ($v !== null && !is_string($v)) { $v = (string) $v; } if ($this->filtr_zak_bu_nazev !== $v) { $this->filtr_zak_bu_nazev = $v; $this->modifiedColumns[] = PristupyPeer::FILTR_ZAK_BU_NAZEV; } } public function hydrate(ResultSet $rs, $startcol = 1) { try { $this->id = $rs->getInt($startcol + 0); $this->popis = $rs->getString($startcol + 1); $this->css_styl = $rs->getString($startcol + 2); $this->login = $rs->getString($startcol + 3); $this->heslo = $rs->getString($startcol + 4); $this->fltr_zak_vs_prefix = $rs->getInt($startcol + 5); $this->filtr_zak_bu_nazev = $rs->getString($startcol + 6); $this->resetModified(); $this->setNew(false); return $startcol + 7; } catch (Exception $e) { throw new PropelException("Error populating Pristupy object", $e); } } public function delete($con = null) { if ($this->isDeleted()) { throw new PropelException("This object has already been deleted."); } if ($con === null) { $con = Propel::getConnection(PristupyPeer::DATABASE_NAME); } try { $con->begin(); PristupyPeer::doDelete($this, $con); $this->setDeleted(true); $con->commit(); } catch (PropelException $e) { $con->rollback(); throw $e; } } public function save($con = null) { if ($this->isDeleted()) { throw new PropelException("You cannot save an object that has been deleted."); } if ($con === null) { $con = Propel::getConnection(PristupyPeer::DATABASE_NAME); } try { $con->begin(); $affectedRows = $this->doSave($con); $con->commit(); return $affectedRows; } catch (PropelException $e) { $con->rollback(); throw $e; } } protected function doSave($con) { $affectedRows = 0; if (!$this->alreadyInSave) { $this->alreadyInSave = true; if ($this->isModified()) { if ($this->isNew()) { $pk = PristupyPeer::doInsert($this, $con); $affectedRows += 1; $this->setId($pk); $this->setNew(false); } else { $affectedRows += PristupyPeer::doUpdate($this, $con); } $this->resetModified(); } $this->alreadyInSave = false; } return $affectedRows; } protected $validationFailures = array(); public function getValidationFailures() { return $this->validationFailures; } public function validate($columns = null) { $res = $this->doValidate($columns); if ($res === true) { $this->validationFailures = array(); return true; } else { $this->validationFailures = $res; return false; } } protected function doValidate($columns = null) { if (!$this->alreadyInValidation) { $this->alreadyInValidation = true; $retval = null; $failureMap = array(); if (($retval = PristupyPeer::doValidate($this, $columns)) !== true) { $failureMap = array_merge($failureMap, $retval); } $this->alreadyInValidation = false; } return (!empty($failureMap) ? $failureMap : true); } public function getByName($name, $type = BasePeer::TYPE_PHPNAME) { $pos = PristupyPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); return $this->getByPosition($pos); } public function getByPosition($pos) { switch($pos) { case 0: return $this->getId(); break; case 1: return $this->getPopis(); break; case 2: return $this->getCssStyl(); break; case 3: return $this->getLogin(); break; case 4: return $this->getHeslo(); break; case 5: return $this->getFltrZakVsPrefix(); break; case 6: return $this->getFiltrZakBuNazev(); break; default: return null; break; } } public function toArray($keyType = BasePeer::TYPE_PHPNAME) { $keys = PristupyPeer::getFieldNames($keyType); $result = array( $keys[0] => $this->getId(), $keys[1] => $this->getPopis(), $keys[2] => $this->getCssStyl(), $keys[3] => $this->getLogin(), $keys[4] => $this->getHeslo(), $keys[5] => $this->getFltrZakVsPrefix(), $keys[6] => $this->getFiltrZakBuNazev(), ); return $result; } public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) { $pos = PristupyPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); return $this->setByPosition($pos, $value); } public function setByPosition($pos, $value) { switch($pos) { case 0: $this->setId($value); break; case 1: $this->setPopis($value); break; case 2: $this->setCssStyl($value); break; case 3: $this->setLogin($value); break; case 4: $this->setHeslo($value); break; case 5: $this->setFltrZakVsPrefix($value); break; case 6: $this->setFiltrZakBuNazev($value); break; } } public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = PristupyPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]); if (array_key_exists($keys[1], $arr)) $this->setPopis($arr[$keys[1]]); if (array_key_exists($keys[2], $arr)) $this->setCssStyl($arr[$keys[2]]); if (array_key_exists($keys[3], $arr)) $this->setLogin($arr[$keys[3]]); if (array_key_exists($keys[4], $arr)) $this->setHeslo($arr[$keys[4]]); if (array_key_exists($keys[5], $arr)) $this->setFltrZakVsPrefix($arr[$keys[5]]); if (array_key_exists($keys[6], $arr)) $this->setFiltrZakBuNazev($arr[$keys[6]]); } public function buildCriteria() { $criteria = new Criteria(PristupyPeer::DATABASE_NAME); if ($this->isColumnModified(PristupyPeer::ID)) $criteria->add(PristupyPeer::ID, $this->id); if ($this->isColumnModified(PristupyPeer::POPIS)) $criteria->add(PristupyPeer::POPIS, $this->popis); if ($this->isColumnModified(PristupyPeer::CSS_STYL)) $criteria->add(PristupyPeer::CSS_STYL, $this->css_styl); if ($this->isColumnModified(PristupyPeer::LOGIN)) $criteria->add(PristupyPeer::LOGIN, $this->login); if ($this->isColumnModified(PristupyPeer::HESLO)) $criteria->add(PristupyPeer::HESLO, $this->heslo); if ($this->isColumnModified(PristupyPeer::FLTR_ZAK_VS_PREFIX)) $criteria->add(PristupyPeer::FLTR_ZAK_VS_PREFIX, $this->fltr_zak_vs_prefix); if ($this->isColumnModified(PristupyPeer::FILTR_ZAK_BU_NAZEV)) $criteria->add(PristupyPeer::FILTR_ZAK_BU_NAZEV, $this->filtr_zak_bu_nazev); return $criteria; } public function buildPkeyCriteria() { $criteria = new Criteria(PristupyPeer::DATABASE_NAME); $criteria->add(PristupyPeer::ID, $this->id); return $criteria; } public function getPrimaryKey() { return $this->getId(); } public function setPrimaryKey($key) { $this->setId($key); } public function copyInto($copyObj, $deepCopy = false) { $copyObj->setPopis($this->popis); $copyObj->setCssStyl($this->css_styl); $copyObj->setLogin($this->login); $copyObj->setHeslo($this->heslo); $copyObj->setFltrZakVsPrefix($this->fltr_zak_vs_prefix); $copyObj->setFiltrZakBuNazev($this->filtr_zak_bu_nazev); $copyObj->setNew(true); $copyObj->setId(NULL); } public function copy($deepCopy = false) { $clazz = get_class($this); $copyObj = new $clazz(); $this->copyInto($copyObj, $deepCopy); return $copyObj; } public function getPeer() { if (self::$peer === null) { self::$peer = new PristupyPeer(); } return self::$peer; } }