cn.ponfee.disjob.supervisor.application.converter.SchedJobConverterImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of disjob-supervisor Show documentation
Show all versions of disjob-supervisor Show documentation
Distributed job supervisor module
The newest version!
package cn.ponfee.disjob.supervisor.application.converter;
import cn.ponfee.disjob.supervisor.application.request.SchedJobAddRequest;
import cn.ponfee.disjob.supervisor.application.request.SchedJobUpdateRequest;
import cn.ponfee.disjob.supervisor.application.response.SchedInstanceResponse;
import cn.ponfee.disjob.supervisor.application.response.SchedJobResponse;
import cn.ponfee.disjob.supervisor.application.response.SchedTaskResponse;
import cn.ponfee.disjob.supervisor.model.SchedInstance;
import cn.ponfee.disjob.supervisor.model.SchedJob;
import cn.ponfee.disjob.supervisor.model.SchedTask;
import javax.annotation.Generated;
@Generated(
value = "org.mapstruct.ap.MappingProcessor",
date = "2024-11-24T15:48:11+0800",
comments = "version: 1.6.2, compiler: javac, environment: Java 1.8.0_312 (Azul Systems, Inc.)"
)
public class SchedJobConverterImpl implements SchedJobConverter {
@Override
public SchedJob convert(SchedJobAddRequest source) {
if ( source == null ) {
return null;
}
SchedJob schedJob = new SchedJob();
schedJob.setGroup( source.getGroup() );
schedJob.setJobName( source.getJobName() );
schedJob.setJobType( source.getJobType() );
schedJob.setJobState( source.getJobState() );
schedJob.setJobExecutor( source.getJobExecutor() );
schedJob.setJobParam( source.getJobParam() );
schedJob.setRetryType( source.getRetryType() );
schedJob.setRetryCount( source.getRetryCount() );
schedJob.setRetryInterval( source.getRetryInterval() );
schedJob.setStartTime( source.getStartTime() );
schedJob.setEndTime( source.getEndTime() );
schedJob.setTriggerType( source.getTriggerType() );
schedJob.setTriggerValue( source.getTriggerValue() );
schedJob.setExecuteTimeout( source.getExecuteTimeout() );
schedJob.setCollidedStrategy( source.getCollidedStrategy() );
schedJob.setMisfireStrategy( source.getMisfireStrategy() );
schedJob.setRouteStrategy( source.getRouteStrategy() );
schedJob.setShutdownStrategy( source.getShutdownStrategy() );
schedJob.setRemark( source.getRemark() );
schedJob.setCreatedBy( source.getCreatedBy() );
return schedJob;
}
@Override
public SchedJob convert(SchedJobUpdateRequest source) {
if ( source == null ) {
return null;
}
SchedJob schedJob = new SchedJob();
schedJob.setJobId( source.getJobId() );
schedJob.setGroup( source.getGroup() );
schedJob.setJobName( source.getJobName() );
schedJob.setJobType( source.getJobType() );
schedJob.setJobState( source.getJobState() );
schedJob.setJobExecutor( source.getJobExecutor() );
schedJob.setJobParam( source.getJobParam() );
schedJob.setRetryType( source.getRetryType() );
schedJob.setRetryCount( source.getRetryCount() );
schedJob.setRetryInterval( source.getRetryInterval() );
schedJob.setStartTime( source.getStartTime() );
schedJob.setEndTime( source.getEndTime() );
schedJob.setTriggerType( source.getTriggerType() );
schedJob.setTriggerValue( source.getTriggerValue() );
schedJob.setExecuteTimeout( source.getExecuteTimeout() );
schedJob.setCollidedStrategy( source.getCollidedStrategy() );
schedJob.setMisfireStrategy( source.getMisfireStrategy() );
schedJob.setRouteStrategy( source.getRouteStrategy() );
schedJob.setShutdownStrategy( source.getShutdownStrategy() );
schedJob.setRemark( source.getRemark() );
schedJob.setVersion( source.getVersion() );
schedJob.setUpdatedBy( source.getUpdatedBy() );
return schedJob;
}
@Override
public SchedJobResponse convert(SchedJob source) {
if ( source == null ) {
return null;
}
SchedJobResponse schedJobResponse = new SchedJobResponse();
schedJobResponse.setJobId( source.getJobId() );
schedJobResponse.setGroup( source.getGroup() );
schedJobResponse.setJobName( source.getJobName() );
schedJobResponse.setJobType( source.getJobType() );
schedJobResponse.setJobExecutor( source.getJobExecutor() );
schedJobResponse.setJobState( source.getJobState() );
schedJobResponse.setJobParam( source.getJobParam() );
schedJobResponse.setRetryType( source.getRetryType() );
schedJobResponse.setRetryCount( source.getRetryCount() );
schedJobResponse.setRetryInterval( source.getRetryInterval() );
schedJobResponse.setStartTime( source.getStartTime() );
schedJobResponse.setEndTime( source.getEndTime() );
schedJobResponse.setTriggerType( source.getTriggerType() );
schedJobResponse.setTriggerValue( source.getTriggerValue() );
schedJobResponse.setExecuteTimeout( source.getExecuteTimeout() );
schedJobResponse.setCollidedStrategy( source.getCollidedStrategy() );
schedJobResponse.setMisfireStrategy( source.getMisfireStrategy() );
schedJobResponse.setRouteStrategy( source.getRouteStrategy() );
schedJobResponse.setShutdownStrategy( source.getShutdownStrategy() );
schedJobResponse.setLastTriggerTime( source.getLastTriggerTime() );
schedJobResponse.setNextTriggerTime( source.getNextTriggerTime() );
schedJobResponse.setRemark( source.getRemark() );
schedJobResponse.setVersion( source.getVersion() );
schedJobResponse.setUpdatedAt( source.getUpdatedAt() );
schedJobResponse.setCreatedAt( source.getCreatedAt() );
schedJobResponse.setUpdatedBy( source.getUpdatedBy() );
schedJobResponse.setCreatedBy( source.getCreatedBy() );
return schedJobResponse;
}
@Override
public SchedInstanceResponse convert(SchedInstance source) {
if ( source == null ) {
return null;
}
SchedInstanceResponse schedInstanceResponse = new SchedInstanceResponse();
schedInstanceResponse.setInstanceId( source.getInstanceId() );
schedInstanceResponse.setRnstanceId( source.getRnstanceId() );
schedInstanceResponse.setPnstanceId( source.getPnstanceId() );
schedInstanceResponse.setWnstanceId( source.getWnstanceId() );
schedInstanceResponse.setJobId( source.getJobId() );
schedInstanceResponse.setTriggerTime( source.getTriggerTime() );
schedInstanceResponse.setRunType( source.getRunType() );
schedInstanceResponse.setRunState( source.getRunState() );
schedInstanceResponse.setRetrying( source.getRetrying() );
schedInstanceResponse.setRunStartTime( source.getRunStartTime() );
schedInstanceResponse.setRunEndTime( source.getRunEndTime() );
schedInstanceResponse.setRetriedCount( source.getRetriedCount() );
schedInstanceResponse.setWorkflowCurNode( source.getWorkflowCurNode() );
schedInstanceResponse.setRunDuration( CommonConverter.duration(source.getRunStartTime(), source.getRunEndTime()) );
return schedInstanceResponse;
}
@Override
public SchedTaskResponse convert(SchedTask source) {
if ( source == null ) {
return null;
}
SchedTaskResponse schedTaskResponse = new SchedTaskResponse();
schedTaskResponse.setTaskId( source.getTaskId() );
schedTaskResponse.setInstanceId( source.getInstanceId() );
schedTaskResponse.setTaskNo( source.getTaskNo() );
schedTaskResponse.setTaskCount( source.getTaskCount() );
schedTaskResponse.setTaskParam( source.getTaskParam() );
schedTaskResponse.setExecuteStartTime( source.getExecuteStartTime() );
schedTaskResponse.setExecuteEndTime( source.getExecuteEndTime() );
schedTaskResponse.setExecuteState( source.getExecuteState() );
schedTaskResponse.setExecuteSnapshot( source.getExecuteSnapshot() );
schedTaskResponse.setWorker( source.getWorker() );
schedTaskResponse.setErrorMsg( source.getErrorMsg() );
schedTaskResponse.setExecuteDuration( CommonConverter.duration(source.getExecuteStartTime(), source.getExecuteEndTime()) );
return schedTaskResponse;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy