-->
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: How to map java.lang.Object?
PostPosted: Fri Oct 09, 2009 3:32 pm 
Newbie

Joined: Wed Sep 16, 2009 11:06 am
Posts: 7
To make a long story short, I need to be able to store what my company calls a "parameter" to the database. A parameter consists of a parameter ID to tell us what field we're looking at and a value.

The value can be of several types, including Integer, String, Double, or Boolean. In our code we use the Parameter ID to determine the type that is being stored, and then cast a java.lang.Object to whatever type we know it to be based on the parameter ID.

Is there a direct means of mapping a java.lang.Object? If not, what would you suggest? I have complete freedom to create whatever objects I need to represent this so any suggestions are appreciated

Thanks in advance,
~Brian

PS Extra points for elegance :-D


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.