Hibernate version: 3.2
Name and version of the database you are using: Oracle 10g
I have a set of objects that I would like to map to an existing database. The objects also already exist and they are not quite POJO. All of the set and get methods deviate from the POJO standard in that the first parameter of all set methods is a Context object and all get methods also contain the same Context object. This is a strict requirement for these objects and further, I must use the get/set methods (e.g. I cannot map to the fields).
For example:
Code:
public class Person
{
public String getName(Context context) { ... }
public void setName(Context context, String name) { ... }
}
Does anyone know if there is a pluggable way to make hibernate recognize these methods as getter/setter methods for the properties? This is a constant and predictable signature... all of my objects use a Context object.
If there is not a pluggable way... does anyone know how I might go about adding this functionality into hibernate? I have started looking into the "tuple" package and I think this is the right place to be... But, this is not the preferred course of action.
Any help/suggestions would be greatly appreciated?
Thanks in advance.
Paul