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

org.sfm.map.impl.DefaultPropertyNameMatcherFactory Maven / Gradle / Ivy

Go to download

Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.

There is a newer version: 1.10.3
Show newest version
package org.sfm.map.impl;

import org.sfm.map.FieldKey;
import org.sfm.reflect.meta.DefaultPropertyNameMatcher;
import org.sfm.reflect.meta.PropertyNameMatcher;
import org.sfm.reflect.meta.PropertyNameMatcherFactory;

public class DefaultPropertyNameMatcherFactory implements PropertyNameMatcherFactory {

    private final boolean exactMatch;
    private final boolean caseSensitive;

    public DefaultPropertyNameMatcherFactory(boolean exactMatch, boolean caseSensitive) {
        this.exactMatch = exactMatch;
        this.caseSensitive = caseSensitive;
    }

    public DefaultPropertyNameMatcherFactory() {
        this(false, false);
    }


    @Override
    public PropertyNameMatcher newInstance(FieldKey key) {
        return new DefaultPropertyNameMatcher(key.getName(), 0, exactMatch, caseSensitive);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy