-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Mapping Question
PostPosted: Wed Mar 15, 2006 1:57 pm 
Newbie

Joined: Wed Mar 15, 2006 1:49 pm
Posts: 1
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.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 15, 2006 4:21 pm 
Regular
Regular

Joined: Thu Jul 29, 2004 11:55 pm
Posts: 75
Could you map it as a map and key-value pairs?


Top
 Profile  
 
 Post subject: Re: Mapping Question
PostPosted: Thu Mar 16, 2006 6:42 am 
Beginner
Beginner

Joined: Thu Aug 19, 2004 5:36 am
Posts: 30
Location: Italy
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.