-->
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: Inheritance Mapping and Java classes
PostPosted: Thu Oct 20, 2005 2:44 am 
Newbie

Joined: Thu Oct 20, 2005 2:31 am
Posts: 1
Hi All

First let me explain the code structure to all of you ...

The section I'm struggling with makes use of Rule and Action. Rule is an abstract class that inherits from java.util.Observable and which implements java.util.Observer. Action is also an abstract class, but only implements java.util.Observer.

Through the subclasses of these two I can create a rule hierarchy, with one Rule observing multiple others and Actions observing this Rule. Now in order to ease removal and updating of Rules and Actions, every Rule has a List of observables and observers. Every Action has a List of observables.

My problem is, how do I map this in Hibernate without writing my own Observer and Observable classes (or even just how do I do it if I write my own classes). I'm not that adept at inheritance mapping, but I believe that Observer and Observable requires at least getID and setID?

Also, seeing as every Rule has both an Observer and Observable List, how will I handle this in Hibernate? When I persist a Rule it depends both on "children" and "parents".

Thank you for all and any help.


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.