com.aizuda.snailjob.server.web.service.convert.ServerNodeResponseVOConverterImpl Maven / Gradle / Ivy
package com.aizuda.snailjob.server.web.service.convert;
import com.aizuda.snailjob.server.web.model.response.ServerNodeResponseVO;
import com.aizuda.snailjob.template.datasource.persistence.po.ServerNode;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.processing.Generated;
@Generated(
value = "org.mapstruct.ap.MappingProcessor",
date = "2024-05-29T12:27:56+0800",
comments = "version: 1.5.3.Final, compiler: javac, environment: Java 17.0.10 (Amazon.com Inc.)"
)
public class ServerNodeResponseVOConverterImpl implements ServerNodeResponseVOConverter {
@Override
public List convertList(List serverNodes) {
if ( serverNodes == null ) {
return null;
}
List list = new ArrayList( serverNodes.size() );
for ( ServerNode serverNode : serverNodes ) {
list.add( serverNodeToServerNodeResponseVO( serverNode ) );
}
return list;
}
protected ServerNodeResponseVO serverNodeToServerNodeResponseVO(ServerNode serverNode) {
if ( serverNode == null ) {
return null;
}
ServerNodeResponseVO serverNodeResponseVO = new ServerNodeResponseVO();
serverNodeResponseVO.setGroupName( serverNode.getGroupName() );
serverNodeResponseVO.setHostId( serverNode.getHostId() );
serverNodeResponseVO.setHostIp( serverNode.getHostIp() );
serverNodeResponseVO.setHostPort( serverNode.getHostPort() );
serverNodeResponseVO.setNodeType( serverNode.getNodeType() );
serverNodeResponseVO.setCreateDt( serverNode.getCreateDt() );
serverNodeResponseVO.setUpdateDt( serverNode.getUpdateDt() );
serverNodeResponseVO.setExtAttrs( serverNode.getExtAttrs() );
return serverNodeResponseVO;
}
}