net.mlw.vlh.adapter.jdbc.util.setter
Class DecimalSetter

java.lang.Object
  extended bynet.mlw.vlh.adapter.jdbc.util.setter.AbstractSetter
      extended bynet.mlw.vlh.adapter.jdbc.util.setter.DecimalSetter
All Implemented Interfaces:
Setter

public class DecimalSetter
extends AbstractSetter

Sets a java.sql.Types.DECIMAL on a query using PreparedStatement.setBigDecimal(). Conversion is provided from java.math.BigDecimal, java.math.BigInteger, java.lang.Double, java.lang.Long. Conversion from a string is provided using Long.parseLong() method.

Version:
$Revision: 1.2 $ $Date: 2005/12/19 10:58:01 $
Author:
Matthew L. Wilson

Constructor Summary
DecimalSetter()
           
 
Method Summary
 int set(PreparedStatement query, int index, Object value)
          Set the object on the given query.
 
Methods inherited from class net.mlw.vlh.adapter.jdbc.util.setter.AbstractSetter
getReplacementString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecimalSetter

public DecimalSetter()
Method Detail

set

public int set(PreparedStatement query,
               int index,
               Object value)
        throws SQLException,
               ParseException
Description copied from interface: Setter
Set the object on the given query.

Parameters:
query - The PreparedStatement.
index - The name of the argument
value - The value to be set
Throws:
ParseException - If an error occurs.
SQLException - If an error occurs.
See Also:
Setter.set(java.sql.PreparedStatement, int, java.lang.Object)


Copyright © 2003-2006 mlavilson. All Rights Reserved.