org.simpleflatmapper.jdbc.spring.MapPlaceHolderValueGetterSource Maven / Gradle / Ivy
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();
}
}