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