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

org.sfm.querydsl.getter.TupleIndexedGetter 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: 1.10.3
Show newest version
package org.sfm.querydsl.getter;

import com.mysema.query.Tuple;
import org.sfm.querydsl.TupleElementKey;
import org.sfm.reflect.Getter;

public class TupleIndexedGetter

implements Getter { private final Class type; private final int index; public TupleIndexedGetter(Class type, int index) { this.type = type; this.index = index; } @SuppressWarnings("unchecked") public TupleIndexedGetter(TupleElementKey key) { this((Class) key.getExpression().getType(), key.getIndex()); } @Override public P get(Tuple target) throws Exception { return target.get(index, type); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy