net.sf.borg.model.db
Interface TaskDB

All Superinterfaces:
EntityDB<Task>
All Known Implementing Classes:
TaskJdbcDB

public interface TaskDB
extends EntityDB<Task>

The Interface for a Task database.


Method Summary
 void addLog(int taskid, String desc)
          Adds a task log for a task.
 void addProject(Project p)
          Adds a project to the db.
 void addSubTask(Subtask s)
          Adds a sub task.
 void deleteProject(int id)
          Delete a project by id
 void deleteSubTask(int id)
          Delete a sub task by id.
 Collection<Tasklog> getLogs()
          Gets all task logs in the db.
 Collection<Tasklog> getLogs(int taskid)
          Gets all task logs for a given task.
 Project getProject(int projectid)
          Gets a project by id.
 Collection<Project> getProjects()
          Gets all projects in the database.
 Collection<Project> getSubProjects(int projid)
          Gets all sub projects (child projects) for a given project.
 Subtask getSubTask(int id)
          Gets a sub task by subtask id.
 Collection<Subtask> getSubTasks()
          Gets all sub tasks in the database.
 Collection<Subtask> getSubTasks(int taskid)
          Gets all sub tasks for a given task.
 Collection<Task> getTasks(int projectid)
          Gets all tasks for a given project.
 int nextProjectKey()
          get the Next available project key.
 int nextSubTaskKey()
          get the Next available sub task key.
 void saveLog(Tasklog tlog)
          Save a task log in the db.
 void updateProject(Project p)
          Updates a project in the db.
 void updateSubTask(Subtask s)
          Update a sub task.
 
Methods inherited from interface net.sf.borg.model.db.EntityDB
addObj, delete, newObj, nextkey, readAll, readObj, sync, updateObj
 

Method Detail

getSubTasks

Collection<Subtask> getSubTasks(int taskid)
                                throws Exception
Gets all sub tasks for a given task.

Parameters:
taskid - the taskid
Returns:
the sub tasks
Throws:
Exception - the exception

getSubTasks

Collection<Subtask> getSubTasks()
                                throws Exception
Gets all sub tasks in the database.

Returns:
the sub tasks
Throws:
Exception - the exception

getSubTask

Subtask getSubTask(int id)
                   throws Exception
Gets a sub task by subtask id.

Parameters:
id - the id
Returns:
the sub task
Throws:
Exception - the exception

deleteSubTask

void deleteSubTask(int id)
                   throws Exception
Delete a sub task by id.

Parameters:
id - the id
Throws:
Exception - the exception

addSubTask

void addSubTask(Subtask s)
                throws Exception
Adds a sub task.

Parameters:
s - the subtask
Throws:
Exception - the exception

updateSubTask

void updateSubTask(Subtask s)
                   throws Exception
Update a sub task.

Parameters:
s - the subtask
Throws:
Exception - the exception

nextSubTaskKey

int nextSubTaskKey()
                   throws Exception
get the Next available sub task key.

Returns:
the next available sub task key
Throws:
Exception - the exception

getLogs

Collection<Tasklog> getLogs(int taskid)
                            throws Exception
Gets all task logs for a given task.

Parameters:
taskid - the task id
Returns:
the logs
Throws:
Exception - the exception

getLogs

Collection<Tasklog> getLogs()
                            throws Exception
Gets all task logs in the db.

Returns:
the logs
Throws:
Exception - the exception

addLog

void addLog(int taskid,
            String desc)
            throws Exception
Adds a task log for a task.

Parameters:
taskid - the task id
desc - the log text
Throws:
Exception - the exception

saveLog

void saveLog(Tasklog tlog)
             throws Exception
Save a task log in the db.

Parameters:
tlog - the task log object
Throws:
Exception - the exception

getProjects

Collection<Project> getProjects()
                                throws Exception
Gets all projects in the database.

Returns:
the projects
Throws:
Exception - the exception

getTasks

Collection<Task> getTasks(int projectid)
                          throws Exception
Gets all tasks for a given project.

Parameters:
projectid - the project id
Returns:
the tasks
Throws:
Exception - the exception

getProject

Project getProject(int projectid)
                   throws Exception
Gets a project by id.

Parameters:
projectid - the project id
Returns:
the project
Throws:
Exception - the exception

deleteProject

void deleteProject(int id)
                   throws Exception
Delete a project by id

Parameters:
id - the project id
Throws:
Exception - the exception

addProject

void addProject(Project p)
                throws Exception
Adds a project to the db.

Parameters:
p - the project
Throws:
Exception - the exception

updateProject

void updateProject(Project p)
                   throws Exception
Updates a project in the db.

Parameters:
p - the project
Throws:
Exception - the exception

nextProjectKey

int nextProjectKey()
                   throws Exception
get the Next available project key.

Returns:
the next available project key
Throws:
Exception - the exception

getSubProjects

Collection<Project> getSubProjects(int projid)
                                   throws Exception
Gets all sub projects (child projects) for a given project.

Parameters:
projid - the project id
Returns:
the sub projects
Throws:
Exception - the exception


Generated September 24 2010 by mbb using Apache Ant version 1.7.1 compiled on June 27 2008 and Java version 1.6.0_20 from Sun Microsystems Inc. on Linux i386 2.6.24-28-generic