I have a class Account with a property number which has as value fe:
130.11.0000001
[plan_code].[year].[sequential number]
Now I have this number property mapped as a String.
So when I want to create a second Account for the same Plan (code=130) it should get number = 130.11.0000002.
When an Account for plan(code=100) is made it should have number=100.11.0000001
I was thinking of using hilo generator from hibernate, but have no idea how to start and if this is even possible using hilo generator. So any pointers/ideas of implementation are welcome!
Maybe I should start making number property of type AccountNumber with as id a hilo generated value?