org.sfm.datastax.impl.getter.DatastaxMapGetter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sfm-datastax Show documentation
Show all versions of sfm-datastax Show documentation
Cassandra Datastax SFM supports.
package org.sfm.datastax.impl.getter;
import com.datastax.driver.core.GettableByIndexData;
import org.sfm.reflect.Getter;
import java.util.Map;
public class DatastaxMapGetter implements Getter> {
private final int index;
private final Class keyType;
private final Class valueType;
public DatastaxMapGetter(int index, Class keyType, Class valueType) {
this.index = index;
this.keyType = keyType;
this.valueType = valueType;
}
@Override
public Map get(GettableByIndexData target) throws Exception {
return target.getMap(index, keyType, valueType);
}
}