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

com.arextest.web.model.mapper.FSTraceLogMapperImpl Maven / Gradle / Ivy

The newest version!
package com.arextest.web.model.mapper;

import com.arextest.web.model.dao.mongodb.FSTraceLogCollection;
import com.arextest.web.model.dto.filesystem.FSTraceLogDto;
import com.fasterxml.jackson.core.JsonProcessingException;
import javax.annotation.Generated;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2024-09-26T09:42:05+0000",
    comments = "version: 1.5.5.Final, compiler: javac, environment: Java 11.0.24 (Eclipse Adoptium)"
)
public class FSTraceLogMapperImpl implements FSTraceLogMapper {

    @Override
    public FSTraceLogCollection daoFromDto(FSTraceLogDto dto) {
        if ( dto == null ) {
            return null;
        }

        FSTraceLogCollection fSTraceLogCollection = new FSTraceLogCollection();

        fSTraceLogCollection.setId( dto.getId() );
        fSTraceLogCollection.setDataChangeCreateTime( dto.getDataChangeCreateTime() );
        fSTraceLogCollection.setTraceType( dto.getTraceType() );
        fSTraceLogCollection.setUserName( dto.getUserName() );
        fSTraceLogCollection.setWorkspaceId( dto.getWorkspaceId() );
        fSTraceLogCollection.setInfoId( dto.getInfoId() );
        fSTraceLogCollection.setParentId( dto.getParentId() );
        fSTraceLogCollection.setNode( map( dto.getNode() ) );
        try {
            fSTraceLogCollection.setItems( map( dto.getItems() ) );
        }
        catch ( JsonProcessingException e ) {
            throw new RuntimeException( e );
        }

        return fSTraceLogCollection;
    }

    @Override
    public FSTraceLogDto dtoFromDao(FSTraceLogCollection dao) {
        if ( dao == null ) {
            return null;
        }

        FSTraceLogDto fSTraceLogDto = new FSTraceLogDto();

        fSTraceLogDto.setId( dao.getId() );
        fSTraceLogDto.setTraceType( dao.getTraceType() );
        fSTraceLogDto.setUserName( dao.getUserName() );
        fSTraceLogDto.setWorkspaceId( dao.getWorkspaceId() );
        fSTraceLogDto.setInfoId( dao.getInfoId() );
        fSTraceLogDto.setParentId( dao.getParentId() );
        fSTraceLogDto.setNode( mapNode( dao.getNode() ) );
        try {
            fSTraceLogDto.setItems( mapItems( dao.getItems() ) );
        }
        catch ( JsonProcessingException e ) {
            throw new RuntimeException( e );
        }
        if ( dao.getDataChangeCreateTime() != null ) {
            fSTraceLogDto.setDataChangeCreateTime( dao.getDataChangeCreateTime() );
        }

        return fSTraceLogDto;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy