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

com.lwohvye.service.mapstruct.LogSmallMapperImpl Maven / Gradle / Ivy

There is a newer version: 3.1.0
Show newest version
package com.lwohvye.service.mapstruct;

import com.lwohvye.domain.Log;
import com.lwohvye.service.dto.LogSmallDTO;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.processing.Generated;
import org.springframework.stereotype.Component;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2021-10-14T07:32:26+0800",
    comments = "version: 1.4.2.Final, compiler: javac, environment: Java 17 (Oracle Corporation)"
)
@Component
public class LogSmallMapperImpl implements LogSmallMapper {

    @Override
    public Log toEntity(LogSmallDTO dto) {
        if ( dto == null ) {
            return null;
        }

        Log log = new Log();

        log.setDescription( dto.getDescription() );
        log.setRequestIp( dto.getRequestIp() );
        log.setAddress( dto.getAddress() );
        log.setBrowser( dto.getBrowser() );
        log.setTime( dto.getTime() );
        log.setCreateTime( dto.getCreateTime() );

        return log;
    }

    @Override
    public LogSmallDTO toDto(Log entity) {
        if ( entity == null ) {
            return null;
        }

        LogSmallDTO logSmallDTO = new LogSmallDTO();

        logSmallDTO.setDescription( entity.getDescription() );
        logSmallDTO.setRequestIp( entity.getRequestIp() );
        logSmallDTO.setTime( entity.getTime() );
        logSmallDTO.setAddress( entity.getAddress() );
        logSmallDTO.setBrowser( entity.getBrowser() );
        logSmallDTO.setCreateTime( entity.getCreateTime() );

        return logSmallDTO;
    }

    @Override
    public List toEntity(List dtoList) {
        if ( dtoList == null ) {
            return null;
        }

        List list = new ArrayList( dtoList.size() );
        for ( LogSmallDTO logSmallDTO : dtoList ) {
            list.add( toEntity( logSmallDTO ) );
        }

        return list;
    }

    @Override
    public List toDto(List entityList) {
        if ( entityList == null ) {
            return null;
        }

        List list = new ArrayList( entityList.size() );
        for ( Log log : entityList ) {
            list.add( toDto( log ) );
        }

        return list;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy