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