I'm working on simple application that uses Spring MVC 3 and hibernate 3.
I have a requirement to generate ID in the following format.
Month/Year/number(number will increase).
Month and year values do change based on the current Date. Once the year completed, let say after the completion of one financial year the sequence again start from the beginning, like month/Year/number. Hope I'm clear.
Example:
1st Financial Year:
Mar/2011/001
Jun/2011/002
Dec/2011/003
Feb/2011/004
...
...
2nd Financial Year:
Mar/2012/001
Mar/2012/002
Aug/2012/003
..
..
..
How can I approach this problem? Please help me.