public function getVCirHistoryMembersJoinMember($criteria = null, $con = null) { include_once 'lib/model/om/BaseVCirHistoryMemberPeer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } if ($this->collVCirHistoryMembers === null) { if ($this->isNew()) { $this->collVCirHistoryMembers = array(); } else { $criteria->add(VCirHistoryMemberPeer::COL_STATUS_ID, $this->getId()); $this->collVCirHistoryMembers = VCirHistoryMemberPeer::doSelectJoinMember($criteria, $con); } } else { $criteria->add(VCirHistoryMemberPeer::COL_STATUS_ID, $this->getId()); if (!isset($this->lastVCirHistoryMemberCriteria) || !$this->lastVCirHistoryMemberCriteria->equals($criteria)) { $this->collVCirHistoryMembers = VCirHistoryMemberPeer::doSelectJoinMember($criteria, $con); } } $this->lastVCirHistoryMemberCriteria = $criteria; return $this->collVCirHistoryMembers; }
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = VCirHistoryMemberPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setColItemId($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setMemberId($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setColStatusId($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setOrderDate($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setDueDate($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setReturnDate($arr[$keys[6]]); } if (array_key_exists($keys[7], $arr)) { $this->setOrderNote($arr[$keys[7]]); } if (array_key_exists($keys[8], $arr)) { $this->setReturnNote($arr[$keys[8]]); } if (array_key_exists($keys[9], $arr)) { $this->setFine($arr[$keys[9]]); } if (array_key_exists($keys[10], $arr)) { $this->setMiscFine($arr[$keys[10]]); } if (array_key_exists($keys[11], $arr)) { $this->setMemberName($arr[$keys[11]]); } }
public static function retrieveByPKs($pks, $con = null) { if ($con === null) { $con = Propel::getConnection(self::DATABASE_NAME); } $objs = null; if (empty($pks)) { $objs = array(); } else { $criteria = new Criteria(); $criteria->add(VCirHistoryMemberPeer::ID, $pks, Criteria::IN); $objs = VCirHistoryMemberPeer::doSelect($criteria, $con); } return $objs; }
public function filter($c, $filters) { $filters_key = array_keys($filters); foreach ($filters_key as $key) { $value = $filters[$key]; if ($value == '' || $value == null) { continue; } $column = VCirHistoryMemberPeer::getTableMap()->getColumn($key); $name = $column->getFullyQualifiedName(); $creoleType = $column->getCreoleType(); if ($creoleType == CreoleTypes::TIMESTAMP) { $from = $value['from']; $to = $value['to']; if ($from != '' && $from != null) { $c->add($name, $from, Criteria::GREATER_EQUAL); } if ($to != '' && $to != null) { $c->add($name, $to, Criteria::LESS_EQUAL); } } else { if ($creoleType == CreoleTypes::INTEGER) { $c->add($name, $value, Criteria::EQUAL); } else { if ($creoleType == CreoleTypes::VARCHAR) { $c->add($name, "%{$value}%", Criteria::LIKE); } else { if ($creoleType == CreoleTypes::DATE) { $c->add($name, $value, Criteria::EQUAL); } } } } } }