Methods Summary |
---|
public void | comment(java.lang.String id, java.lang.String comment, java.util.Date date)
try {
TaskLocal task = findTaskLocalById(id);
CommentLocalHome home = CommentUtil.getLocalHome();
System.out.println("Creating: " + home.create(comment, date, task));
} catch (Exception e) {
e.printStackTrace();
}
|
public void | completeTask(java.lang.String id)
try {
TaskLocal task = findTaskLocalById(id);
task.setCompletedDate(new Date());
System.out.println("Completed: " + id);
} catch (Exception e) {
e.printStackTrace();
}
|
public TaskLocal | createTask(java.lang.String user, java.lang.String name)
try {
TaskLocalHome home = TaskUtil.getLocalHome();
TaskLocal task = home.create(user, name);
return task;
} catch (Exception e) {
e.printStackTrace();
return null;
}
|
public Task | findTaskById(java.lang.String id)
return findTaskLocalById(id).getTask();
|
private TaskLocal | findTaskLocalById(java.lang.String id)
try {
TaskLocalHome home = TaskUtil.getLocalHome();
return home.findByPrimaryKey(Integer.valueOf(id));
} catch (Exception e) {
e.printStackTrace();
return null;
}
|
public java.util.Collection | getTasksForUser(java.lang.String user)Returns a set of Task (VO) objects
Collection results = null;
try {
TaskLocalHome home = TaskUtil.getLocalHome();
results = new ArrayList();
Iterator it_tasks = home.findTasksForUser(user).iterator();
while (it_tasks.hasNext()) {
TaskLocal local = (TaskLocal) it_tasks.next();
results.add(local.getTask());
}
} catch (Exception e) {
e.printStackTrace();
}
return results;
|