com.arextest.web.model.mapper.ConfigComparisonScriptContentMapperImpl Maven / Gradle / Ivy
The newest version!
package com.arextest.web.model.mapper;
import com.arextest.web.model.contract.contracts.config.replay.ComparisonScriptContentRequestType;
import com.arextest.web.model.dao.mongodb.ComparisonScriptContentCollection;
import com.arextest.web.model.dto.config.ComparisonScriptContent;
/*
@Generated(
value = "org.mapstruct.ap.MappingProcessor",
date = "2024-12-23T06:09:22+0000",
comments = "version: 1.5.5.Final, compiler: javac, environment: Java 21.0.5 (Eclipse Adoptium)"
)
*/
public class ConfigComparisonScriptContentMapperImpl implements ConfigComparisonScriptContentMapper {
@Override
public ComparisonScriptContent dtoFromContract(ComparisonScriptContentRequestType contract) {
if ( contract == null ) {
return null;
}
ComparisonScriptContent comparisonScriptContent = new ComparisonScriptContent();
comparisonScriptContent.setId( contract.getId() );
comparisonScriptContent.setAliasName( contract.getAliasName() );
comparisonScriptContent.setContent( contract.getContent() );
return comparisonScriptContent;
}
@Override
public ComparisonScriptContentCollection daoFromDto(ComparisonScriptContent dto) {
if ( dto == null ) {
return null;
}
ComparisonScriptContentCollection comparisonScriptContentCollection = new ComparisonScriptContentCollection();
comparisonScriptContentCollection.setId( dto.getId() );
comparisonScriptContentCollection.setAliasName( dto.getAliasName() );
comparisonScriptContentCollection.setContent( dto.getContent() );
comparisonScriptContentCollection.setDataChangeCreateTime( System.currentTimeMillis() );
comparisonScriptContentCollection.setDataChangeUpdateTime( System.currentTimeMillis() );
return comparisonScriptContentCollection;
}
@Override
public ComparisonScriptContent dtoFromDao(ComparisonScriptContentCollection dao) {
if ( dao == null ) {
return null;
}
ComparisonScriptContent comparisonScriptContent = new ComparisonScriptContent();
comparisonScriptContent.setId( dao.getId() );
comparisonScriptContent.setDataChangeCreateTime( dao.getDataChangeCreateTime() );
comparisonScriptContent.setDataChangeUpdateTime( dao.getDataChangeUpdateTime() );
comparisonScriptContent.setAliasName( dao.getAliasName() );
comparisonScriptContent.setContent( dao.getContent() );
return comparisonScriptContent;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy