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

com.eurodyn.qlack.fuse.cm.mapper.VersionAttributeMapperImpl Maven / Gradle / Ivy

There is a newer version: 3.6.8
Show newest version
package com.eurodyn.qlack.fuse.cm.mapper;

import com.eurodyn.qlack.fuse.cm.dto.VersionAttributeDTO;
import com.eurodyn.qlack.fuse.cm.model.VersionAttribute;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Generated;
import org.springframework.stereotype.Component;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2019-11-22T14:00:22+0000",
    comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_222 (Private Build)"
)
@Component
public class VersionAttributeMapperImpl implements VersionAttributeMapper {

    @Override
    public List mapToDTO(List entity) {
        if ( entity == null ) {
            return null;
        }

        List list = new ArrayList( entity.size() );
        for ( VersionAttribute versionAttribute : entity ) {
            list.add( mapToDTO( versionAttribute ) );
        }

        return list;
    }

    @Override
    public VersionAttribute mapToEntity(VersionAttributeDTO dto) {
        if ( dto == null ) {
            return null;
        }

        VersionAttribute versionAttribute = new VersionAttribute();

        versionAttribute.setName( dto.getName() );
        versionAttribute.setValue( dto.getValue() );

        return versionAttribute;
    }

    @Override
    public List mapToEntity(List dto) {
        if ( dto == null ) {
            return null;
        }

        List list = new ArrayList( dto.size() );
        for ( VersionAttributeDTO versionAttributeDTO : dto ) {
            list.add( mapToEntity( versionAttributeDTO ) );
        }

        return list;
    }

    @Override
    public VersionAttributeDTO mapToDTO(VersionAttribute versionAttribute) {
        if ( versionAttribute == null ) {
            return null;
        }

        VersionAttributeDTO versionAttributeDTO = new VersionAttributeDTO();

        versionAttributeDTO.setVersionId( mapVersion( versionAttribute.getVersion() ) );
        versionAttributeDTO.setName( versionAttribute.getName() );
        versionAttributeDTO.setValue( versionAttribute.getValue() );

        return versionAttributeDTO;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy