use of org.simpleflatmapper.map.mapper.PropertyMapping in project SimpleFlatMapper by arnaudroger.
the class ConstantSourceFieldMapperFactoryImplTest method createPropertyMapping.
public static <T, P> PropertyMapping<T, P, SampleFieldKey, FieldMapperColumnDefinition<SampleFieldKey>> createPropertyMapping(Class<T> target, String property) {
ClassMeta<T> classMeta = REFLECTION_SERVICE.getClassMeta(target);
PropertyMeta<T, P> propertyMeta = classMeta.newPropertyFinder(ConstantPredicate.<PropertyMeta<?, ?>>truePredicate()).findProperty(DefaultPropertyNameMatcher.of(property), new Object[0]);
PropertyMapping<T, P, SampleFieldKey, FieldMapperColumnDefinition<SampleFieldKey>> pm = new PropertyMapping<T, P, SampleFieldKey, FieldMapperColumnDefinition<SampleFieldKey>>(propertyMeta, new SampleFieldKey(property, 0), FieldMapperColumnDefinition.<SampleFieldKey>identity());
return pm;
}
Aggregations