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

import com.qsoft.rs.sincoar.dto.MdTriggersDTO;
import com.qsoft.rs.sincoar.model.MdTriggers;
import java.math.BigDecimal;
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 MdTriggersMapperImpl implements MdTriggersMapper {

    @Override
    public MdTriggers getEntidad(MdTriggersDTO mdTriggers) {
        if ( mdTriggers == null ) {
            return null;
        }

        MdTriggers mdTriggers1 = new MdTriggers();

        if ( mdTriggers.getId() != null ) {
            mdTriggers1.setId( BigDecimal.valueOf( mdTriggers.getId() ) );
        }
        if ( mdTriggers.getTableOrViewIdFk() != null ) {
            mdTriggers1.setTableOrViewIdFk( BigInteger.valueOf( mdTriggers.getTableOrViewIdFk() ) );
        }
        mdTriggers1.setTriggerOnFlag( mdTriggers.getTriggerOnFlag() );
        mdTriggers1.setTriggerName( mdTriggers.getTriggerName() );
        mdTriggers1.setTriggerTiming( mdTriggers.getTriggerTiming() );
        mdTriggers1.setTriggerOperation( mdTriggers.getTriggerOperation() );
        mdTriggers1.setTriggerEvent( mdTriggers.getTriggerEvent() );
        mdTriggers1.setNativeSql( mdTriggers.getNativeSql() );
        mdTriggers1.setNativeKey( mdTriggers.getNativeKey() );
        mdTriggers1.setLanguage( mdTriggers.getLanguage() );
        mdTriggers1.setComments( mdTriggers.getComments() );
        if ( mdTriggers.getLinecount() != null ) {
            mdTriggers1.setLinecount( BigInteger.valueOf( mdTriggers.getLinecount() ) );
        }
        if ( mdTriggers.getSecurityGroupId() != null ) {
            mdTriggers1.setSecurityGroupId( BigInteger.valueOf( mdTriggers.getSecurityGroupId() ) );
        }
        mdTriggers1.setCreatedOn( mdTriggers.getCreatedOn() );
        mdTriggers1.setCreatedBy( mdTriggers.getCreatedBy() );
        mdTriggers1.setLastUpdatedOn( mdTriggers.getLastUpdatedOn() );
        mdTriggers1.setLastUpdatedBy( mdTriggers.getLastUpdatedBy() );

        return mdTriggers1;
    }

    @Override
    public MdTriggersDTO getDto(MdTriggers mdTriggers) {
        if ( mdTriggers == null ) {
            return null;
        }

        MdTriggersDTO mdTriggersDTO = new MdTriggersDTO();

        if ( mdTriggers.getId() != null ) {
            mdTriggersDTO.setId( mdTriggers.getId().intValue() );
        }
        if ( mdTriggers.getTableOrViewIdFk() != null ) {
            mdTriggersDTO.setTableOrViewIdFk( mdTriggers.getTableOrViewIdFk().intValue() );
        }
        mdTriggersDTO.setTriggerOnFlag( mdTriggers.getTriggerOnFlag() );
        mdTriggersDTO.setTriggerName( mdTriggers.getTriggerName() );
        mdTriggersDTO.setTriggerTiming( mdTriggers.getTriggerTiming() );
        mdTriggersDTO.setTriggerOperation( mdTriggers.getTriggerOperation() );
        mdTriggersDTO.setTriggerEvent( mdTriggers.getTriggerEvent() );
        mdTriggersDTO.setNativeSql( mdTriggers.getNativeSql() );
        mdTriggersDTO.setNativeKey( mdTriggers.getNativeKey() );
        mdTriggersDTO.setLanguage( mdTriggers.getLanguage() );
        mdTriggersDTO.setComments( mdTriggers.getComments() );
        if ( mdTriggers.getLinecount() != null ) {
            mdTriggersDTO.setLinecount( mdTriggers.getLinecount().intValue() );
        }
        if ( mdTriggers.getSecurityGroupId() != null ) {
            mdTriggersDTO.setSecurityGroupId( mdTriggers.getSecurityGroupId().intValue() );
        }
        mdTriggersDTO.setCreatedOn( mdTriggers.getCreatedOn() );
        mdTriggersDTO.setCreatedBy( mdTriggers.getCreatedBy() );
        mdTriggersDTO.setLastUpdatedOn( mdTriggers.getLastUpdatedOn() );
        mdTriggersDTO.setLastUpdatedBy( mdTriggers.getLastUpdatedBy() );

        return mdTriggersDTO;
    }
}
