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

org.sfm.querydsl.QueryDslMappingContextFactoryBuilder Maven / Gradle / Ivy

There is a newer version: 8.2.3
Show newest version
package org.sfm.querydsl;

import com.mysema.query.Tuple;
import org.sfm.map.context.MappingContextFactoryBuilder;
import org.sfm.map.context.KeySourceGetter;

import java.sql.SQLException;

public class QueryDslMappingContextFactoryBuilder extends MappingContextFactoryBuilder {
    public QueryDslMappingContextFactoryBuilder() {
        super(new TupleKeySourceGetter());
    }

    private static class TupleKeySourceGetter implements KeySourceGetter {
        @Override
        public Object getValue(TupleElementKey key, Tuple source) throws SQLException {
            return source.get(key.getExpression());
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy