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

org.simpleflatmapper.jdbc.spring.MapPlaceHolderValueGetterSource Maven / Gradle / Ivy

There is a newer version: 9.0.2
Show newest version
package org.simpleflatmapper.jdbc.spring;

import java.util.HashMap;
import java.util.Map;

public final class MapPlaceHolderValueGetterSource implements PlaceHolderValueGetterSource {

    private final Map> parameters;

    public MapPlaceHolderValueGetterSource(PlaceHolderValueGetter[] parameters) {
        this.parameters = new HashMap>();

        for(PlaceHolderValueGetter getter : parameters) {
            this.parameters.put(getter.getColumn(), getter);
        }
    }

    @Override
    public PlaceHolderValueGetter getPlaceHolderValueGetter(String column) {
        return parameters.get(column);
    }

    @Override
    public Iterable> getParameters() {
        return parameters.values();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy