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

fi.jubic.easymapper.jooq.JooqFieldAccessor Maven / Gradle / Ivy

There is a newer version: 0.5.8
Show newest version
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;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy