-->
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: Map a class twice?
PostPosted: Thu Jul 15, 2004 12:00 pm 
Beginner
Beginner

Joined: Tue Jun 29, 2004 3:44 pm
Posts: 43
Is it possible to map a class twice?

I've written a class that basically wraps a HashMap to provide some other functionality. The class has no other values that need to be persisted. I've used this class in a couple of places as a collection to hold different objects. In other words, in one place, I use MyMap class to hold a bunch of A objects, while in another place it holds B objects - with no relationship at all between the A and B classes.

I can write a mapping file to map one use of the class - to hold As, for instance. Is there a way to have a mapping for each of these uses?

Is a UserType more appropriate? If so, can someone point me to a good tutorial/documentation for writing a UserType for a Map?

Many thanks,
Scott


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.