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

import com.qsoft.rs.sincoar.dto.TgenenotaccountingdayPKDTO;
import com.qsoft.rs.sincoar.model.TgenenotaccountingdayPK;
import javax.annotation.processing.Generated;

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

    @Override
    public TgenenotaccountingdayPK getEntidad(TgenenotaccountingdayPKDTO tgenenotaccountingdayPK) {
        if ( tgenenotaccountingdayPK == null ) {
            return null;
        }

        TgenenotaccountingdayPK tgenenotaccountingdayPK1 = new TgenenotaccountingdayPK();

        tgenenotaccountingdayPK1.setCatalog( tgenenotaccountingdayPK.getCatalog() );
        if ( tgenenotaccountingdayPK.getDay() != null ) {
            tgenenotaccountingdayPK1.setDay( tgenenotaccountingdayPK.getDay().shortValue() );
        }

        return tgenenotaccountingdayPK1;
    }

    @Override
    public TgenenotaccountingdayPKDTO getDto(TgenenotaccountingdayPK tgenenotaccountingdayPK) {
        if ( tgenenotaccountingdayPK == null ) {
            return null;
        }

        TgenenotaccountingdayPKDTO tgenenotaccountingdayPKDTO = new TgenenotaccountingdayPKDTO();

        tgenenotaccountingdayPKDTO.setCatalog( tgenenotaccountingdayPK.getCatalog() );
        tgenenotaccountingdayPKDTO.setDay( (int) tgenenotaccountingdayPK.getDay() );

        return tgenenotaccountingdayPKDTO;
    }
}
