Tasklist Task object
When using hibernate with objects you have to consider what might happen if an object representing a database record is fetched twice by hibernate and then compared, the comparison should return true but a straight object comparison will return false. To keep this from causing problems we have to create a set of comparison function in our value object (or the implementation of the value object).
At a minimum, you will need to create functions to handle equals and hashCode. It is a good idea to also create compareTo and toString functions.
NOTE: General instructions for creating these functions are available
For the tasklist tool example we will use the Apache commons-lang package since performance is not an issue
We will be adding this code to the TaskImpl.java value object implementation