All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.castled.dtomappers.PipelineDTOMapperImpl Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
package io.castled.dtomappers;

import io.castled.dtos.PipelineDTO;
import io.castled.dtos.PipelineDTO.PipelineDTOBuilder;
import io.castled.models.Pipeline;
import javax.annotation.Generated;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2022-04-04T09:53:06+0000",
    comments = "version: 1.3.1.Final, compiler: javac, environment: Java 11.0.14.1 (Eclipse Adoptium)"
)
public class PipelineDTOMapperImpl implements PipelineDTOMapper {

    @Override
    public PipelineDTO toDetailedDTO(Pipeline pipeline) {
        if ( pipeline == null ) {
            return null;
        }

        PipelineDTOBuilder pipelineDTO = PipelineDTO.builder();

        pipelineDTO.app( getAppDetails( pipeline.getAppId() ) );
        pipelineDTO.lastRunDetails( getLastRunDetails( pipeline ) );
        pipelineDTO.sourceQuery( getSourceQuery( pipeline.getModelId() ) );
        pipelineDTO.warehouse( getWarehouseDetails( pipeline.getWarehouseId() ) );
        pipelineDTO.id( pipeline.getId() );
        pipelineDTO.seqId( pipeline.getSeqId() );
        pipelineDTO.teamId( pipeline.getTeamId() );
        pipelineDTO.uuid( pipeline.getUuid() );
        pipelineDTO.name( pipeline.getName() );
        pipelineDTO.jobSchedule( pipeline.getJobSchedule() );
        pipelineDTO.status( pipeline.getStatus() );
        pipelineDTO.syncStatus( pipeline.getSyncStatus() );
        pipelineDTO.appSyncConfig( pipeline.getAppSyncConfig() );
        pipelineDTO.dataMapping( pipeline.getDataMapping() );
        pipelineDTO.queryMode( pipeline.getQueryMode() );

        return pipelineDTO.build();
    }

    @Override
    public PipelineDTO toDTO(Pipeline pipeline) {
        if ( pipeline == null ) {
            return null;
        }

        PipelineDTOBuilder pipelineDTO = PipelineDTO.builder();

        pipelineDTO.app( getAppDetails( pipeline.getAppId() ) );
        pipelineDTO.warehouse( getWarehouseDetails( pipeline.getWarehouseId() ) );
        pipelineDTO.id( pipeline.getId() );
        pipelineDTO.seqId( pipeline.getSeqId() );
        pipelineDTO.teamId( pipeline.getTeamId() );
        pipelineDTO.uuid( pipeline.getUuid() );
        pipelineDTO.name( pipeline.getName() );
        pipelineDTO.jobSchedule( pipeline.getJobSchedule() );
        pipelineDTO.sourceQuery( pipeline.getSourceQuery() );
        pipelineDTO.status( pipeline.getStatus() );
        pipelineDTO.syncStatus( pipeline.getSyncStatus() );
        pipelineDTO.appSyncConfig( pipeline.getAppSyncConfig() );
        pipelineDTO.dataMapping( pipeline.getDataMapping() );
        pipelineDTO.queryMode( pipeline.getQueryMode() );

        return pipelineDTO.build();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy