com.arextest.schedule.model.converter.ReplayPlanConverterImpl Maven / Gradle / Ivy
package com.arextest.schedule.model.converter;
import com.arextest.schedule.model.ReplayPlan;
import com.arextest.schedule.model.dao.mongodb.ReplayPlanCollection;
import com.arextest.schedule.model.plan.ReplayPlanStageInfo;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Generated;
@Generated(
value = "org.mapstruct.ap.MappingProcessor",
date = "2024-09-18T03:35:13+0000",
comments = "version: 1.5.5.Final, compiler: javac, environment: Java 11.0.24 (Eclipse Adoptium)"
)
public class ReplayPlanConverterImpl implements ReplayPlanConverter {
@Override
public ReplayPlan dtoFromDao(ReplayPlanCollection dao) {
if ( dao == null ) {
return null;
}
ReplayPlan replayPlan = new ReplayPlan();
replayPlan.setId( dao.getId() );
replayPlan.setAppId( dao.getAppId() );
replayPlan.setPlanName( dao.getPlanName() );
replayPlan.setSourceEnv( dao.getSourceEnv() );
replayPlan.setTargetEnv( dao.getTargetEnv() );
replayPlan.setSourceHost( dao.getSourceHost() );
replayPlan.setTargetHost( dao.getTargetHost() );
replayPlan.setTargetImageId( dao.getTargetImageId() );
replayPlan.setTargetImageName( dao.getTargetImageName() );
replayPlan.setCaseSourceFrom( dao.getCaseSourceFrom() );
replayPlan.setCaseSourceTo( dao.getCaseSourceTo() );
replayPlan.setPlanCreateTime( dao.getPlanCreateTime() );
replayPlan.setPlanFinishTime( dao.getPlanFinishTime() );
replayPlan.setOperator( dao.getOperator() );
replayPlan.setArexCordVersion( dao.getArexCordVersion() );
replayPlan.setArexExtVersion( dao.getArexExtVersion() );
replayPlan.setCaseRecordVersion( dao.getCaseRecordVersion() );
replayPlan.setCaseTotalCount( dao.getCaseTotalCount() );
replayPlan.setCaseSourceType( dao.getCaseSourceType() );
replayPlan.setReplayPlanType( dao.getReplayPlanType() );
replayPlan.setCaseCountLimit( dao.getCaseCountLimit() );
List list = dao.getReplayPlanStageList();
if ( list != null ) {
replayPlan.setReplayPlanStageList( new ArrayList( list ) );
}
return replayPlan;
}
@Override
public ReplayPlanCollection daoFromDto(ReplayPlan dto) {
if ( dto == null ) {
return null;
}
ReplayPlanCollection replayPlanCollection = new ReplayPlanCollection();
replayPlanCollection.setAppId( dto.getAppId() );
replayPlanCollection.setPlanName( dto.getPlanName() );
replayPlanCollection.setSourceEnv( dto.getSourceEnv() );
replayPlanCollection.setTargetEnv( dto.getTargetEnv() );
replayPlanCollection.setSourceHost( dto.getSourceHost() );
replayPlanCollection.setTargetHost( dto.getTargetHost() );
replayPlanCollection.setTargetImageId( dto.getTargetImageId() );
replayPlanCollection.setTargetImageName( dto.getTargetImageName() );
replayPlanCollection.setCaseSourceFrom( dto.getCaseSourceFrom() );
replayPlanCollection.setCaseSourceTo( dto.getCaseSourceTo() );
replayPlanCollection.setPlanCreateTime( dto.getPlanCreateTime() );
replayPlanCollection.setPlanFinishTime( dto.getPlanFinishTime() );
replayPlanCollection.setOperator( dto.getOperator() );
replayPlanCollection.setArexCordVersion( dto.getArexCordVersion() );
replayPlanCollection.setArexExtVersion( dto.getArexExtVersion() );
replayPlanCollection.setCaseRecordVersion( dto.getCaseRecordVersion() );
replayPlanCollection.setCaseTotalCount( dto.getCaseTotalCount() );
replayPlanCollection.setCaseSourceType( dto.getCaseSourceType() );
replayPlanCollection.setReplayPlanType( dto.getReplayPlanType() );
replayPlanCollection.setCaseCountLimit( dto.getCaseCountLimit() );
List list = dto.getReplayPlanStageList();
if ( list != null ) {
replayPlanCollection.setReplayPlanStageList( new ArrayList( list ) );
}
replayPlanCollection.setId( null );
replayPlanCollection.setDataChangeCreateTime( System.currentTimeMillis() );
replayPlanCollection.setDataChangeUpdateTime( System.currentTimeMillis() );
replayPlanCollection.setDataChangeCreateDate( new java.util.Date() );
return replayPlanCollection;
}
}