public class BooleanVarcharType extends Object implements Convertible<Boolean,String>
Java Boolean
to JDBC VARCHAR
.
The pattern
format is: true|false, where the values can be any string value.
@Converter(converter = BooleanVarcharType.class,pattern = "Y|N")
Constructor and Description |
---|
BooleanVarcharType(String pattern) |
Modifier and Type | Method and Description |
---|---|
ColumnType |
getColumnType() |
Class<Boolean> |
getType() |
Boolean |
toAttribute(String jdbc)
Convert the jdbc value to attribute format or type
|
String |
toJdbc(Boolean attribute)
Convert attribute to jdbc format or type
|
String |
toString() |
public BooleanVarcharType(String pattern)
public String toJdbc(Boolean attribute)
Convertible
toJdbc
in interface Convertible<Boolean,String>
attribute
- the value of to be convertedpublic Boolean toAttribute(String jdbc)
Convertible
toAttribute
in interface Convertible<Boolean,String>
jdbc
- the value stored at databasepublic Class<Boolean> getType()
getType
in interface Convertible<Boolean,String>
public ColumnType getColumnType()
getColumnType
in interface Convertible<Boolean,String>
Copyright © 2012–2020 jkniv, copyleft code. All rights reserved.