org.openxava.converters
Class Boolean01Converter

java.lang.Object
  extended by 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
Boolean01Converter()
           
 
Method Summary
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Boolean01Converter

public Boolean01Converter()
Method Detail

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

booleanToInt

public static int booleanToInt(boolean valor)

intToBoolean

public static boolean intToBoolean(int valor)