Package net.sf.jkniv.whinstone.types
Class BooleanBitType
- java.lang.Object
-
- net.sf.jkniv.whinstone.types.BooleanBitType
-
- All Implemented Interfaces:
Convertible<Boolean,Integer>
public class BooleanBitType extends Object implements Convertible<Boolean,Integer>
Conversion type fromJava BooleantoJDBC BIT. This conversion has default usage.The
patternformat is: true|false, where the values can be any string value.@Converter(converter = BooleanBitType.class,pattern = "1|0")
-
-
Constructor Summary
Constructors Constructor Description BooleanBitType(String pattern)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColumnTypegetColumnType()Class<Boolean>getType()BooleantoAttribute(Integer jdbc)Convert the jdbc value to attribute format or typeIntegertoJdbc(Boolean attribute)Convert attribute to jdbc format or typeStringtoString()
-
-
-
Constructor Detail
-
BooleanBitType
public BooleanBitType(String pattern)
-
-
Method Detail
-
toJdbc
public Integer toJdbc(Boolean attribute)
Description copied from interface:ConvertibleConvert attribute to jdbc format or type- Specified by:
toJdbcin interfaceConvertible<Boolean,Integer>- Parameters:
attribute- the value of to be converted- Returns:
- the value to be stored for jdbc driver
-
toAttribute
public Boolean toAttribute(Integer jdbc)
Description copied from interface:ConvertibleConvert the jdbc value to attribute format or type- Specified by:
toAttributein interfaceConvertible<Boolean,Integer>- Parameters:
jdbc- the value stored at database- Returns:
- the value of attribute converted
-
getType
public Class<Boolean> getType()
- Specified by:
getTypein interfaceConvertible<Boolean,Integer>
-
getColumnType
public ColumnType getColumnType()
- Specified by:
getColumnTypein interfaceConvertible<Boolean,Integer>
-
-