Package org.openxava.converters
Class Boolean01Converter
- java.lang.Object
-
- org.openxava.converters.Boolean01Converter
-
- All Implemented Interfaces:
java.io.Serializable
,IConverter
public class Boolean01Converter extends java.lang.Object implements IConverter
In java boolean and in database Number that it can be 1 or 0.- Author:
- Javier Paniza
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Boolean01Converter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
booleanToInt(boolean valor)
static boolean
intToBoolean(int valor)
java.lang.Object
toDB(java.lang.Object o)
java.lang.Object
toJava(java.lang.Object o)
-
-
-
Method Detail
-
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
-
booleanToInt
public static int booleanToInt(boolean valor)
-
intToBoolean
public static boolean intToBoolean(int valor)
-
-