class BinaryToBigIntegerMapper
implements TypeMapper<Object, BigInteger> {

    @Override
    public String getLabel() {
        return "BINARY to BigInteger Mapper";
    }

    @Override
    public Type getJavaType(Column column) {
        return BigInteger.class;
    }

    @Override
    public Category getJavaTypeCategory(Column column) {
        return Category.COMPARABLE;
    }

    @Override
    public BigInteger toJavaType(Column column, Class<?> entityType, Object value) {
        if (value == null) return null;

        try {
            final byte[] bytes = (byte[]) value;
            return new BigInteger(bytes);
        } catch (final ClassCastException ex) {
            throw new SpeedmentTypeMapperException(format(
                "Expected input type to be a byte[], but was %s.",
                value.getClass().getName()), ex);
        }
    }

    @Override
    public Object toDatabaseType(BigInteger value) {<FILL_FUNCTION_BODY>}

    @Override
    public Ordering getOrdering() {
        return Ordering.UNSPECIFIED;
    }
}

        if (value == null) return null;
        else return value.toByteArray();
    
<no_super_class>