@SuppressWarnings("unchecked")
@Override
protected Object doConvert(Object value, Class<?> sourceType, Class targetType, MappingPolicy mappingPolicy) {
if (EntityPath.class.isAssignableFrom(targetType)) {
return new ConvertingEntityPath(toPath(value, sourceType),template);
}
if (template.isNodeEntity(targetType)) {
return template.projectTo(toNode(value, sourceType), targetType, mappingPolicy);
}
if (template.isRelationshipEntity(targetType)) {