package com.qsoft.rs.sincoar.dominio.mapper;

import com.qsoft.rs.sincoar.dto.MgvAllViewsDTO;
import com.qsoft.rs.sincoar.model.MgvAllViews;
import java.math.BigInteger;
import javax.annotation.processing.Generated;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2022-09-02T16:14:50-0500",
    comments = "version: 1.5.2.Final, compiler: javac, environment: Java 17.0.4 (Private Build)"
)
public class MgvAllViewsMapperImpl implements MgvAllViewsMapper {

    @Override
    public MgvAllViews getEntidad(MgvAllViewsDTO mgvAllViews) {
        if ( mgvAllViews == null ) {
            return null;
        }

        MgvAllViews mgvAllViews1 = new MgvAllViews();

        if ( mgvAllViews.getProjectId() != null ) {
            mgvAllViews1.setProjectId( BigInteger.valueOf( mgvAllViews.getProjectId() ) );
        }
        mgvAllViews1.setProjectName( mgvAllViews.getProjectName() );
        if ( mgvAllViews.getConnectionId() != null ) {
            mgvAllViews1.setConnectionId( BigInteger.valueOf( mgvAllViews.getConnectionId() ) );
        }
        mgvAllViews1.setHost( mgvAllViews.getHost() );
        if ( mgvAllViews.getPort() != null ) {
            mgvAllViews1.setPort( BigInteger.valueOf( mgvAllViews.getPort() ) );
        }
        mgvAllViews1.setUsername( mgvAllViews.getUsername() );
        if ( mgvAllViews.getCatalogId() != null ) {
            mgvAllViews1.setCatalogId( BigInteger.valueOf( mgvAllViews.getCatalogId() ) );
        }
        mgvAllViews1.setCatalogName( mgvAllViews.getCatalogName() );
        mgvAllViews1.setDummyFlag( mgvAllViews.getDummyFlag() );
        if ( mgvAllViews.getSchemaId() != null ) {
            mgvAllViews1.setSchemaId( BigInteger.valueOf( mgvAllViews.getSchemaId() ) );
        }
        mgvAllViews1.setSchemaName( mgvAllViews.getSchemaName() );
        if ( mgvAllViews.getViewId() != null ) {
            mgvAllViews1.setViewId( BigInteger.valueOf( mgvAllViews.getViewId() ) );
        }
        mgvAllViews1.setViewName( mgvAllViews.getViewName() );

        return mgvAllViews1;
    }

    @Override
    public MgvAllViewsDTO getDto(MgvAllViews mgvAllViews) {
        if ( mgvAllViews == null ) {
            return null;
        }

        MgvAllViewsDTO mgvAllViewsDTO = new MgvAllViewsDTO();

        if ( mgvAllViews.getProjectId() != null ) {
            mgvAllViewsDTO.setProjectId( mgvAllViews.getProjectId().intValue() );
        }
        mgvAllViewsDTO.setProjectName( mgvAllViews.getProjectName() );
        if ( mgvAllViews.getConnectionId() != null ) {
            mgvAllViewsDTO.setConnectionId( mgvAllViews.getConnectionId().intValue() );
        }
        mgvAllViewsDTO.setHost( mgvAllViews.getHost() );
        if ( mgvAllViews.getPort() != null ) {
            mgvAllViewsDTO.setPort( mgvAllViews.getPort().intValue() );
        }
        mgvAllViewsDTO.setUsername( mgvAllViews.getUsername() );
        if ( mgvAllViews.getCatalogId() != null ) {
            mgvAllViewsDTO.setCatalogId( mgvAllViews.getCatalogId().intValue() );
        }
        mgvAllViewsDTO.setCatalogName( mgvAllViews.getCatalogName() );
        mgvAllViewsDTO.setDummyFlag( mgvAllViews.getDummyFlag() );
        if ( mgvAllViews.getSchemaId() != null ) {
            mgvAllViewsDTO.setSchemaId( mgvAllViews.getSchemaId().intValue() );
        }
        mgvAllViewsDTO.setSchemaName( mgvAllViews.getSchemaName() );
        if ( mgvAllViews.getViewId() != null ) {
            mgvAllViewsDTO.setViewId( mgvAllViews.getViewId().intValue() );
        }
        mgvAllViewsDTO.setViewName( mgvAllViews.getViewName() );

        return mgvAllViewsDTO;
    }
}
