@Test @Disabled void studioTypes2(final JsonBuilderFactory jsonBuilderFactory, final JsonProvider jsonProvider, final RecordBuilderFactory recordBuilderFactory, final RecordConverters converter) throws Exception { final RowStruct rowStruct = new RowStruct(); rowStruct.col1int = 10; rowStruct.col2string = "stringy"; rowStruct.col3char = 'a'; rowStruct.col4bool = Boolean.TRUE; rowStruct.col5byte = 100; rowStruct.col6short = Short.MAX_VALUE; rowStruct.col7long = 1971L; rowStruct.col8float = 19.71f; rowStruct.col9double = 19.234; rowStruct.col10bigdec = java.math.BigDecimal.TEN; rowStruct.col11date = new java.util.Date(); try (final Jsonb jsonb = JsonbBuilder .create(new JsonbConfig().withPropertyOrderStrategy(PropertyOrderStrategy.LEXICOGRAPHICAL))) { final Record record = Record.class .cast(converter .toType(new RecordConverters.MappingMetaRegistry(), rowStruct, Record.class, () -> jsonBuilderFactory, () -> jsonProvider, () -> jsonb, () -> recordBuilderFactory)); final RowStruct deserialized = RowStruct.class .cast(converter .toType(new RecordConverters.MappingMetaRegistry(), record, RowStruct.class, () -> jsonBuilderFactory, () -> jsonProvider, () -> jsonb, () -> recordBuilderFactory)); if (rowStruct.col10bigdec.doubleValue() == deserialized.col10bigdec.doubleValue()) { deserialized.col10bigdec = rowStruct.col10bigdec; } if (rowStruct.col11date.equals(deserialized.col11date)) { deserialized.col11date = rowStruct.col11date; } assertEquals(rowStruct, deserialized); } }
public Object toType(final MappingMetaRegistry registry, final Object data, final Class<?> parameterType, final Supplier<JsonBuilderFactory> factorySupplier, final Supplier<JsonProvider> providerSupplier, final Supplier<Jsonb> jsonbProvider, final Supplier<RecordBuilderFactory> recordBuilderProvider) { return toType(registry, data, parameterType, factorySupplier, providerSupplier, jsonbProvider, recordBuilderProvider, Collections.emptyMap()); }
RecordConverters implements Serializable { public Object toType(final MappingMetaRegistry registry, final Object data, final Class<?> parameterType, final Supplier<JsonBuilderFactory> factorySupplier, final Supplier<JsonProvider> providerSupplier, final Supplier<Jsonb> jsonbProvider, final Supplier<RecordBuilderFactory> recordBuilderProvider) { return toType(registry, data, parameterType, factorySupplier, providerSupplier, jsonbProvider, recordBuilderProvider, Collections.emptyMap()); } }
RecordConverters implements Serializable { public Object toType(final MappingMetaRegistry registry, final Object data, final Class<?> parameterType, final Supplier<JsonBuilderFactory> factorySupplier, final Supplier<JsonProvider> providerSupplier, final Supplier<Jsonb> jsonbProvider, final Supplier<RecordBuilderFactory> recordBuilderProvider) { return toType(registry, data, parameterType, factorySupplier, providerSupplier, jsonbProvider, recordBuilderProvider, Collections.emptyMap()); }  }
RecordConverters implements Serializable { public Object toType(final MappingMetaRegistry registry, final Object data, final Class<?> parameterType, final Supplier<JsonBuilderFactory> factorySupplier, final Supplier<JsonProvider> providerSupplier, final Supplier<Jsonb> jsonbProvider, final Supplier<RecordBuilderFactory> recordBuilderProvider) { return toType(registry, data, parameterType, factorySupplier, providerSupplier, jsonbProvider, recordBuilderProvider, Collections.emptyMap()); }  T mapNumber(final Class<T> expected, final Number from); Record toRecord(final MappingMetaRegistry registry, final T data, final Supplier<Jsonb> jsonbProvider,
            final Supplier<RecordBuilderFactory> recordBuilderProvider); static Schema toSchema(final RecordBuilderFactory factory, final Object next); Object toType(final MappingMetaRegistry registry, final Object data, final Class<?> parameterType,
            final Supplier<JsonBuilderFactory> factorySupplier, final Supplier<JsonProvider> providerSupplier,
            final Supplier<Jsonb> jsonbProvider, final Supplier<RecordBuilderFactory> recordBuilderProvider); Object toType(final MappingMetaRegistry registry, final Object data, final Class<?> parameterType,
            final Supplier<JsonBuilderFactory> factorySupplier, final Supplier<JsonProvider> providerSupplier,
            final Supplier<Jsonb> jsonbProvider, final Supplier<RecordBuilderFactory> recordBuilderProvider,
            final java.util.Map<String, String> metadata); T coerce(final Class<T> expectedType, final Object value, final String name); }
RecordConverters implements Serializable { public Object toType(final MappingMetaRegistry registry, final Object data, final Class<?> parameterType, final Supplier<JsonBuilderFactory> factorySupplier, final Supplier<JsonProvider> providerSupplier, final Supplier<Jsonb> jsonbProvider, final Supplier<RecordBuilderFactory> recordBuilderProvider) { return toType(registry, data, parameterType, factorySupplier, providerSupplier, jsonbProvider, recordBuilderProvider, Collections.emptyMap()); }  T mapNumber(final Class<T> expected, final Number from); Record toRecord(final MappingMetaRegistry registry, final T data, final Supplier<Jsonb> jsonbProvider,
            final Supplier<RecordBuilderFactory> recordBuilderProvider); static Schema toSchema(final RecordBuilderFactory factory, final Object next); Object toType(final MappingMetaRegistry registry, final Object data, final Class<?> parameterType,
            final Supplier<JsonBuilderFactory> factorySupplier, final Supplier<JsonProvider> providerSupplier,
            final Supplier<Jsonb> jsonbProvider, final Supplier<RecordBuilderFactory> recordBuilderProvider); Object toType(final MappingMetaRegistry registry, final Object data, final Class<?> parameterType,
            final Supplier<JsonBuilderFactory> factorySupplier, final Supplier<JsonProvider> providerSupplier,
            final Supplier<Jsonb> jsonbProvider, final Supplier<RecordBuilderFactory> recordBuilderProvider,
            final java.util.Map<String, String> metadata); T coerce(final Class<T> expectedType, final Object value, final String name);  }