some methods in our model pojos have been annotated like this:
@Column(name=\"cli_clipping_id\", updatable=false, columnDefinition = \"varchar(\" + ModelUtil
I don't think the method you suggest is possible because:
get
at runtime is actually a proxy class implementing the annotation interface. You can't set new values to its attributes.However, you can move to a xml based configuration for Hibernate where you can modify the parameter from outside the code.
If you are building with ANT, you could do a precompile step and use a regex to change the code in the files.
Though, this is in fact an old thread the Answer two above is incorrect for point 2: actually class anotations can be changed while runtime.
I am still curious how to get it done for methods.