Class BigIntegerConverter

java.lang.Object
org.litebridge.convert.converter.BigIntegerConverter
All Implemented Interfaces:
Converter<BigInteger>, ConverterFunction<BigInteger>, SqlConverter<BigInteger>

public class BigIntegerConverter extends Object implements SqlConverter<BigInteger>
A converter for BigInteger values.
  • Constructor Details

    • BigIntegerConverter

      public BigIntegerConverter()
  • Method Details

    • convert

      public @Nullable BigInteger convert(@Nullable Object value)
      Converts the given value to a BigInteger.

      Supports various numeric types and string representation as fall-back.

      Specified by:
      convert in interface ConverterFunction<BigInteger>
      Parameters:
      value - the value to convert, may be null
      Returns:
      the converted BigInteger, or null
    • type

      public Class<?> type()
      Returns the target Java class this converter handles.
      Specified by:
      type in interface Converter<BigInteger>
      Returns:
      BigInteger.class
    • sqlTypes

      public int[] sqlTypes()
      Description copied from interface: SqlConverter
      Returns an array of Types integer codes that this converter is associated with.
      Specified by:
      sqlTypes in interface SqlConverter<BigInteger>
      Returns:
      an array of SQL type codes
    • priority

      public int priority()
      Description copied from interface: Converter
      Returns the priority of this converter.

      Converters with lower priority values converters are preferred if there are data type overlaps.

      As an example, if there are two converters A and B for type String, if A has a priority of 1 and B has a priority of 2, then A will be chosen to perform the conversion.

      Specified by:
      priority in interface Converter<BigInteger>
      Returns:
      the priority of this converter