// Path: vertx-jooq-async-shared/src/main/java/io/github/jklingsporn/vertx/jooq/async/shared/JsonArrayConverter.java
// public class JsonArrayConverter implements Converter<String,JsonArray> {
// 
//     private static JsonArrayConverter INSTANCE;
//     public static JsonArrayConverter getInstance() {
//         return INSTANCE == null ? INSTANCE = new JsonArrayConverter() : INSTANCE;
//     }
// 
//     @Override
//     public JsonArray from(String databaseObject) {
//         return databaseObject==null?null:new JsonArray(databaseObject);
//     }
// 
//     @Override
//     public String to(JsonArray userObject) {
//         return userObject==null?null:userObject.encode();
//     }
// 
//     @Override
//     public Class<String> fromType() {
//         return String.class;
//     }
// 
//     @Override
//     public Class<JsonArray> toType() {
//         return JsonArray.class;
//     }
// }
// 
// Path: vertx-jooq-async-shared/src/main/java/io/github/jklingsporn/vertx/jooq/async/shared/JsonObjectConverter.java
// public class JsonObjectConverter implements Converter<String,JsonObject> {
// 
//     private static JsonObjectConverter INSTANCE;
//     public static JsonObjectConverter getInstance() {
//         return INSTANCE == null ? INSTANCE = new JsonObjectConverter() : INSTANCE;
//     }
// 
//     @Override
//     public JsonObject from(String databaseObject) {
//         return databaseObject==null?null:new JsonObject(databaseObject);
//     }
// 
//     @Override
//     public String to(JsonObject userObject) {
//         return userObject==null?null:userObject.encode();
//     }
// 
//     @Override
//     public Class<String> fromType() {
//         return String.class;
//     }
// 
//     @Override
//     public Class<JsonObject> toType() {
//         return JsonObject.class;
//     }
// }


import io.github.jklingsporn.vertx.jooq.async.shared.JsonArrayConverter;
import io.github.jklingsporn.vertx.jooq.async.shared.JsonObjectConverter;
import io.vertx.core.json.JsonObject;
import org.jooq.Constants;
import org.jooq.Record;
import org.jooq.tools.JooqLogger;
import org.jooq.util.*;
import java.io.File;
import java.time.Instant;
import java.util.Collection;
import java.util.List;
        for (ColumnDefinition column : table.getColumns()) {
            String setter = getStrategy().getJavaSetterName(column, GeneratorStrategy.Mode.INTERFACE);
            String columnType = getJavaType(column.getType());
            String jsonName = getJsonName(column);
            if(handleCustomTypeFromJson(column, setter, columnType, jsonName, out)) {
                //handled by user
            }else if(isType(columnType, Integer.class)){
                out.tab(2).println("%s(json.getInteger(\"%s\"));", setter, jsonName);
            }else if(isType(columnType, Short.class)){
                out.tab(2).println("%s(json.getInteger(\"%s\")==null?null:json.getInteger(\"%s\").shortValue());", setter, jsonName, jsonName);
            }else if(isType(columnType, Byte.class)){
                out.tab(2).println("%s(json.getInteger(\"%s\")==null?null:json.getInteger(\"%s\").byteValue());", setter,jsonName, jsonName);
            }else if(isType(columnType, Long.class)){
                out.tab(2).println("%s(json.getLong(\"%s\"));", setter, jsonName);
            }else if(isType(columnType, Float.class)){
                out.tab(2).println("%s(json.getFloat(\"%s\"));", setter, jsonName);
            }else if(isType(columnType, Double.class)){
                out.tab(2).println("%s(json.getDouble(\"%s\"));", setter, jsonName);
            }else if(isType(columnType, Boolean.class)){
                out.tab(2).println("%s(json.getBoolean(\"%s\"));", setter, jsonName);
            }else if(isType(columnType, String.class)){
                out.tab(2).println("%s(json.getString(\"%s\"));", setter, jsonName);
            }else if(columnType.equals(byte.class.getName()+"[]")){
                out.tab(2).println("%s(json.getBinary(\"%s\"));", setter, jsonName);
            }else if(isType(columnType,Instant.class)){
                out.tab(2).println("%s(json.getInstant(\"%s\"));", setter, jsonName);
            }else if(isEnum(table, column)) {
                out.tab(2).println("%s(java.util.Arrays.stream(%s.values()).filter(td -> td.getLiteral().equals(json.getString(\"%s\"))).findFirst().orElse(null));", setter, columnType, jsonName);
            }else if(column.getType().getConverter() != null && isType(column.getType().getConverter(),JsonObjectConverter.class)){
                out.tab(2).println("%s(json.getJsonObject(\"%s\"));", setter, jsonName);
// Path: vertx-jooq-async-shared/src/main/java/io/github/jklingsporn/vertx/jooq/async/shared/JsonArrayConverter.java
// public class JsonArrayConverter implements Converter<String,JsonArray> {
// 
//     private static JsonArrayConverter INSTANCE;
//     public static JsonArrayConverter getInstance() {
//         return INSTANCE == null ? INSTANCE = new JsonArrayConverter() : INSTANCE;
//     }
// 
//     @Override
//     public JsonArray from(String databaseObject) {
//         return databaseObject==null?null:new JsonArray(databaseObject);
//     }
// 
//     @Override
//     public String to(JsonArray userObject) {
//         return userObject==null?null:userObject.encode();
//     }
// 
//     @Override
//     public Class<String> fromType() {
//         return String.class;
//     }
// 
//     @Override
//     public Class<JsonArray> toType() {
//         return JsonArray.class;
//     }
// }
// 
// Path: vertx-jooq-async-shared/src/main/java/io/github/jklingsporn/vertx/jooq/async/shared/JsonObjectConverter.java
// public class JsonObjectConverter implements Converter<String,JsonObject> {
// 
//     private static JsonObjectConverter INSTANCE;
//     public static JsonObjectConverter getInstance() {
//         return INSTANCE == null ? INSTANCE = new JsonObjectConverter() : INSTANCE;
//     }
// 
//     @Override
//     public JsonObject from(String databaseObject) {
//         return databaseObject==null?null:new JsonObject(databaseObject);
//     }
// 
//     @Override
//     public String to(JsonObject userObject) {
//         return userObject==null?null:userObject.encode();
//     }
// 
//     @Override
//     public Class<String> fromType() {
//         return String.class;
//     }
// 
//     @Override
//     public Class<JsonObject> toType() {
//         return JsonObject.class;
//     }
// }


// Path: vertx-jooq-async-generate/src/main/java/io/github/jklingsporn/vertx/jooq/async/generate/AbstractVertxGenerator.java
import io.github.jklingsporn.vertx.jooq.async.shared.JsonArrayConverter;
import io.github.jklingsporn.vertx.jooq.async.shared.JsonObjectConverter;
import io.vertx.core.json.JsonObject;
import org.jooq.Constants;
import org.jooq.Record;
import org.jooq.tools.JooqLogger;
import org.jooq.util.*;
import java.io.File;
import java.time.Instant;
import java.util.Collection;
import java.util.List;

        for (ColumnDefinition column : table.getColumns()) {
            String setter = getStrategy().getJavaSetterName(column, GeneratorStrategy.Mode.INTERFACE);
            String columnType = getJavaType(column.getType());
            String jsonName = getJsonName(column);
            if(handleCustomTypeFromJson(column, setter, columnType, jsonName, out)) {
                //handled by user
            }else if(isType(columnType, Integer.class)){
                out.tab(2).println("%s(json.getInteger(\"%s\"));", setter, jsonName);
            }else if(isType(columnType, Short.class)){
                out.tab(2).println("%s(json.getInteger(\"%s\")==null?null:json.getInteger(\"%s\").shortValue());", setter, jsonName, jsonName);
            }else if(isType(columnType, Byte.class)){
                out.tab(2).println("%s(json.getInteger(\"%s\")==null?null:json.getInteger(\"%s\").byteValue());", setter,jsonName, jsonName);
            }else if(isType(columnType, Long.class)){
                out.tab(2).println("%s(json.getLong(\"%s\"));", setter, jsonName);
            }else if(isType(columnType, Float.class)){
                out.tab(2).println("%s(json.getFloat(\"%s\"));", setter, jsonName);
            }else if(isType(columnType, Double.class)){
                out.tab(2).println("%s(json.getDouble(\"%s\"));", setter, jsonName);
            }else if(isType(columnType, Boolean.class)){
                out.tab(2).println("%s(json.getBoolean(\"%s\"));", setter, jsonName);
            }else if(isType(columnType, String.class)){
                out.tab(2).println("%s(json.getString(\"%s\"));", setter, jsonName);
            }else if(columnType.equals(byte.class.getName()+"[]")){
                out.tab(2).println("%s(json.getBinary(\"%s\"));", setter, jsonName);
            }else if(isType(columnType,Instant.class)){
                out.tab(2).println("%s(json.getInstant(\"%s\"));", setter, jsonName);
            }else if(isEnum(table, column)) {
                out.tab(2).println("%s(java.util.Arrays.stream(%s.values()).filter(td -> td.getLiteral().equals(json.getString(\"%s\"))).findFirst().orElse(null));", setter, columnType, jsonName);
            }else if(column.getType().getConverter() != null && isType(column.getType().getConverter(),JsonObjectConverter.class)){
                out.tab(2).println("%s(json.getJsonObject(\"%s\"));", setter, jsonName);
            }else if(column.getType().getConverter() != null && isType(column.getType().getConverter(),JsonArrayConverter.class)){