001: package net.sf.borg.model.db.remote;
002:
003: import java.util.Collection;
004:
005: import net.sf.borg.model.beans.Project;
006: import net.sf.borg.model.beans.Subtask;
007: import net.sf.borg.model.beans.Tasklog;
008: import net.sf.borg.model.db.TaskDB;
009:
010: public class TaskRemoteBeanDB extends RemoteBeanDB implements TaskDB {
011:
012: TaskRemoteBeanDB(Class cls, String clsstr, String impl, String user) {
013: super (cls, clsstr, impl, user);
014: }
015:
016: public final synchronized void addLog(int taskid, String desc)
017: throws Exception {
018: call("addLog", new IRemoteProxy.ComposedObject(new Integer(
019: taskid), desc));
020: }
021:
022: public final synchronized void addProject(Project p)
023: throws Exception {
024: call("addProject", p);
025:
026: }
027:
028: public final synchronized void addSubTask(Subtask s)
029: throws Exception {
030: call("addSubTask", s);
031: }
032:
033: public final synchronized void deleteProject(int id)
034: throws Exception {
035: call("deleteProject", new Integer(id));
036:
037: }
038:
039: public final synchronized void deleteSubTask(int id)
040: throws Exception {
041: call("deleteSubTask", new Integer(id));
042: }
043:
044: public final synchronized Collection getLogs(int taskid)
045: throws Exception {
046: return (Collection) call("getLogsI", new Integer(taskid));
047: }
048:
049: public final synchronized Collection getLogs() throws Exception {
050: return (Collection) call("getLogs", null);
051: }
052:
053: public final synchronized Project getProject(int projectid)
054: throws Exception {
055: return (Project) call("getProject", new Integer(projectid));
056: }
057:
058: public final synchronized Collection getProjects() throws Exception {
059: return (Collection) call("getProjects", null);
060: }
061:
062: public final synchronized Collection getSubTasks(int taskid)
063: throws Exception {
064: return (Collection) call("getSubTasksI", new Integer(taskid));
065: }
066:
067: public final synchronized Collection getSubTasks() throws Exception {
068: return (Collection) call("getSubTasks", null);
069: }
070:
071: public final synchronized Collection getTasks(int projectid)
072: throws Exception {
073: return (Collection) call("getTasks", new Integer(projectid));
074: }
075:
076: public final synchronized int nextProjectKey() throws Exception {
077: Integer i = (Integer) call("nextProjectKey", null);
078: return i.intValue();
079: }
080:
081: public final synchronized int nextSubTaskKey() throws Exception {
082: Integer i = (Integer) call("nextSubTaskKey", null);
083: return i.intValue();
084: }
085:
086: public final synchronized void saveLog(Tasklog tlog)
087: throws Exception {
088: call("saveLog", tlog);
089:
090: }
091:
092: public final synchronized void updateProject(Project p)
093: throws Exception {
094: call("updateProject", p);
095:
096: }
097:
098: public final synchronized void updateSubTask(Subtask s)
099: throws Exception {
100: call("updateSubTask", s);
101:
102: }
103:
104: public final synchronized Collection getSubProjects(int projectid)
105: throws Exception {
106: return (Collection) call("getSubProjects", new Integer(
107: projectid));
108: }
109:
110: }
|