java.lang.Object
org.litebridgedb.convert.converter.AbstractStringParsingConverter<Boolean>
org.litebridgedb.convert.converter.BooleanConverter
- All Implemented Interfaces:
Converter<Boolean>,ConverterFunction<Boolean>,SqlConverter<Boolean>
public class BooleanConverter
extends AbstractStringParsingConverter<Boolean>
implements SqlConverter<Boolean>
A converter for
Boolean values.
Handles Types.BIT and Types.BOOLEAN by parsing the value's string representation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BooleanconvertString(String value) Parses a string value into the target type.Class<?> Returns the primitive counterpart of the target class.int[]sqlTypes()Returns the SQL types associated with this converter.Class<?> type()Returns the target Java class this converter handles.Methods inherited from class org.litebridgedb.convert.converter.AbstractStringParsingConverter
convertMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.litebridgedb.convert.converter.ConverterFunction
convert
-
Constructor Details
-
BooleanConverter
public BooleanConverter()
-
-
Method Details
-
convertString
Description copied from class:AbstractStringParsingConverterParses a string value into the target type.- Specified by:
convertStringin classAbstractStringParsingConverter<Boolean>- Parameters:
value- the string value to parse- Returns:
- the parsed value
-
type
Returns the target Java class this converter handles. -
primitiveType
Returns the primitive counterpart of the target class.- Specified by:
primitiveTypein interfaceConverter<Boolean>- Returns:
boolean.class
-
sqlTypes
public int[] sqlTypes()Returns the SQL types associated with this converter.- Specified by:
sqlTypesin interfaceSqlConverter<Boolean>- Returns:
- an array containing
Types.BITandTypes.BOOLEAN
-