uk.org.ogsadai.converters.webrowset.resultset.types
Class NumericStrategy

java.lang.Object
  extended byuk.org.ogsadai.converters.webrowset.resultset.types.TypeStrategy
      extended byuk.org.ogsadai.converters.webrowset.resultset.types.NumberStrategy
          extended byuk.org.ogsadai.converters.webrowset.resultset.types.NumericStrategy

public class NumericStrategy
extends NumberStrategy

Converts an element of column type numeric.

Author:
The OGSA-DAI Team.

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
           
private  int mScale
           
 
Constructor Summary
NumericStrategy(int scale)
          Create a new numeric strategy.
 
Method Summary
 java.lang.Object getObject(java.lang.String data)
          Returns the input string as an object.
 
Methods inherited from class uk.org.ogsadai.converters.webrowset.resultset.types.NumberStrategy
getBigDecimal, getBigInteger, getBoolean, getByte, getDouble, getFloat, getInt, getLong, getShort, getString
 
Methods inherited from class uk.org.ogsadai.converters.webrowset.resultset.types.TypeStrategy
getArray, getAsciiStream, getBigDecimal, getBinaryStream, getBlob, getBytes, getCharacterStream, getClob, getDate, getDate, getRef, getTime, getTime, getTimestamp, getTimestamp, getUnicodeStream, getURL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
See Also:
Constant Field Values

mScale

private int mScale
Constructor Detail

NumericStrategy

public NumericStrategy(int scale)
Create a new numeric strategy.

Parameters:
scale - If 0 then getObject() will return big integers else it will return big decimals.
Method Detail

getObject

public java.lang.Object getObject(java.lang.String data)
                           throws java.sql.SQLException
Description copied from class: TypeStrategy
Returns the input string as an object.

Overrides:
getObject in class TypeStrategy
Parameters:
data - Input data.
Returns:
converted input.
Throws:
java.sql.SQLException - if there was a problem with the conversion.