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

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

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

    @Override
    public MgvAllTableTriggers getEntidad(MgvAllTableTriggersDTO mgvAllTableTriggers) {
        if ( mgvAllTableTriggers == null ) {
            return null;
        }

        MgvAllTableTriggers mgvAllTableTriggers1 = new MgvAllTableTriggers();

        if ( mgvAllTableTriggers.getProjectId() != null ) {
            mgvAllTableTriggers1.setProjectId( BigInteger.valueOf( mgvAllTableTriggers.getProjectId() ) );
        }
        mgvAllTableTriggers1.setProjectName( mgvAllTableTriggers.getProjectName() );
        if ( mgvAllTableTriggers.getConnectionId() != null ) {
            mgvAllTableTriggers1.setConnectionId( BigInteger.valueOf( mgvAllTableTriggers.getConnectionId() ) );
        }
        mgvAllTableTriggers1.setHost( mgvAllTableTriggers.getHost() );
        if ( mgvAllTableTriggers.getPort() != null ) {
            mgvAllTableTriggers1.setPort( BigInteger.valueOf( mgvAllTableTriggers.getPort() ) );
        }
        mgvAllTableTriggers1.setUsername( mgvAllTableTriggers.getUsername() );
        if ( mgvAllTableTriggers.getCatalogId() != null ) {
            mgvAllTableTriggers1.setCatalogId( BigInteger.valueOf( mgvAllTableTriggers.getCatalogId() ) );
        }
        mgvAllTableTriggers1.setCatalogName( mgvAllTableTriggers.getCatalogName() );
        mgvAllTableTriggers1.setDummyFlag( mgvAllTableTriggers.getDummyFlag() );
        if ( mgvAllTableTriggers.getSchemaId() != null ) {
            mgvAllTableTriggers1.setSchemaId( BigInteger.valueOf( mgvAllTableTriggers.getSchemaId() ) );
        }
        mgvAllTableTriggers1.setSchemaName( mgvAllTableTriggers.getSchemaName() );
        if ( mgvAllTableTriggers.getTableId() != null ) {
            mgvAllTableTriggers1.setTableId( BigInteger.valueOf( mgvAllTableTriggers.getTableId() ) );
        }
        mgvAllTableTriggers1.setTableName( mgvAllTableTriggers.getTableName() );
        if ( mgvAllTableTriggers.getTriggerId() != null ) {
            mgvAllTableTriggers1.setTriggerId( BigInteger.valueOf( mgvAllTableTriggers.getTriggerId() ) );
        }
        mgvAllTableTriggers1.setTriggerName( mgvAllTableTriggers.getTriggerName() );

        return mgvAllTableTriggers1;
    }

    @Override
    public MgvAllTableTriggersDTO getDto(MgvAllTableTriggers mgvAllTableTriggers) {
        if ( mgvAllTableTriggers == null ) {
            return null;
        }

        MgvAllTableTriggersDTO mgvAllTableTriggersDTO = new MgvAllTableTriggersDTO();

        if ( mgvAllTableTriggers.getProjectId() != null ) {
            mgvAllTableTriggersDTO.setProjectId( mgvAllTableTriggers.getProjectId().intValue() );
        }
        mgvAllTableTriggersDTO.setProjectName( mgvAllTableTriggers.getProjectName() );
        if ( mgvAllTableTriggers.getConnectionId() != null ) {
            mgvAllTableTriggersDTO.setConnectionId( mgvAllTableTriggers.getConnectionId().intValue() );
        }
        mgvAllTableTriggersDTO.setHost( mgvAllTableTriggers.getHost() );
        if ( mgvAllTableTriggers.getPort() != null ) {
            mgvAllTableTriggersDTO.setPort( mgvAllTableTriggers.getPort().intValue() );
        }
        mgvAllTableTriggersDTO.setUsername( mgvAllTableTriggers.getUsername() );
        if ( mgvAllTableTriggers.getCatalogId() != null ) {
            mgvAllTableTriggersDTO.setCatalogId( mgvAllTableTriggers.getCatalogId().intValue() );
        }
        mgvAllTableTriggersDTO.setCatalogName( mgvAllTableTriggers.getCatalogName() );
        mgvAllTableTriggersDTO.setDummyFlag( mgvAllTableTriggers.getDummyFlag() );
        if ( mgvAllTableTriggers.getSchemaId() != null ) {
            mgvAllTableTriggersDTO.setSchemaId( mgvAllTableTriggers.getSchemaId().intValue() );
        }
        mgvAllTableTriggersDTO.setSchemaName( mgvAllTableTriggers.getSchemaName() );
        if ( mgvAllTableTriggers.getTableId() != null ) {
            mgvAllTableTriggersDTO.setTableId( mgvAllTableTriggers.getTableId().intValue() );
        }
        mgvAllTableTriggersDTO.setTableName( mgvAllTableTriggers.getTableName() );
        if ( mgvAllTableTriggers.getTriggerId() != null ) {
            mgvAllTableTriggersDTO.setTriggerId( mgvAllTableTriggers.getTriggerId().intValue() );
        }
        mgvAllTableTriggersDTO.setTriggerName( mgvAllTableTriggers.getTriggerName() );

        return mgvAllTableTriggersDTO;
    }
}
