public function getVSubjectAccalLectorStudentsJoinDepartment($criteria = null, $con = null) { include_once 'lib/model/om/BaseVSubjectAccalLectorStudentPeer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } if ($this->collVSubjectAccalLectorStudents === null) { if ($this->isNew()) { $this->collVSubjectAccalLectorStudents = array(); } else { $criteria->add(VSubjectAccalLectorStudentPeer::EMPLOYEE_ID, $this->getId()); $this->collVSubjectAccalLectorStudents = VSubjectAccalLectorStudentPeer::doSelectJoinDepartment($criteria, $con); } } else { $criteria->add(VSubjectAccalLectorStudentPeer::EMPLOYEE_ID, $this->getId()); if (!isset($this->lastVSubjectAccalLectorStudentCriteria) || !$this->lastVSubjectAccalLectorStudentCriteria->equals($criteria)) { $this->collVSubjectAccalLectorStudents = VSubjectAccalLectorStudentPeer::doSelectJoinDepartment($criteria, $con); } } $this->lastVSubjectAccalLectorStudentCriteria = $criteria; return $this->collVSubjectAccalLectorStudents; }
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = VSubjectAccalLectorStudentPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setSubjectAccalId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setLector($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setClassGroupId($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setAcademicCalendarId($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setSubjectId($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setEmployeeId($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setSemester($arr[$keys[6]]); } if (array_key_exists($keys[7], $arr)) { $this->setCurriculumId($arr[$keys[7]]); } if (array_key_exists($keys[8], $arr)) { $this->setDepartmentId($arr[$keys[8]]); } if (array_key_exists($keys[9], $arr)) { $this->setScheduleCount($arr[$keys[9]]); } if (array_key_exists($keys[10], $arr)) { $this->setStudentActiveCount($arr[$keys[10]]); } }
public function filter($c, $filters) { $filters_key = array_keys($filters); foreach ($filters_key as $key) { $value = $filters[$key]; if ($value == '' || $value == null) { continue; } $column = VSubjectAccalLectorStudentPeer::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 || $creoleType == CreoleTypes::BIGINT) { $c->add($name, $value, Criteria::EQUAL); } else { if ($creoleType == CreoleTypes::VARCHAR) { $c->add($name, "%{$value}%", Criteria::LIKE); } } } } }
public static function retrieveByPK($subject_accal_id, $class_group_id, $con = null) { if ($con === null) { $con = Propel::getConnection(self::DATABASE_NAME); } $criteria = new Criteria(); $criteria->add(VSubjectAccalLectorStudentPeer::SUBJECT_ACCAL_ID, $subject_accal_id); $criteria->add(VSubjectAccalLectorStudentPeer::CLASS_GROUP_ID, $class_group_id); $v = VSubjectAccalLectorStudentPeer::doSelect($criteria, $con); return !empty($v) ? $v[0] : null; }