ashok777 wrote:
I have to deal with an environment where the Business Objects are meta-data driven. Instead of a 'Customer' class with attributes 'FirstName', 'LastName', etc I have a BIO class [Business Information Object] that is associated with a meta-data object 'Customer' at instantiation time; property values are set via a generic set method such as :
void set(String PropertyName, Object value)
It does not appear that there is a way for me to set the Hibernate mapping configuration. If indeed there is a way wondering what that is.
It seems to be difficult.
In theory you could initialize SessionFactory when your application starts building dynamically your hbm files.
This should be possible because certainly you have property list for all you object somewhere. In this list of properties you should have some information about types.
At the end of this process, I suspect that you realize that a classic approach will be more manageable: make a good design, with inheritance in mind, and you will obtain best results with a goog centralization of code (both B.O. code, mapping and dao/service layer code)
Delta