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: Optimal way to retrieve Masters
PostPosted: Mon Oct 27, 2008 3:12 am 
Newbie

Joined: Mon Oct 27, 2008 2:43 am
Posts: 7
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:3.2

Full stack trace of any exception that occurs:

Name and version of the database you are using:Oracle 10g R2

I would like to fetch UI labels (which are displayed on the browser) from the RDBMS.

The tables have been designed in the following fashion.

LABEL_M
label_id long pkey,
label_key NVarchar unique key

and

LABLE_VALUE_M
value_id long pkey,
label_id long fkey references Label_M(labelid)
label_value NVarchar
language NVarchar (references the language master table)


The idea is to fetch all the labels (for a particular language) at once during system startup and put it in the 'application' scope.
Using objects mapping to each of these objects seems to be an expensive way of storing these objects in memory.

Can I possibly have a HashMap which would store for a particular language the following details:

EngMap
key maps to 'label_key'
value maps to 'label_value'

Also, please let me know if this thinking is in the right direction, or am I missing the plot entirely.

Cheers

_________________
-GJ


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.