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

import com.qsoft.rs.sincoar.dto.TgenetransactionpagesPKDTO;
import com.qsoft.rs.sincoar.model.TgenetransactionpagesPK;
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 TgenetransactionpagesPKMapperImpl implements TgenetransactionpagesPKMapper {

    @Override
    public TgenetransactionpagesPK getEntidad(TgenetransactionpagesPKDTO tgenetransactionpagesPK) {
        if ( tgenetransactionpagesPK == null ) {
            return null;
        }

        TgenetransactionpagesPK tgenetransactionpagesPK1 = new TgenetransactionpagesPK();

        tgenetransactionpagesPK1.setTransactionmodule( tgenetransactionpagesPK.getTransactionmodule() );
        if ( tgenetransactionpagesPK.getTransactioncode() != null ) {
            tgenetransactionpagesPK1.setTransactioncode( tgenetransactionpagesPK.getTransactioncode().shortValue() );
        }
        if ( tgenetransactionpagesPK.getTransactionversion() != null ) {
            tgenetransactionpagesPK1.setTransactionversion( tgenetransactionpagesPK.getTransactionversion().shortValue() );
        }
        if ( tgenetransactionpagesPK.getSequence() != null ) {
            tgenetransactionpagesPK1.setSequence( tgenetransactionpagesPK.getSequence().shortValue() );
        }

        return tgenetransactionpagesPK1;
    }

    @Override
    public TgenetransactionpagesPKDTO getDto(TgenetransactionpagesPK tgenetransactionpagesPK) {
        if ( tgenetransactionpagesPK == null ) {
            return null;
        }

        TgenetransactionpagesPKDTO tgenetransactionpagesPKDTO = new TgenetransactionpagesPKDTO();

        tgenetransactionpagesPKDTO.setTransactionmodule( tgenetransactionpagesPK.getTransactionmodule() );
        tgenetransactionpagesPKDTO.setTransactioncode( (int) tgenetransactionpagesPK.getTransactioncode() );
        tgenetransactionpagesPKDTO.setTransactionversion( (int) tgenetransactionpagesPK.getTransactionversion() );
        tgenetransactionpagesPKDTO.setSequence( (int) tgenetransactionpagesPK.getSequence() );

        return tgenetransactionpagesPKDTO;
    }
}
