cejug / hurraa

Opensource project to resource management
GNU General Public License v2.0
16 stars 18 forks source link

Occurrence State ?? #125

Closed efraimgentil closed 10 years ago

efraimgentil commented 10 years ago

What you guys think, would be better if we create a entity to represent this state or utilize a constant ENUM state like?

I believe would be more flexible if we use a entity to represent this state and we can create new states or manage them more easily.

diogodias86 commented 10 years ago

I think an entity, for this case, is better too.

paulojribp commented 10 years ago

I believe that depends. What kind of states we want to create? The user can/need create new states? If he can, so, an entity will be better. But, if the system actions depends of the state to make things, then, we have to take control of the states and a ENUM will be better. I think that the system flow will depends of the state, so, in this case, I believe that ENUM will be better.

htmfilho commented 10 years ago

I'm in favor of the Enum solution, but if needed, Yougi has a hybrid solution. There is a table with two columns (key, value) used to store the application properties. Take a look:

https://github.com/htmfilho/yougi/blob/master/src/main/java/org/cejug/yougi/entity/ApplicationProperty.java https://github.com/htmfilho/yougi/blob/master/src/main/java/org/cejug/yougi/entity/Properties.java https://github.com/htmfilho/yougi/blob/master/src/main/java/org/cejug/yougi/business/ApplicationPropertyBean.java

efraimgentil commented 10 years ago

Well, we don't have many options but the entity is winning, and aready a month with this issue so we going to the entity solution.