// Path: vertx-jooq-async-shared/src/main/java/io/github/jklingsporn/vertx/jooq/async/shared/VertxPojo.java
// public interface VertxPojo {
// 
//     public VertxPojo fromJson(io.vertx.core.json.JsonObject json);
// 
//     public io.vertx.core.json.JsonObject toJson();
// }


import io.github.jklingsporn.vertx.jooq.async.shared.VertxPojo;
import org.jooq.util.DefaultGeneratorStrategy;
import org.jooq.util.Definition;
import java.util.List;
package io.github.jklingsporn.vertx.jooq.async.generate;



/**
 * Created by jensklingsporn on 25.10.16.
 *
 * We need this class to let the DAOs implements <code>VertxDAO</code>.
 * Unfortunately we can not get the type easily, that's why we have to
 * set the placeholder.
 */
public class VertxGeneratorStrategy extends DefaultGeneratorStrategy {

    private final String daoClassName;

    public VertxGeneratorStrategy(String daoClassName) {
        this.daoClassName = daoClassName;
    }

    @Override
    public List<String> getJavaClassImplements(Definition definition, Mode mode) {
        List<String> javaClassImplements = super.getJavaClassImplements(definition, mode);
        if(mode.equals(Mode.DAO)){
            final String tableRecord = getFullJavaClassName(definition, Mode.RECORD);
            final String pType = getFullJavaClassName(definition, Mode.POJO);
            javaClassImplements.add(String.format("%s<%s,%s,%s>",daoClassName,tableRecord,pType, VertxJavaWriter.PLACEHOLDER_DAO_TYPE));
        }else if(mode.equals(Mode.INTERFACE)){
// Path: vertx-jooq-async-shared/src/main/java/io/github/jklingsporn/vertx/jooq/async/shared/VertxPojo.java
// public interface VertxPojo {
// 
//     public VertxPojo fromJson(io.vertx.core.json.JsonObject json);
// 
//     public io.vertx.core.json.JsonObject toJson();
// }


// Path: vertx-jooq-async-generate/src/main/java/io/github/jklingsporn/vertx/jooq/async/generate/VertxGeneratorStrategy.java
import io.github.jklingsporn.vertx.jooq.async.shared.VertxPojo;
import org.jooq.util.DefaultGeneratorStrategy;
import org.jooq.util.Definition;
import java.util.List;

package io.github.jklingsporn.vertx.jooq.async.generate;



/**
 * Created by jensklingsporn on 25.10.16.
 *
 * We need this class to let the DAOs implements <code>VertxDAO</code>.
 * Unfortunately we can not get the type easily, that's why we have to
 * set the placeholder.
 */
public class VertxGeneratorStrategy extends DefaultGeneratorStrategy {

    private final String daoClassName;

    public VertxGeneratorStrategy(String daoClassName) {
        this.daoClassName = daoClassName;
    }

    @Override
    public List<String> getJavaClassImplements(Definition definition, Mode mode) {
        List<String> javaClassImplements = super.getJavaClassImplements(definition, mode);
        if(mode.equals(Mode.DAO)){
            final String tableRecord = getFullJavaClassName(definition, Mode.RECORD);
            final String pType = getFullJavaClassName(definition, Mode.POJO);
            javaClassImplements.add(String.format("%s<%s,%s,%s>",daoClassName,tableRecord,pType, VertxJavaWriter.PLACEHOLDER_DAO_TYPE));
        }else if(mode.equals(Mode.INTERFACE)){
            javaClassImplements.add(VertxPojo.class.getName());