Hi Alejandro,
1) i'ld like to make the user provided taskId optional. so i think it would be good
to have an extra method
TaskService.newTask()
that creates a new task without id. upon saving such a task, the command will detect this
and automatically assign an id based on the DB primary key that has been generated by the
DB after saving it. That way you don't force users to think of how they are going to
obtain a unique id if they just want to add a task.
2) all the setters in the task could return the task itself. also a save method could be
added to the task that delegates to the saveTask of the service it came from. then you
could get shorter, more readable task creations like this:
taskService.newTask()
| .setName("Do laundry")
| .setDueDate(tomorrow)
| .setAssignee("johndoe")
| .save();
WDYT ?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4194976#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...