I really don't know if this is the best forum for this question but I couldn't think of any better place and since I am doing this in a Servlet....
Anyway, when I create a new Issue I have a field called status which is of a type IssueStatus. IssueStatus has 2 fields; id(Integer) and status(String). I have a database table (t_issue_status) with all the possible status' (Open, In Progress, Resolved).
My problem is simply the best way to do the following. When I click submit to create a new Issue, I need to set the Issue objects IssueStatus to Open. This is static as in every time a new Issue is created the status is Open. So I could do something like:
My main problem with this approach is maintence. What if down the road I wanted to change Open to something else. I don't want to have to dig back in the code. So my options are always pull this from the database, use some sort of properies file and load this file in a ContextListener, a combination of the 2. Use my Constants class and provide a public static final Integer OPEN_STATUS = 0.