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
|