Beispiel #1
0
 public static function getPhpNameMap()
 {
     if (self::$phpNameMap === null) {
         $map = EmployeePeer::getTableMap();
         $columns = $map->getColumns();
         $nameMap = array();
         foreach ($columns as $column) {
             $nameMap[$column->getPhpName()] = $column->getColumnName();
         }
         self::$phpNameMap = $nameMap;
     }
     return self::$phpNameMap;
 }
Beispiel #2
0
 public function filter($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'DEPARTMENT_ID') {
             $c->addJoin(DepartmentPeer::ID, AcademicCalendarPeer::DEPARTMENT_ID);
             $c->addJoin(CounselingPeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
             $column = DepartmentPeer::getTableMap()->getColumn('ID');
         } elseif ($key == 'CODE_CLASS') {
             $c->addJoin(CounselingPeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
             $column = ClassGroupPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'CLASS_GROUP_ID') {
             $c->addJoin(CounselingPeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
             $c->addJoin(VClassParentPeer::ID, ClassGroupPeer::PARENT);
             $column = VClassParentPeer::getTableMap()->getColumn('ID');
         } elseif ($key == 'EMPLOYEE_NAME') {
             $c->addJoin(EmployeePeer::ID, CounselingTutorPeer::EMPLOYEE_ID);
             $c->addJoin(CounselingPeer::ID, CounselingTutorPeer::COUNSELING_ID);
             $column = EmployeePeer::getTableMap()->getColumn('NAME');
         } else {
             $column = CounselingPeer::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);
                 }
             }
         }
     }
 }
Beispiel #3
0
 public function filterEkskul($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'DEPARTMENT_ID') {
             $c->addJoin(DepartmentPeer::ID, AcademicCalendarPeer::DEPARTMENT_ID);
             $c->addJoin(SchedulePeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
             $column = DepartmentPeer::getTableMap()->getColumn('ID');
         } elseif ($key == 'CODE_CLASS') {
             $c->addJoin(SchedulePeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
             $column = ClassGroupPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'EMPLOYEE_NAME') {
             $c->addJoin(SchedulePeer::EMPLOYEE_ID, EmployeePeer::ID);
             $column = EmployeePeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'SUBJECT_ID') {
             $c->addJoin(SubjectPeer::ID, SubjectCurrPeer::SUBJECT_ID);
             $c->addJoin(SubjectCurrPeer::ID, SchedulePeer::SUBJECT_CURR_ID);
             $column = SubjectPeer::getTableMap()->getColumn('ID');
         } elseif ($key == 'SUBJECT_NAME') {
             $c->addJoin(SubjectPeer::ID, SubjectCurrPeer::SUBJECT_ID);
             $c->addJoin(SubjectCurrPeer::ID, SchedulePeer::SUBJECT_CURR_ID);
             $column = SubjectPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'EKSUL_NAME') {
             $c->addJoin(SchedulePeer::GRADE_COMPONENT_ID, GradeComponentPeer::ID);
             $column = GradeComponentPeer::getTableMap()->getColumn('NAME');
         } else {
             $column = SchedulePeer::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::DATE) {
                 $c->add($name, $value, Criteria::LIKE);
             } else {
                 if ($creoleType == CreoleTypes::INTEGER) {
                     $c->add($name, $value, Criteria::EQUAL);
                 } else {
                     if ($creoleType == CreoleTypes::VARCHAR) {
                         $c->add($name, "%{$value}%", Criteria::LIKE);
                     }
                 }
             }
         }
     }
 }
Beispiel #4
0
 public function filterPermit($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'EXTRA_CODE') {
             $c->addJoin(EmployeePeer::ID, EmployeePermitPeer::EMPLOYEE_ID);
             $c->addJoin(EmployeeDetailPeer::EMPLOYEE_ID, EmployeePeer::ID);
             $column = EmployeeDetailPeer::getTableMap()->getColumn('EXTRA_CODE');
         } elseif ($key == 'LEVEL') {
             $c->addJoin(EmployeeLevelPeer::ID, EmployeePermitPeer::EMPLOYEE_LEVEL_ID);
             $column = EmployeeLevelPeer::getTableMap()->getColumn('LEVEL');
         } elseif ($key == 'EMP_NO') {
             $c->addJoin(EmployeePeer::ID, EmployeePermitPeer::EMPLOYEE_ID);
             $column = EmployeePeer::getTableMap()->getColumn('CODE');
         } elseif ($key == 'EMP_NAME') {
             $c->addJoin(EmployeePeer::ID, EmployeePermitPeer::EMPLOYEE_ID);
             $column = EmployeePeer::getTableMap()->getColumn('NAME');
         } else {
             $column = EmployeePermitPeer::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);
             }
         } elseif ($creoleType == CreoleTypes::DATE) {
             $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 || $creoleType == CreoleTypes::CHAR) {
                     $c->add($name, "%{$value}%", Criteria::LIKE);
                 }
             }
         }
     }
 }
Beispiel #5
0
 public function filter($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'GRADE_COMPONENT_ID') {
             $c->addJoin(ClassAgendaPeer::SUBJECT_GRADING_ID, SubjectGradingPeer::ID);
             $c->addJoin(SubjectGradingPeer::GRADE_COMPONENT_ID, GradeComponentPeer::ID);
             $column = GradeComponentPeer::getTableMap()->getColumn('ID');
         } elseif ($key == 'SUBJECT_NAME') {
             $c->addJoin(ClassAgendaPeer::COURSE_SCHEDULE_ID, CourseSchedulePeer::ID);
             $c->addJoin(CourseSchedulePeer::SUBJECT_CURR_ID, SubjectCurrPeer::ID);
             $c->addJoin(SubjectCurrPeer::SUBJECT_ID, SubjectPeer::ID);
             $column = SubjectPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'EMPLOYEE_ID') {
             $c->addJoin(ClassAgendaPeer::COURSE_SCHEDULE_ID, CourseSchedulePeer::ID);
             $c->addJoin(CourseSchedulePeer::ID, CourseScheduleTutorPeer::COURSE_SCHEDULE_ID);
             $c->addJoin(CourseScheduleTutorPeer::EMPLOYEE_ID, EmployeePeer::ID);
             $column = EmployeePeer::getTableMap()->getColumn('ID');
         } else {
             $column = ClassAgendaPeer::getTableMap()->getColumn($key);
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $c->add($name, $value, Criteria::LIKE);
         } else {
             if ($creoleType == CreoleTypes::DATE) {
                 $c->add($name, $value, Criteria::LIKE);
             } else {
                 if ($creoleType == CreoleTypes::INTEGER) {
                     $c->add($name, $value, Criteria::EQUAL);
                 } else {
                     if ($creoleType == CreoleTypes::VARCHAR || $creoleType == CreoleTypes::CHAR) {
                         $c->add($name, "%{$value}%", Criteria::LIKE);
                     }
                 }
             }
         }
     }
 }
Beispiel #6
0
 public function filter($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'STUDENT_NAME') {
             $c->addJoin(StudentPeer::ID, InboxPeer::STUDENT_ID);
             $column = StudentPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'EMPLOYEE_NAME') {
             $c->addJoin(EmployeePeer::ID, InboxPeer::EMPLOYEE_ID);
             $column = EmployeePeer::getTableMap()->getColumn('NAME');
         } else {
             $column = InboxPeer::getTableMap()->getColumn($key);
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::DATE) {
             $c->add($name, $value, Criteria::LIKE);
         } else {
             if ($creoleType == CreoleTypes::INTEGER) {
                 $c->add($name, $value, Criteria::EQUAL);
             } else {
                 if ($creoleType == CreoleTypes::VARCHAR || $creoleType == CreoleTypes::CHAR) {
                     $c->add($name, "%{$value}%", Criteria::LIKE);
                 }
             }
         }
     }
 }
Beispiel #7
0
 public function filter($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'CODE_CLASS') {
             $c->addJoin(CourseSchedulePeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
             $column = ClassGroupPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'EMPLOYEE_NAME') {
             $c->addJoin(CourseSchedulePeer::ID, CourseScheduleTutorPeer::COURSE_SCHEDULE_ID);
             $c->addJoin(CourseScheduleTutorPeer::EMPLOYEE_ID, EmployeePeer::ID);
             $column = EmployeePeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'SUBJECT_ID') {
             $c->addJoin(SubjectPeer::ID, SubjectCurrPeer::SUBJECT_ID);
             $c->addJoin(SubjectCurrPeer::ID, CourseSchedulePeer::SUBJECT_CURR_ID);
             $column = SubjectCurrPeer::getTableMap()->getColumn($key);
         } elseif ($key == 'SUBJECT_NAME') {
             $c->addJoin(SubjectPeer::ID, SubjectCurrPeer::SUBJECT_ID);
             $c->addJoin(SubjectCurrPeer::ID, CourseSchedulePeer::SUBJECT_CURR_ID);
             $column = SubjectPeer::getTableMap()->getColumn('NAME');
         } else {
             $column = CourseSchedulePeer::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);
                 }
             }
         }
     }
 }
Beispiel #8
0
 public function filter($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'YEAR') {
             $c->addJoin(SubjectAccalPeer::SUBJECT_ID, SubjectPeer::ID);
             $c->addJoin(AcademicCalendarPeer::ID, SubjectAccalPeer::ACADEMIC_CALENDAR_ID);
             $column = AcademicCalendarPeer::getTableMap()->getColumn('YEAR');
         } elseif ($key == 'EMPLOYEE_NAME') {
             $c->addJoin(SubjectAccalPeer::SUBJECT_ID, SubjectPeer::ID);
             $c->addJoin(EmployeePeer::ID, SubjectAccalPeer::EMPLOYEE_ID);
             $column = EmployeePeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'CODE') {
             $column = SubjectPeer::getTableMap()->getColumn('CODE');
         } else {
             $column = SubjectPeer::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 || $creoleType == CreoleTypes::CHAR) {
                     $c->add($name, "%{$value}%", Criteria::LIKE);
                 }
             }
         }
     }
 }
Beispiel #9
0
 public function filterAbsence($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'EXTRA_CODE') {
             $c->addJoin(EmployeePeer::ID, EmployeeAbsenceDevPeer::EMPLOYEE_ID);
             $c->addJoin(EmployeeDetailPeer::EMPLOYEE_ID, EmployeePeer::ID);
             $column = EmployeeDetailPeer::getTableMap()->getColumn('EXTRA_CODE');
         } elseif ($key == 'FINGERCODE') {
             $c->addJoin(EmployeePeer::ID, EmployeeAbsenceDevPeer::EMPLOYEE_ID);
             $c->addJoin(EmployeeDetailPeer::EMPLOYEE_ID, EmployeePeer::ID);
             $column = EmployeeDetailPeer::getTableMap()->getColumn('FINGERCODE');
         } elseif ($key = 'EMP_NO') {
             $c->addJoin(EmployeePeer::ID, EmployeeAbsenceDevPeer::EMPLOYEE_ID);
             $column = EmployeePeer::getTableMap()->getColumn('CODE');
         } elseif ($key = 'EMP_NAME') {
             $c->addJoin(EmployeePeer::ID, EmployeeAbsenceDevPeer::EMPLOYEE_ID);
             $column = EmployeePeer::getTableMap()->getColumn('NAME');
         } elseif ($key = 'DEPARTMENT_ID') {
             $c->addJoin(EmployeePeer::ID, EmployeeAbsenceDevPeer::EMPLOYEE_ID);
             $c->addJoin(DepartmentPeer::ID, EmployeePeer::DEPARTMENT_ID);
             $column = DepartmentPeer::getTableMap()->getColumn('ID');
         } elseif ($key = 'STATUS') {
             $column = EmployeeAbsenceDevPeer::getTableMap()->getColumn('STATUS');
         } else {
             $column = EmployeeAbsenceDevPeer::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);
             }
         } elseif ($creoleType == CreoleTypes::DATE) {
             #$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);
             $c->add($name, $value, Criteria::EQUAL);
         } elseif ($creoleType == CreoleTypes::INTEGER) {
             $c->add($name, $value, Criteria::EQUAL);
         } elseif ($creoleType == CreoleTypes::VARCHAR || $creoleType == CreoleTypes::CHAR) {
             $c->add($name, "%{$value}%", Criteria::LIKE);
         }
     }
 }
Beispiel #10
0
 public function filterEmployee($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         $column = EmployeePeer::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);
                 }
             }
         }
     }
 }