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

org.simpleflatmapper.map.setter.ContextualSetterFactoryAdapter 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: 9.0.2
Show newest version
package org.simpleflatmapper.map.setter;

import org.simpleflatmapper.converter.ContextFactoryBuilder;
import org.simpleflatmapper.map.context.MappingContextFactoryBuilder;
import org.simpleflatmapper.map.getter.ContextualGetter;
import org.simpleflatmapper.map.getter.ContextualGetterAdapter;
import org.simpleflatmapper.map.getter.ContextualGetterFactory;
import org.simpleflatmapper.reflect.Getter;
import org.simpleflatmapper.reflect.Setter;
import org.simpleflatmapper.reflect.SetterFactory;
import org.simpleflatmapper.reflect.getter.GetterFactory;

import java.lang.reflect.Type;

public class ContextualSetterFactoryAdapter implements ContextualSetterFactory {
    
    private final SetterFactory delegate;

    public ContextualSetterFactoryAdapter(SetterFactory delegate) {
        this.delegate = delegate;
    }


    @Override
    public 

ContextualSetter getSetter(K arg, ContextFactoryBuilder contextFactoryBuilder) { Setter setter = delegate.getSetter(arg); if (setter == null) return null; return ContextualSetterAdapter.of(setter); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy