I have an application using a local XML file for data storage using Castor. I am now adding database support (with hibernate) and have full control of Database design. However, I have a hash map with multiple primitive data types (such as "String" and "Double"). The volume of data I am passing is very high so efficiency is crucial. From what I can tell, there is no way to have a discriminator on a Map's element type, however throwing all these values into a class and moving them over to a new hash map one at a time to put them into their proper data types will be inefficient. I cannot use multiple hash maps (one for each data type) because that will cause problems for castor. Has anyone out there dealt with a hash map with multiple value types? Is there any good solution?
|