All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.epi155.emsql.plugin.MyConstructor Maven / Gradle / Ivy

Go to download

Generate DAO classes with JDBC code and DTO interfaces from YAML configuration files

The newest version!
package io.github.epi155.emsql.plugin;

import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.constructor.Constructor;
import org.yaml.snakeyaml.nodes.MappingNode;

import java.util.Map;

public class MyConstructor extends Constructor {
    private final ThreadLocal mapContext;

    public MyConstructor(ThreadLocal mapContext) {
        super(DaoClassConfig.class, new LoaderOptions());
        this.mapContext = mapContext;
    }

    protected void constructMapping2ndStep(MappingNode node, Map mapping) {
        mapContext.set(new MapContextImpl(mapping));
        super.constructMapping2ndStep(node, mapping);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy