All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.arextest.schedule.model.converter.ReplayRunDetailsConverterImpl Maven / Gradle / Ivy

There is a newer version: 2.0.4
Show newest version
package com.arextest.schedule.model.converter;

import com.arextest.schedule.model.ReplayActionCaseItem;
import com.arextest.schedule.model.dao.mongodb.ReplayRunDetailsCollection;
import org.springframework.stereotype.Component;

/*
@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2024-10-23T07:32:39+0000",
    comments = "version: 1.5.5.Final, compiler: javac, environment: Java 21.0.4 (Eclipse Adoptium)"
)
*/
@Component
public class ReplayRunDetailsConverterImpl extends ReplayRunDetailsConverter {

    @Override
    public ReplayActionCaseItem dtoFromDao(ReplayRunDetailsCollection dao) {
        if ( dao == null ) {
            return null;
        }

        ReplayActionCaseItem replayActionCaseItem = new ReplayActionCaseItem();

        replayActionCaseItem.setId( dao.getId() );
        replayActionCaseItem.setPlanItemId( dao.getPlanItemId() );
        replayActionCaseItem.setPlanId( dao.getPlanId() );
        replayActionCaseItem.setRecordId( dao.getRecordId() );
        replayActionCaseItem.setTargetResultId( dao.getTargetResultId() );
        replayActionCaseItem.setSourceResultId( dao.getSourceResultId() );
        replayActionCaseItem.setContextIdentifier( dao.getContextIdentifier() );
        replayActionCaseItem.setCaseProviderCode( dao.getCaseProviderCode() );
        replayActionCaseItem.setSendStatus( dao.getSendStatus() );
        replayActionCaseItem.setCompareStatus( dao.getCompareStatus() );
        replayActionCaseItem.setCaseStatus( dao.getCaseStatus() );
        replayActionCaseItem.setCaseType( dao.getCaseType() );
        replayActionCaseItem.setRecordTime( dao.getRecordTime() );
        replayActionCaseItem.setExpirationTime( dao.getExpirationTime() );
        replayActionCaseItem.setTargetRequest( decompressRequest( dao.getTargetRequest() ) );

        return replayActionCaseItem;
    }

    @Override
    public ReplayRunDetailsCollection daoFromDto(ReplayActionCaseItem dto) {
        if ( dto == null ) {
            return null;
        }

        ReplayRunDetailsCollection replayRunDetailsCollection = new ReplayRunDetailsCollection();

        replayRunDetailsCollection.setPlanId( dto.getPlanId() );
        replayRunDetailsCollection.setPlanItemId( dto.getPlanItemId() );
        replayRunDetailsCollection.setCaseProviderCode( dto.getCaseProviderCode() );
        replayRunDetailsCollection.setRecordId( dto.getRecordId() );
        replayRunDetailsCollection.setTargetResultId( dto.getTargetResultId() );
        replayRunDetailsCollection.setSourceResultId( dto.getSourceResultId() );
        replayRunDetailsCollection.setContextIdentifier( dto.getContextIdentifier() );
        replayRunDetailsCollection.setSendStatus( dto.getSendStatus() );
        replayRunDetailsCollection.setCompareStatus( dto.getCompareStatus() );
        replayRunDetailsCollection.setCaseType( dto.getCaseType() );
        replayRunDetailsCollection.setRecordTime( dto.getRecordTime() );
        replayRunDetailsCollection.setExpirationTime( dto.getExpirationTime() );
        replayRunDetailsCollection.setTargetRequest( compressRequest( dto.getTargetRequest() ) );
        replayRunDetailsCollection.setCaseStatus( dto.getCaseStatus() );

        replayRunDetailsCollection.setId( null );
        replayRunDetailsCollection.setOperationId( null );
        replayRunDetailsCollection.setDataChangeCreateTime( System.currentTimeMillis() );
        replayRunDetailsCollection.setDataChangeUpdateTime( System.currentTimeMillis() );
        replayRunDetailsCollection.setDataChangeCreateDate( new java.util.Date() );

        return replayRunDetailsCollection;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy