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

org.simpleflatmapper.map.mapper.ConstantSourceMapperBuilder 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.mapper;

import org.simpleflatmapper.map.FieldKey;
import org.simpleflatmapper.map.FieldMapper;
import org.simpleflatmapper.map.MapperConfig;
import org.simpleflatmapper.map.SourceFieldMapper;
import org.simpleflatmapper.map.context.MappingContextFactory;
import org.simpleflatmapper.map.context.MappingContextFactoryBuilder;
import org.simpleflatmapper.reflect.meta.ClassMeta;
import org.simpleflatmapper.reflect.meta.PropertyFinder;
import org.simpleflatmapper.reflect.meta.PropertyMeta;
import org.simpleflatmapper.util.ForEachCallBack;

import java.util.List;

public abstract class ConstantSourceMapperBuilder> {

    @SuppressWarnings("unchecked")
    public abstract ConstantSourceMapperBuilder addMapping(K key, ColumnDefinition columnDefinition);

    protected abstract 

void addMapping(K columnKey, ColumnDefinition columnDefinition, PropertyMeta prop); @SuppressWarnings("unchecked") public abstract ContextualSourceFieldMapperImpl mapper(); public abstract SourceFieldMapper sourceFieldMapper(); public abstract boolean isRootAggregate(); public abstract MappingContextFactory contextFactory(); public abstract void addMapper(FieldMapper mapper); public abstract List getKeys(); public abstract >> H forEachProperties(H handler); public static > ConstantSourceMapperBuilder newConstantSourceMapperBuilder( MapperSource mapperSource, ClassMeta classMeta, MapperConfig config, MappingContextFactoryBuilder mappingContextFactoryBuilder, KeyFactory keyFactory) { return newConstantSourceMapperBuilder(mapperSource, classMeta, config, mappingContextFactoryBuilder, keyFactory, null); } public static > ConstantSourceMapperBuilder newConstantSourceMapperBuilder( MapperSource mapperSource, ClassMeta classMeta, MapperConfig config, MappingContextFactoryBuilder mappingContextFactoryBuilder, KeyFactory keyFactory, PropertyFinder propertyFinder) { MapperConfig.Discriminator discriminator = config.getDiscriminator(classMeta); if (discriminator == null) { return new DefaultConstantSourceMapperBuilder( mapperSource, classMeta, config, mappingContextFactoryBuilder, keyFactory, propertyFinder); } else { return new DiscriminatorConstantSourceMapperBuilder( discriminator, mapperSource, classMeta, config, mappingContextFactoryBuilder, keyFactory, propertyFinder ); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy