-->
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: Collection as value of a Map
PostPosted: Thu May 05, 2005 6:20 am 
Newbie

Joined: Tue Sep 21, 2004 9:23 am
Posts: 5
Hi,

Is there a way to map the value of a Map as a collection of Objects?

A small example why I'm trying to do this:

Code:
-------------
|   Survey    |
|-------------|
| s_id        |
| description |
-------------

-----------
| Question  |
|-----------|
| q_id      |
| language  |
| text      |
| s_id      |
-----------


(the primary key in Question is a composite of q_id and language)

I want to have a Map in survey where the key's are the different languages and the values of the Map are the Collections of questions that correspond to the language.

At this moment I've mapped the Questions as a Set in the Survey and have a method that accepts a language and searches through the Set and compares the languages.


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.