org.openxava.converters
Class IntegerNumberConverter

java.lang.Object
  extended by org.openxava.converters.IntegerNumberConverter
All Implemented Interfaces:
java.io.Serializable, IConverter

public class IntegerNumberConverter
extends java.lang.Object
implements IConverter

In java a int and in database a Number of any type.

Author:
Javier Paniza
See Also:
Serialized Form

Constructor Summary
IntegerNumberConverter()
           
 
Method Summary
static IConverter getInstance()
           
 boolean isNullToZero()
          If true convert null to zero.
 void setNullToZero(boolean nullToZero)
          If true convert null to zero.
 java.lang.Object toDB(java.lang.Object o)
           
 java.lang.Object toJava(java.lang.Object o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegerNumberConverter

public IntegerNumberConverter()
Method Detail

getInstance

public static IConverter getInstance()

toDB

public java.lang.Object toDB(java.lang.Object o)
                      throws ConversionException
Specified by:
toDB in interface IConverter
Throws:
ConversionException

toJava

public java.lang.Object toJava(java.lang.Object o)
                        throws ConversionException
Specified by:
toJava in interface IConverter
Throws:
ConversionException

isNullToZero

public boolean isNullToZero()
If true convert null to zero.

The default value is true.


setNullToZero

public void setNullToZero(boolean nullToZero)
If true convert null to zero.

The default value is true.