blob: d3628aaf37270f4a111b41bc01430ef1933ea770 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
<?php
class TimeEntryDao extends BaseDao
{
public function addNewTimeEntry($entry)
{
$sqlmap = $this->getSqlMap();
$sqlmap->insert('AddNewTimeEntry', $entry);
}
public function getTimeEntryByID($entryID)
{
$sqlmap = $this->getSqlMap();
return $sqlmap->queryForObject('GetTimeEntryByID', $entryID);
}
public function deleteTimeEntry($entryID)
{
$sqlmap = $this->getSqlMap();
$sqlmap->delete('DeleteTimeEntry', $entryID);
}
public function getTimeEntriesInProject($username, $projectID)
{
$sqlmap = $this->getSqlMap();
$param['username'] = $username;
$param['project'] = $projectID;
return $sqlmap->queryForList('GetAllTimeEntriesByProjectIdAndUser', $param);
}
public function updateTimeEntry($entry)
{
$sqlmap = $this->getSqlMap();
$sqlmap->update('UpdateTimeEntry', $entry);
}
}
|