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.  [ 1 post ] 
Author Message
 Post subject: how to extend from a mapped class
PostPosted: Mon Apr 05, 2010 1:12 pm 
Newbie

Joined: Mon Apr 05, 2010 1:02 pm
Posts: 1
Hi,

I have a mapped class 'Vendor' in a separate jar, that means, I can't make modifications to it. I want to load 'Vendor' objects using it's mapping but also want the 'Vendor' object to implement my java interface 'GenericCompany' (something like an adapter pattern) so that I can treat 'Vendor' and my own 'Company' object uniformly.

I don't have access to modify 'Vendor.java' as it is owned by a different team. So my plan is to create my own class 'VendorAdapter.java' that extends from 'Vendor.java'. After this I want hibernate to populate/inject data from VENDOR table into 'VendorAdapter.java' using Vendor.hbm.xml.

As I am going to create my adapter 'VendorAdapter.java', I am willing to create some sort of adapter 'VendorAdapter.hbm.xml' in my project, if it's possible to make it work.

Thanks in Advance


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

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.