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

org.simpleflatmapper.jooq.JooqRecordMapperWrapper Maven / Gradle / Ivy

package org.simpleflatmapper.jooq;

import org.jooq.Record;
import org.jooq.RecordMapper;
import org.simpleflatmapper.map.SourceMapper;
import org.simpleflatmapper.map.context.MappingContextFactory;

public class JooqRecordMapperWrapper implements RecordMapper {

	private final SourceMapper mapper;
	private final MappingContextFactory mappingContextFactory;

	public JooqRecordMapperWrapper(SourceMapper mapper, MappingContextFactory mappingContextFactory) {
		this.mapper = mapper;
		this.mappingContextFactory = mappingContextFactory;
	}

	@Override
	public E map(R record) {
		return mapper.map(record, mappingContextFactory.newContext());
	}

	public SourceMapper getMapper() {
		return mapper;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy