"Dynamic" Java Annotations - possible?
Not sure if that is even a question that makes sense, it definately does for me.
I have a hibernate entity (so a pojo with annotations), which though only reads from the database and in this particular case does not read from a table, but from a function (postgresql).
The Hibernate annotation goes like this:
public class ReportEntity extends BaseEntity
As you can see the sql function (stored procedure) is "get_report_entity('T')". Now my problem - the 'T' as the parameter stands for "Test mode". And in production this should change to a 'P'.
So the question is - is there a way for me to make that 'T' configurable, ie change that from the outside without having to recompile the whole code?? So ideally access an environment variable or a config file or something...
Or do I have to switch to an xml mapping...p l e a s e n o t!
Thanks very much!!