fi.jubic.easymapper.jooq.JooqFieldAccessor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of easymapper-jooq Show documentation
Show all versions of easymapper-jooq Show documentation
Map JOOQ records to value objects.
package fi.jubic.easymapper.jooq;
import fi.jubic.easymapper.FieldAccessor;
import fi.jubic.easymapper.MappingException;
import org.jooq.Record;
import org.jooq.Table;
public interface JooqFieldAccessor extends FieldAccessor {
JooqFieldAccessor alias(Table tableAlias);
class NoOpAccessor implements JooqFieldAccessor {
@Override
public boolean shouldExtract() {
return false;
}
@Override
public JooqFieldAccessor alias(Table tableAlias) {
return this;
}
@Override
public F extract(R input) throws MappingException {
return null;
}
@Override
public R write(R output, F value) throws MappingException {
return output;
}
}
}