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

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

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

import java.util.Arrays;

public final class ArrayPlaceHolderValueGetterSource implements PlaceHolderValueGetterSource {

    private final PlaceHolderValueGetter[] parameters;

    public ArrayPlaceHolderValueGetterSource(PlaceHolderValueGetter[] parameters) {
        this.parameters = parameters;
    }

    @Override
    public PlaceHolderValueGetter getPlaceHolderValueGetter(String column) {
        for(PlaceHolderValueGetter parameter : parameters) {
            if (parameter.isColumn(column)) {
                return parameter;
            }
        }
        return null;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy