I am looking state pattern. (http://ift.tt/1VScxDY)
But I doesn`t find how to implement in my spring project.
I need declare variable of state instance on entity class as my understanding is right about state pattern. Because my entity class has state and need different behavior for each state.
But I think, entity class need pure because it represent database object.
What is best practice of state pattern for entity class of JPA?
Thanks.
Aucun commentaire:
Enregistrer un commentaire