com.arextest.web.model.mapper.ReplayScheduleConfigMapperImpl Maven / Gradle / Ivy
The newest version!
package com.arextest.web.model.mapper;
import com.arextest.web.model.contract.contracts.config.replay.ScheduleConfiguration;
import com.arextest.web.model.dao.mongodb.ReplayScheduleConfigCollection;
import java.util.LinkedHashSet;
import java.util.Set;
/*
@Generated(
value = "org.mapstruct.ap.MappingProcessor",
date = "2024-12-23T06:09:23+0000",
comments = "version: 1.5.5.Final, compiler: javac, environment: Java 21.0.5 (Eclipse Adoptium)"
)
*/
public class ReplayScheduleConfigMapperImpl implements ReplayScheduleConfigMapper {
@Override
public ScheduleConfiguration dtoFromDao(ReplayScheduleConfigCollection dao) {
if ( dao == null ) {
return null;
}
ScheduleConfiguration scheduleConfiguration = new ScheduleConfiguration();
scheduleConfiguration.setExcludeOperationMap( deserializeMap( dao.getExcludeOperationMap() ) );
scheduleConfiguration.setAppId( dao.getAppId() );
scheduleConfiguration.setOffsetDays( dao.getOffsetDays() );
Set set = dao.getTargetEnv();
if ( set != null ) {
scheduleConfiguration.setTargetEnv( new LinkedHashSet( set ) );
}
scheduleConfiguration.setSendMaxQps( dao.getSendMaxQps() );
scheduleConfiguration.setMockHandlerJarUrl( dao.getMockHandlerJarUrl() );
scheduleConfiguration.setModifiedTime( dao.getDataChangeUpdateTime() == null ? null : new java.sql.Timestamp(dao.getDataChangeUpdateTime()) );
return scheduleConfiguration;
}
@Override
public ReplayScheduleConfigCollection daoFromDto(ScheduleConfiguration dto) {
if ( dto == null ) {
return null;
}
ReplayScheduleConfigCollection replayScheduleConfigCollection = new ReplayScheduleConfigCollection();
replayScheduleConfigCollection.setExcludeOperationMap( serializeMap( dto.getExcludeOperationMap() ) );
replayScheduleConfigCollection.setAppId( dto.getAppId() );
replayScheduleConfigCollection.setOffsetDays( dto.getOffsetDays() );
Set set = dto.getTargetEnv();
if ( set != null ) {
replayScheduleConfigCollection.setTargetEnv( new LinkedHashSet( set ) );
}
replayScheduleConfigCollection.setSendMaxQps( dto.getSendMaxQps() );
replayScheduleConfigCollection.setMockHandlerJarUrl( dto.getMockHandlerJarUrl() );
replayScheduleConfigCollection.setDataChangeCreateTime( System.currentTimeMillis() );
replayScheduleConfigCollection.setDataChangeUpdateTime( System.currentTimeMillis() );
return replayScheduleConfigCollection;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy