Class NumberConverter<V extends Number>

java.lang.Object
org.sql2o.converters.NumberConverter<V>
All Implemented Interfaces:
Converter<V>
Direct Known Subclasses:
BigDecimalConverter, ByteConverter, DoubleConverter, FloatConverter, IntegerConverter, LongConverter, ShortConverter

public abstract class NumberConverter<V extends Number> extends Object
Base class for numeric converters.
  • Constructor Details

    • NumberConverter

      public NumberConverter(boolean primitive)
  • Method Details

    • convert

      public V convert(Object val)
      Description copied from interface: Converter
      Conversion from SQL to Java.
    • convertNumberValue

      protected abstract V convertNumberValue(Number val)
    • convertStringValue

      protected abstract V convertStringValue(String val)
    • getTypeDescription

      protected abstract String getTypeDescription()
    • toDatabaseParam

      public Object toDatabaseParam(V val)
      Description copied from interface: Converter
      Conversion from Java to SQL.
      Specified by:
      toDatabaseParam in interface Converter<T>