Posts Tagged ‘oracle data type’
Oracle Number to Java Object
January 19, 2010
Leave a comment
Recently i needed to know what should be the JAVA Object to use when mapping against an oracle database.
You can easily find alot of documentation on these mappings by searching google, but if you need to convert data types in the form of Number(p,s) (where p is precision and s is scale) you will have alot more trouble.
I ended up finding a reference to some old bea documentation(which got thrown offline when oracle took over bea) in an objectmix thread. So i put it here if anyone ever needs it:
Column Definition Returned by getObject()
NUMBER(P <=3D 9)
IntegerNUMBER(P <=3D 18)
LongNUMBER(P >=3D 19)
BigDecimalNUMBER(P <=3D16, S > 0)
DoubleNUMBER(P >=3D 17, S > 0)
BigDecimal
Links :
- ObjectMix Thread
- Old Bea Docs (offline)
Categories: java, oracle
oracle, oracle data type