com.aizuda.snailjob.server.web.service.convert.JobTaskResponseVOConverterImpl Maven / Gradle / Ivy
package com.aizuda.snailjob.server.web.service.convert;
import com.aizuda.snailjob.server.web.model.response.JobTaskResponseVO;
import com.aizuda.snailjob.template.datasource.persistence.po.JobTask;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.processing.Generated;
@Generated(
value = "org.mapstruct.ap.MappingProcessor",
date = "2024-05-29T12:27:56+0800",
comments = "version: 1.5.3.Final, compiler: javac, environment: Java 17.0.10 (Amazon.com Inc.)"
)
public class JobTaskResponseVOConverterImpl implements JobTaskResponseVOConverter {
@Override
public List convertList(List jobTasks) {
if ( jobTasks == null ) {
return null;
}
List list = new ArrayList( jobTasks.size() );
for ( JobTask jobTask : jobTasks ) {
list.add( jobTaskToJobTaskResponseVO( jobTask ) );
}
return list;
}
protected JobTaskResponseVO jobTaskToJobTaskResponseVO(JobTask jobTask) {
if ( jobTask == null ) {
return null;
}
JobTaskResponseVO jobTaskResponseVO = new JobTaskResponseVO();
jobTaskResponseVO.setId( jobTask.getId() );
jobTaskResponseVO.setGroupName( jobTask.getGroupName() );
jobTaskResponseVO.setJobId( jobTask.getJobId() );
jobTaskResponseVO.setTaskBatchId( jobTask.getTaskBatchId() );
jobTaskResponseVO.setParentId( jobTask.getParentId() );
jobTaskResponseVO.setTaskStatus( jobTask.getTaskStatus() );
jobTaskResponseVO.setRetryCount( jobTask.getRetryCount() );
jobTaskResponseVO.setResultMessage( jobTask.getResultMessage() );
jobTaskResponseVO.setClientInfo( jobTask.getClientInfo() );
jobTaskResponseVO.setArgsStr( jobTask.getArgsStr() );
if ( jobTask.getArgsType() != null ) {
jobTaskResponseVO.setArgsType( String.valueOf( jobTask.getArgsType() ) );
}
jobTaskResponseVO.setExtAttrs( jobTask.getExtAttrs() );
jobTaskResponseVO.setCreateDt( jobTask.getCreateDt() );
jobTaskResponseVO.setUpdateDt( jobTask.getUpdateDt() );
return jobTaskResponseVO;
}
}