This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
That looks like you have a Map<Integer, String>, rather than a Map<Integer, Object>. If you want it to behave as you ask you probably need to either define a custom type that parsed your string data in to the object you want, or use the table per class hierarchy pattern and add property value fields for each type you support (plus a disciminator).