-->
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: Annotations to maintain a list of Locale for client
PostPosted: Fri May 29, 2009 7:07 pm 
Newbie

Joined: Wed May 27, 2009 10:39 pm
Posts: 1
Hello.

I have two classes (Client and ClientLocale). I am trying to figure out how to maintain a list (or set) of java.util.Locale that the client supports (used for localization in the web app, using Wicket).

The locales are stored in a set in the Client entity, as:
private Set<Locale> clientLocales = new HashSet<Locale>();

with the relevant get and set methods

The Client table has the following (relevant) structure:
ID varchar(36)
Name varchar(32)

The ClientLocale table has the following structure:
ClientID varchar(36)
Locale varchar(15)

The reading I have done mostly seemt to be about situations where there is a join table (which I am using elsewhere successfully in the Client entity). However, I can't find any pointers to the best way to link these two tables. I was thinking that a OneToMany annotation woudl do the job, but I can't find out how to let the annotation know which columns are the links.

I was considering creating a ClientLocale entity, but was under the impression that this would not be necessary.

Any pointers or hints that you have would be greatly appreciated.

Thanks,

Bruce.


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.