Search in sources :

Example 1 with MapperSourceImpl

use of org.simpleflatmapper.map.mapper.MapperSourceImpl in project SimpleFlatMapper by arnaudroger.

the class DatastaxUDTGetter method newFieldMapperBuilder.

public static <P> ConstantSourceMapperBuilder<GettableByIndexData, P, DatastaxColumnKey> newFieldMapperBuilder(DatastaxMapperFactory factory, Type target) {
    MapperConfig<DatastaxColumnKey, FieldMapperColumnDefinition<DatastaxColumnKey>> config = factory.mapperConfig();
    MapperSourceImpl<GettableByIndexData, DatastaxColumnKey> mapperSource = new MapperSourceImpl<GettableByIndexData, DatastaxColumnKey>(GettableByIndexData.class, new RowGetterFactory(factory));
    ClassMeta<P> classMeta = factory.getClassMeta(target);
    return new ConstantSourceMapperBuilder<GettableByIndexData, P, DatastaxColumnKey>(mapperSource, classMeta, config, new DatastaxMappingContextFactoryBuilder(), DatastaxMapperBuilder.KEY_FACTORY);
}
Also used : FieldMapperColumnDefinition(org.simpleflatmapper.map.property.FieldMapperColumnDefinition) GettableByIndexData(com.datastax.driver.core.GettableByIndexData) DatastaxMappingContextFactoryBuilder(org.simpleflatmapper.datastax.impl.DatastaxMappingContextFactoryBuilder) MapperSourceImpl(org.simpleflatmapper.map.mapper.MapperSourceImpl) RowGetterFactory(org.simpleflatmapper.datastax.impl.RowGetterFactory) DatastaxColumnKey(org.simpleflatmapper.datastax.DatastaxColumnKey) ConstantSourceMapperBuilder(org.simpleflatmapper.map.mapper.ConstantSourceMapperBuilder)

Aggregations

GettableByIndexData (com.datastax.driver.core.GettableByIndexData)1 DatastaxColumnKey (org.simpleflatmapper.datastax.DatastaxColumnKey)1 DatastaxMappingContextFactoryBuilder (org.simpleflatmapper.datastax.impl.DatastaxMappingContextFactoryBuilder)1 RowGetterFactory (org.simpleflatmapper.datastax.impl.RowGetterFactory)1 ConstantSourceMapperBuilder (org.simpleflatmapper.map.mapper.ConstantSourceMapperBuilder)1 MapperSourceImpl (org.simpleflatmapper.map.mapper.MapperSourceImpl)1 FieldMapperColumnDefinition (org.simpleflatmapper.map.property.FieldMapperColumnDefinition)1