com.aizuda.snailjob.server.web.service.convert.JobResponseVOConverterImpl Maven / Gradle / Ivy
package com.aizuda.snailjob.server.web.service.convert;
import com.aizuda.snailjob.server.web.model.response.JobResponseVO;
import com.aizuda.snailjob.template.datasource.persistence.po.Job;
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 JobResponseVOConverterImpl implements JobResponseVOConverter {
@Override
public List convertList(List jobs) {
if ( jobs == null ) {
return null;
}
List list = new ArrayList( jobs.size() );
for ( Job job : jobs ) {
list.add( convert( job ) );
}
return list;
}
@Override
public JobResponseVO convert(Job job) {
if ( job == null ) {
return null;
}
JobResponseVO jobResponseVO = new JobResponseVO();
jobResponseVO.setId( job.getId() );
jobResponseVO.setGroupName( job.getGroupName() );
jobResponseVO.setJobName( job.getJobName() );
jobResponseVO.setArgsStr( job.getArgsStr() );
if ( job.getArgsType() != null ) {
jobResponseVO.setArgsType( String.valueOf( job.getArgsType() ) );
}
jobResponseVO.setExtAttrs( job.getExtAttrs() );
jobResponseVO.setJobStatus( job.getJobStatus() );
jobResponseVO.setRouteKey( job.getRouteKey() );
jobResponseVO.setExecutorType( job.getExecutorType() );
jobResponseVO.setExecutorInfo( job.getExecutorInfo() );
jobResponseVO.setTriggerType( job.getTriggerType() );
jobResponseVO.setTriggerInterval( job.getTriggerInterval() );
jobResponseVO.setBlockStrategy( job.getBlockStrategy() );
jobResponseVO.setExecutorTimeout( job.getExecutorTimeout() );
jobResponseVO.setMaxRetryTimes( job.getMaxRetryTimes() );
jobResponseVO.setRetryInterval( job.getRetryInterval() );
jobResponseVO.setTaskType( job.getTaskType() );
jobResponseVO.setParallelNum( job.getParallelNum() );
jobResponseVO.setBucketIndex( job.getBucketIndex() );
jobResponseVO.setDescription( job.getDescription() );
jobResponseVO.setCreateDt( job.getCreateDt() );
jobResponseVO.setUpdateDt( job.getUpdateDt() );
jobResponseVO.setDeleted( job.getDeleted() );
jobResponseVO.setNextTriggerAt( JobResponseVOConverter.toLocalDateTime(job.getNextTriggerAt()) );
return jobResponseVO;
}
}