use of org.jowidgets.cap.service.api.bean.IBeanDtoFactory in project jo-client-platform by jo-source.
the class BeanDtoFactoryHelper method createDtos.
@SuppressWarnings({ "unchecked", "rawtypes" })
public static <BEAN_TYPE> List<IBeanDto> createDtos(final IBeanDtoFactory<? extends BEAN_TYPE> beanDtoFactory, final Collection<? extends BEAN_TYPE> beans, final IExecutionCallback executionCallback) {
Assert.paramNotNull(beanDtoFactory, "beanDtoFactory");
Assert.paramNotNull(beans, "beans");
final List<IBeanDto> result = new LinkedList<IBeanDto>();
for (final BEAN_TYPE bean : beans) {
checkCanceled(executionCallback);
final IBeanDtoFactory factory = beanDtoFactory;
result.add(factory.createDto(bean));
}
return result;
}
Aggregations