Package org.openxava.converters
Class IntegerNumberConverter
- java.lang.Object
-
- 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
Constructors Constructor Description IntegerNumberConverter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IConverter
getInstance()
boolean
isNullToZero()
Iftrue
convert null to zero.void
setNullToZero(boolean nullToZero)
Iftrue
convert null to zero.java.lang.Object
toDB(java.lang.Object o)
java.lang.Object
toJava(java.lang.Object o)
-
-
-
Method Detail
-
getInstance
public static IConverter getInstance()
-
toDB
public java.lang.Object toDB(java.lang.Object o) throws ConversionException
- Specified by:
toDB
in interfaceIConverter
- Throws:
ConversionException
-
toJava
public java.lang.Object toJava(java.lang.Object o) throws ConversionException
- Specified by:
toJava
in interfaceIConverter
- Throws:
ConversionException
-
isNullToZero
public boolean isNullToZero()
Iftrue
convert null to zero.The default value is true.
-
setNullToZero
public void setNullToZero(boolean nullToZero)
Iftrue
convert null to zero.The default value is true.
-
-