use of org.simpleflatmapper.datastax.impl.SettableDataSetterFactory in project SimpleFlatMapper by arnaudroger.
the class DataTypeTest method getSetter.
public static <N> Setter<SettableByIndexData, N> getSetter(Class<N> target, DataType dataType) throws InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException, ClassNotFoundException {
MapperConfig<DatastaxColumnKey, FieldMapperColumnDefinition<DatastaxColumnKey>> mapperConfig = MapperConfig.<DatastaxColumnKey>fieldMapperConfig();
ReflectionService reflectionService = ReflectionService.newInstance();
SettableDataSetterFactory factory = new SettableDataSetterFactory(mapperConfig, reflectionService);
DatastaxColumnKey columnKey = new DatastaxColumnKey("col", 1, dataType);
return factory.getSetter(newPM(target, dataType, columnKey));
}
Aggregations