org.apache.ojb.broker.accesslayer.conversions
Class Int2IntegerFieldConversion

java.lang.Object
  extended byorg.apache.ojb.broker.accesslayer.conversions.Int2IntegerFieldConversion
All Implemented Interfaces:
FieldConversion, java.io.Serializable

public class Int2IntegerFieldConversion
extends java.lang.Object
implements FieldConversion

this implementation of the FieldConversion interface converts int to Integer, Integer to int. If the int is zero, then we don't have a value for the key and it must be set to null, not zero.

Version:
$Id: Int2IntegerFieldConversion.java,v 1.3 2003/01/19 12:13:42 brj Exp $
Author:
Aaron Oathout
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.apache.ojb.broker.accesslayer.conversions.FieldConversion
serialVersionUID
 
Constructor Summary
Int2IntegerFieldConversion()
           
 
Method Summary
 java.lang.Object javaToSql(java.lang.Object obj)
          convert a Java object to its SQL pendant, used for insert & update
 java.lang.Object sqlToJava(java.lang.Object obj)
          convert a SQL value to a Java Object, used for SELECT
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Int2IntegerFieldConversion

public Int2IntegerFieldConversion()
Method Detail

javaToSql

public java.lang.Object javaToSql(java.lang.Object obj)
                           throws ConversionException
Description copied from interface: FieldConversion
convert a Java object to its SQL pendant, used for insert & update

Specified by:
javaToSql in interface FieldConversion
Throws:
ConversionException

sqlToJava

public java.lang.Object sqlToJava(java.lang.Object obj)
                           throws ConversionException
Description copied from interface: FieldConversion
convert a SQL value to a Java Object, used for SELECT

Specified by:
sqlToJava in interface FieldConversion
Throws:
ConversionException


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14