org.sfm.datastax.impl.DatastaxMappingContextFactoryBuilder 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;
import com.datastax.driver.core.GettableByIndexData;
import org.sfm.datastax.DatastaxColumnKey;
import org.sfm.map.context.KeySourceGetter;
import org.sfm.map.context.MappingContextFactoryBuilder;
public class DatastaxMappingContextFactoryBuilder extends MappingContextFactoryBuilder {
public DatastaxMappingContextFactoryBuilder() {
super(new JdbcKeySourceGetter());
}
private static class JdbcKeySourceGetter implements KeySourceGetter {
@Override
public Object getValue(DatastaxColumnKey key, GettableByIndexData source) {
return source.getObject(key.getIndex());
}
}
}