Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 703 | Rev 705 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 703 Rev 704
Línea 45... Línea 45...
45
    }
45
    }
Línea 46... Línea 46...
46
    
46
    
47
    /**
47
    /**
48
     * 
48
     * 
49
     * @param int $id
49
     * @param int $id
50
     * @return RecruitmentCandidate
50
     * @return RecruitmentSelectionCandidate
51
     */
51
     */
52
    public function fetchOne($id)
52
    public function fetchOne($id)
53
    {
53
    {
Línea 54... Línea 54...
54
        $prototype = new RecruitmentCandidate();
54
        $prototype = new RecruitmentSelectionCandidate();
55
        
55
        
Línea 56... Línea 56...
56
        $select = $this->sql->select(self::_TABLE);
56
        $select = $this->sql->select(self::_TABLE);
Línea 61... Línea 61...
61
    
61
    
62
    
62
    
63
    /**
63
    /**
64
     *
64
     *
65
     * @param int $uuid
65
     * @param int $uuid
66
     * @return RecruitmentCandidate
66
     * @return RecruitmentSelectionCandidate
67
     */
67
     */
68
    public function fetchOneByUuid($uuid)
68
    public function fetchOneByUuid($uuid)
69
    {
69
    {
70
        $prototype = new RecruitmentCandidate();
70
        $prototype = new RecruitmentSelectionCandidate();
Línea 71... Línea 71...
71
        $select = $this->sql->select(self::_TABLE);
71
        $select = $this->sql->select(self::_TABLE);
72
        $select->where->equalTo('uuid', $uuid);
72
        $select->where->equalTo('uuid', $uuid);
Línea 73... Línea 73...
73
        
73
        
74
        return $this->executeFetchOneObject($select, $prototype);
74
        return $this->executeFetchOneObject($select, $prototype);
75
    }
75
    }
76
   
76
   
77
    
77
    
78
    /**
78
    /**
79
     *
79
     *
80
     * @param int $company_id
80
     * @param int $company_id
Línea 81... Línea 81...
81
     * @return RecruitmentCandidate
81
     * @return RecruitmentSelectionCandidate
82
     */
82
     */
83
    public function fetchAllByCompanyId($company_id)
83
    public function fetchAllByCompanyId($company_id)
Línea 98... Línea 98...
98
     * @param int $user_id
98
     * @param int $user_id
99
     * @return RecruitmentSelectionVacancy
99
     * @return RecruitmentSelectionVacancy
100
     */
100
     */
101
    public function fetchAllByCompanyIdAndSelectionIdAndUserId($company_id, $selection_id, $user_id)
101
    public function fetchAllByCompanyIdAndSelectionIdAndUserId($company_id, $selection_id, $user_id)
102
    {
102
    {
103
        $prototype = new RecruitmentSelectionVacancy();
103
        $prototype = new RecruitmentSelectionCandidate();
Línea 104... Línea 104...
104
        
104
        
105
        $select = $this->sql->select(self::_TABLE);
105
        $select = $this->sql->select(self::_TABLE);
106
        $select->where->equalTo('company_id', $company_id);
106
        $select->where->equalTo('company_id', $company_id);
107
        $select->where->equalTo('selection_id', $selection_id);
107
        $select->where->equalTo('selection_id', $selection_id);
Línea 112... Línea 112...
112
    }
112
    }
Línea 113... Línea 113...
113
    
113
    
114
    
114
    
115
    /**
115
    /**
116
     * 
116
     * 
117
     * @param RecruitmentCandidate $form
117
     * @param RecruitmentRecruitmentSelectionCandidate $form
118
     * @return boolean
118
     * @return boolean
119
     */
119
     */
120
    public function insert($form)
120
    public function insert($form)
121
    {
121
    {
122
        $hydrator = new ObjectPropertyHydrator();
122
        $hydrator = new ObjectPropertyHydrator();
Línea 123... Línea 123...
123
        $values = $hydrator->extract($form);
123
        $values = $hydrator->extract($form);
124
        $values = $this->removeEmpty($values);
124
        $values = $this->removeEmpty($values);
-
 
125
        
-
 
126
        $insert = $this->sql->insert(self::_TABLE);
Línea 125... Línea 127...
125
        
127
        $insert->values($values);
126
        $insert = $this->sql->insert(self::_TABLE);
128
        return $values;
127
        $insert->values($values);
129
        return $insert->getSqlString($this->adapter->platform);
128
 
130
 
129
        $result = $this->executeInsert($insert);
131
        $result = $this->executeInsert($insert);
130
        if($result) {
132
        if($result) {
Línea 131... Línea 133...
131
            $form->id = $this->lastInsertId;
133
            $form->id = $this->lastInsertId;
132
        }
134
        }
133
        return $result;
135
        return $result;
134
    }
136
    }
135
    
137
    
136
    /**
138
    /**
137
     *
139
     *
138
     * @param RecruitmentCandidate $form
140
     * @param RecruitmentSelectionCandidate $form
Línea 175... Línea 177...
175
     * @param string $order_direction
177
     * @param string $order_direction
176
     * @return Paginator
178
     * @return Paginator
177
     */
179
     */
178
    public function fetchAllDataTableByCompanyId($companyId, $search, $page = 1, $records_per_page = 10, $order_field= 'name', $order_direction = 'ASC')
180
    public function fetchAllDataTableByCompanyId($companyId, $search, $page = 1, $records_per_page = 10, $order_field= 'name', $order_direction = 'ASC')
179
    {
181
    {
180
        $prototype = new RecruitmentCandidate();
182
        $prototype = new RecruitmentSelectionCandidate();
181
        $select = $this->sql->select(self::_TABLE);
183
        $select = $this->sql->select(self::_TABLE);
182
        $select->where->equalTo('company_id', $companyId);
184
        $select->where->equalTo('company_id', $companyId);
Línea 183... Línea 185...
183
        
185
        
184
        if($search) {
186
        if($search) {