Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 1246 Rev 3454
Línea 57... Línea 57...
57
 
57
 
58
        $prototype = new JobDescription();
58
        $prototype = new JobDescription();
59
        return $this->executeFetchOneObject($select, $prototype);
59
        return $this->executeFetchOneObject($select, $prototype);
Línea -... Línea 60...
-
 
60
    }
-
 
61
 
60
    }
62
 
61
 
63
 
62
    /**
-
 
63
     *
64
    /**
64
     * @param int $id
65
     *
65
     * @return JobDescription
66
     * @return JobDescription[]
66
     */
67
     */
67
    public function fetchAll($id) {
68
    public function fetchAllByDefault() {
-
 
69
        $select = $this->sql->select(self::_TABLE);
68
        $select = $this->sql->select(self::_TABLE);
70
        $select->where->isNull('company_id');
-
 
71
        $select->where->equalTo('status', JobDescription::STATUS_ACTIVE);
69
        $select->where->equalTo('id', $id);
72
        $select->order('name');
70
        $select->limit(1);
73
        
71
 
74
        
72
        $prototype = new JobDescription();
75
        $prototype = new JobDescription();
Línea 73... Línea 76...
73
        return $this->executeFetchAllObject($select, $prototype);
76
        return $this->executeFetchAllObject($select, $prototype);
74
    }
77
    }
75
 
78
 
76
    /**
79
    /**
77
     *
80
     *
78
     * @return JobDescription[]
81
     * @return JobDescription[]
79
     */
82
     */
-
 
83
    public function fetchAllActiveByDefault() {
-
 
84
        $select = $this->sql->select(self::_TABLE);
-
 
85
        $select->where->isNull('company_id');
-
 
86
        $select->where->equalTo('status', JobDescription::STATUS_ACTIVE);
80
    public function fetchAllByDefault() {
87
        $select->order('name');
81
        $select = $this->sql->select(self::_TABLE);
88
        
82
        $select->where->isNull('company_id');
89
        
83
        $prototype = new JobDescription();
90
        $prototype = new JobDescription();
84
        return $this->executeFetchAllObject($select, $prototype);
91
        return $this->executeFetchAllObject($select, $prototype);
85
    }
92
    }
86
 
93
    
87
    /**
94
    /**
88
     *
95
     *
Línea 120... Línea 127...
120
    public function fetchAllActiveByCompanyId($company_id) {
127
    public function fetchAllActiveByCompanyId($company_id) {
121
        $select = $this->sql->select(self::_TABLE);
128
        $select = $this->sql->select(self::_TABLE);
122
        $select->where->equalTo('company_id', $company_id);
129
        $select->where->equalTo('company_id', $company_id);
123
        $select->where->equalTo('status', JobDescription::STATUS_ACTIVE);
130
        $select->where->equalTo('status', JobDescription::STATUS_ACTIVE);
124
        $select->order('name');
131
        $select->order('name');
-
 
132
        
-
 
133
        //echo $select->getSqlString($this->adapter->platform); exit;
Línea 125... Línea 134...
125
 
134
 
126
        $prototype = new JobDescription();
135
        $prototype = new JobDescription();
127
        return $this->executeFetchAllObject($select, $prototype);
136
        return $this->executeFetchAllObject($select, $prototype);
Línea 294... Línea 303...
294
        $delete->where->equalTo('id', $jobDescription->id);
303
        $delete->where->equalTo('id', $jobDescription->id);
Línea 295... Línea 304...
295
 
304
 
296
        return $this->executeDelete($delete);
305
        return $this->executeDelete($delete);
Línea 297... Línea -...
297
    }
-
 
298
 
-
 
299
    /**
-
 
300
     *
-
 
301
     * @return JobDescription[]
-
 
302
     */
-
 
303
    public function fetchAllActivesByCompanyId($company_id) {
-
 
304
        $prototype = new JobDescription();
-
 
305
        $select = $this->sql->select(self::_TABLE);
-
 
306
        $select->where->equalTo('company_id', $company_id);
-
 
Línea 307... Línea -...
307
        $select->where->equalTo('status', JobDescription::STATUS_ACTIVE);
-
 
308
        $select->order('name ASC');
-
 
Línea 309... Línea 306...
309
 
306
    }