id; } public function getAmount() { return $this->amount; } public function getCreatedAt($format = 'Y-m-d H:i:s') { if ($this->created_at === null || $this->created_at === '') { return null; } elseif (!is_int($this->created_at)) { $ts = strtotime($this->created_at); if ($ts === -1 || $ts === false) { throw new PropelException("Unable to parse value of [created_at] as date/time value: " . var_export($this->created_at, true)); } } else { $ts = $this->created_at; } if ($format === null) { return $ts; } elseif (strpos($format, '%') !== false) { return strftime($format, $ts); } else { return date($format, $ts); } } public function getVs() { return $this->vs; } public function getSs() { return $this->ss; } public function getKs() { return $this->ks; } public function getAccount() { return $this->account; } public function getOffset() { return $this->offset; } public function getNote() { return $this->note; } public function getIsProcessed() { return $this->is_processed; } public function getType() { return $this->type; } public function getPristupyId() { return $this->pristupy_id; } public function setId($v) { if ($v !== null && !is_int($v) && is_numeric($v)) { $v = (int) $v; } if ($this->id !== $v || $v === 0) { $this->id = $v; $this->modifiedColumns[] = FioPeer::ID; } } public function setAmount($v) { if ($this->amount !== $v) { $this->amount = $v; $this->modifiedColumns[] = FioPeer::AMOUNT; } } public function setCreatedAt($v) { if ($v !== null && !is_int($v)) { $ts = strtotime($v); if ($ts === -1 || $ts === false) { throw new PropelException("Unable to parse date/time value for [created_at] from input: " . var_export($v, true)); } } else { $ts = $v; } if ($this->created_at !== $ts) { $this->created_at = $ts; $this->modifiedColumns[] = FioPeer::CREATED_AT; } } public function setVs($v) { if ($v !== null && !is_string($v)) { $v = (string) $v; } if ($this->vs !== $v) { $this->vs = $v; $this->modifiedColumns[] = FioPeer::VS; } } public function setSs($v) { if ($v !== null && !is_string($v)) { $v = (string) $v; } if ($this->ss !== $v) { $this->ss = $v; $this->modifiedColumns[] = FioPeer::SS; } } public function setKs($v) { if ($v !== null && !is_string($v)) { $v = (string) $v; } if ($this->ks !== $v) { $this->ks = $v; $this->modifiedColumns[] = FioPeer::KS; } } public function setAccount($v) { if ($v !== null && !is_string($v)) { $v = (string) $v; } if ($this->account !== $v) { $this->account = $v; $this->modifiedColumns[] = FioPeer::ACCOUNT; } } public function setOffset($v) { if ($v !== null && !is_string($v)) { $v = (string) $v; } if ($this->offset !== $v) { $this->offset = $v; $this->modifiedColumns[] = FioPeer::OFFSET; } } public function setNote($v) { if ($v !== null && !is_string($v)) { $v = (string) $v; } if ($this->note !== $v) { $this->note = $v; $this->modifiedColumns[] = FioPeer::NOTE; } } public function setIsProcessed($v) { if ($v !== null && !is_int($v) && is_numeric($v)) { $v = (int) $v; } if ($this->is_processed !== $v || $v === 0) { $this->is_processed = $v; $this->modifiedColumns[] = FioPeer::IS_PROCESSED; } } public function setType($v) { if ($v !== null && !is_int($v) && is_numeric($v)) { $v = (int) $v; } if ($this->type !== $v || $v === 0) { $this->type = $v; $this->modifiedColumns[] = FioPeer::TYPE; } } public function setPristupyId($v) { if ($v !== null && !is_int($v) && is_numeric($v)) { $v = (int) $v; } if ($this->pristupy_id !== $v || $v === 0) { $this->pristupy_id = $v; $this->modifiedColumns[] = FioPeer::PRISTUPY_ID; } } public function hydrate(ResultSet $rs, $startcol = 1) { try { $this->id = $rs->getInt($startcol + 0); $this->amount = $rs->getFloat($startcol + 1); $this->created_at = $rs->getTimestamp($startcol + 2, null); $this->vs = $rs->getString($startcol + 3); $this->ss = $rs->getString($startcol + 4); $this->ks = $rs->getString($startcol + 5); $this->account = $rs->getString($startcol + 6); $this->offset = $rs->getString($startcol + 7); $this->note = $rs->getString($startcol + 8); $this->is_processed = $rs->getInt($startcol + 9); $this->type = $rs->getInt($startcol + 10); $this->pristupy_id = $rs->getInt($startcol + 11); $this->resetModified(); $this->setNew(false); return $startcol + 12; } catch (Exception $e) { throw new PropelException("Error populating Fio 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(FioPeer::DATABASE_NAME); } try { $con->begin(); FioPeer::doDelete($this, $con); $this->setDeleted(true); $con->commit(); } catch (PropelException $e) { $con->rollback(); throw $e; } } public function save($con = null) { if ($this->isNew() && !$this->isColumnModified(FioPeer::CREATED_AT)) { $this->setCreatedAt(time()); } if ($this->isDeleted()) { throw new PropelException("You cannot save an object that has been deleted."); } if ($con === null) { $con = Propel::getConnection(FioPeer::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 = FioPeer::doInsert($this, $con); $affectedRows += 1; $this->setNew(false); } else { $affectedRows += FioPeer::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 = FioPeer::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 = FioPeer::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->getAmount(); break; case 2: return $this->getCreatedAt(); break; case 3: return $this->getVs(); break; case 4: return $this->getSs(); break; case 5: return $this->getKs(); break; case 6: return $this->getAccount(); break; case 7: return $this->getOffset(); break; case 8: return $this->getNote(); break; case 9: return $this->getIsProcessed(); break; case 10: return $this->getType(); break; case 11: return $this->getPristupyId(); break; default: return null; break; } } public function toArray($keyType = BasePeer::TYPE_PHPNAME) { $keys = FioPeer::getFieldNames($keyType); $result = array( $keys[0] => $this->getId(), $keys[1] => $this->getAmount(), $keys[2] => $this->getCreatedAt(), $keys[3] => $this->getVs(), $keys[4] => $this->getSs(), $keys[5] => $this->getKs(), $keys[6] => $this->getAccount(), $keys[7] => $this->getOffset(), $keys[8] => $this->getNote(), $keys[9] => $this->getIsProcessed(), $keys[10] => $this->getType(), $keys[11] => $this->getPristupyId(), ); return $result; } public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) { $pos = FioPeer::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->setAmount($value); break; case 2: $this->setCreatedAt($value); break; case 3: $this->setVs($value); break; case 4: $this->setSs($value); break; case 5: $this->setKs($value); break; case 6: $this->setAccount($value); break; case 7: $this->setOffset($value); break; case 8: $this->setNote($value); break; case 9: $this->setIsProcessed($value); break; case 10: $this->setType($value); break; case 11: $this->setPristupyId($value); break; } } public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = FioPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]); if (array_key_exists($keys[1], $arr)) $this->setAmount($arr[$keys[1]]); if (array_key_exists($keys[2], $arr)) $this->setCreatedAt($arr[$keys[2]]); if (array_key_exists($keys[3], $arr)) $this->setVs($arr[$keys[3]]); if (array_key_exists($keys[4], $arr)) $this->setSs($arr[$keys[4]]); if (array_key_exists($keys[5], $arr)) $this->setKs($arr[$keys[5]]); if (array_key_exists($keys[6], $arr)) $this->setAccount($arr[$keys[6]]); if (array_key_exists($keys[7], $arr)) $this->setOffset($arr[$keys[7]]); if (array_key_exists($keys[8], $arr)) $this->setNote($arr[$keys[8]]); if (array_key_exists($keys[9], $arr)) $this->setIsProcessed($arr[$keys[9]]); if (array_key_exists($keys[10], $arr)) $this->setType($arr[$keys[10]]); if (array_key_exists($keys[11], $arr)) $this->setPristupyId($arr[$keys[11]]); } public function buildCriteria() { $criteria = new Criteria(FioPeer::DATABASE_NAME); if ($this->isColumnModified(FioPeer::ID)) $criteria->add(FioPeer::ID, $this->id); if ($this->isColumnModified(FioPeer::AMOUNT)) $criteria->add(FioPeer::AMOUNT, $this->amount); if ($this->isColumnModified(FioPeer::CREATED_AT)) $criteria->add(FioPeer::CREATED_AT, $this->created_at); if ($this->isColumnModified(FioPeer::VS)) $criteria->add(FioPeer::VS, $this->vs); if ($this->isColumnModified(FioPeer::SS)) $criteria->add(FioPeer::SS, $this->ss); if ($this->isColumnModified(FioPeer::KS)) $criteria->add(FioPeer::KS, $this->ks); if ($this->isColumnModified(FioPeer::ACCOUNT)) $criteria->add(FioPeer::ACCOUNT, $this->account); if ($this->isColumnModified(FioPeer::OFFSET)) $criteria->add(FioPeer::OFFSET, $this->offset); if ($this->isColumnModified(FioPeer::NOTE)) $criteria->add(FioPeer::NOTE, $this->note); if ($this->isColumnModified(FioPeer::IS_PROCESSED)) $criteria->add(FioPeer::IS_PROCESSED, $this->is_processed); if ($this->isColumnModified(FioPeer::TYPE)) $criteria->add(FioPeer::TYPE, $this->type); if ($this->isColumnModified(FioPeer::PRISTUPY_ID)) $criteria->add(FioPeer::PRISTUPY_ID, $this->pristupy_id); return $criteria; } public function buildPkeyCriteria() { $criteria = new Criteria(FioPeer::DATABASE_NAME); $criteria->add(FioPeer::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->setAmount($this->amount); $copyObj->setCreatedAt($this->created_at); $copyObj->setVs($this->vs); $copyObj->setSs($this->ss); $copyObj->setKs($this->ks); $copyObj->setAccount($this->account); $copyObj->setOffset($this->offset); $copyObj->setNote($this->note); $copyObj->setIsProcessed($this->is_processed); $copyObj->setType($this->type); $copyObj->setPristupyId($this->pristupy_id); $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 FioPeer(); } return self::$peer; } }