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

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

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

    @Override
    public MgvAllViewTriggers getEntidad(MgvAllViewTriggersDTO mgvAllViewTriggers) {
        if ( mgvAllViewTriggers == null ) {
            return null;
        }

        MgvAllViewTriggers mgvAllViewTriggers1 = new MgvAllViewTriggers();

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

        return mgvAllViewTriggers1;
    }

    @Override
    public MgvAllViewTriggersDTO getDto(MgvAllViewTriggers mgvAllViewTriggers) {
        if ( mgvAllViewTriggers == null ) {
            return null;
        }

        MgvAllViewTriggersDTO mgvAllViewTriggersDTO = new MgvAllViewTriggersDTO();

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

        return mgvAllViewTriggersDTO;
    }
}
