EntityWithServiceClassPaginationAndDTOMapperImpl.java

package io.github.jhipster.sample.service.mapper;

import io.github.jhipster.sample.domain.EntityWithServiceClassPaginationAndDTO;
import io.github.jhipster.sample.service.dto.EntityWithServiceClassPaginationAndDTODTO;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Generated;
import org.springframework.stereotype.Component;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2017-12-14T19:40:11+0000",
    comments = "version: 1.2.0.Final, compiler: javac, environment: Java 1.8.0_151 (Oracle Corporation)"
)
@Component
public class EntityWithServiceClassPaginationAndDTOMapperImpl implements EntityWithServiceClassPaginationAndDTOMapper {

    @Override
    public EntityWithServiceClassPaginationAndDTO toEntity(EntityWithServiceClassPaginationAndDTODTO dto) {
        if ( dto == null ) {
            return null;
        }

        EntityWithServiceClassPaginationAndDTO entityWithServiceClassPaginationAndDTO = new EntityWithServiceClassPaginationAndDTO();

        entityWithServiceClassPaginationAndDTO.setId( dto.getId() );
        entityWithServiceClassPaginationAndDTO.setLena( dto.getLena() );

        return entityWithServiceClassPaginationAndDTO;
    }

    @Override
    public EntityWithServiceClassPaginationAndDTODTO toDto(EntityWithServiceClassPaginationAndDTO entity) {
        if ( entity == null ) {
            return null;
        }

        EntityWithServiceClassPaginationAndDTODTO entityWithServiceClassPaginationAndDTODTO = new EntityWithServiceClassPaginationAndDTODTO();

        entityWithServiceClassPaginationAndDTODTO.setId( entity.getId() );
        entityWithServiceClassPaginationAndDTODTO.setLena( entity.getLena() );

        return entityWithServiceClassPaginationAndDTODTO;
    }

    @Override
    public List<EntityWithServiceClassPaginationAndDTO> toEntity(List<EntityWithServiceClassPaginationAndDTODTO> dtoList) {
        if ( dtoList == null ) {
            return null;
        }

        List<EntityWithServiceClassPaginationAndDTO> list = new ArrayList<EntityWithServiceClassPaginationAndDTO>( dtoList.size() );
        for ( EntityWithServiceClassPaginationAndDTODTO entityWithServiceClassPaginationAndDTODTO : dtoList ) {
            list.add( toEntity( entityWithServiceClassPaginationAndDTODTO ) );
        }

        return list;
    }

    @Override
    public List<EntityWithServiceClassPaginationAndDTODTO> toDto(List<EntityWithServiceClassPaginationAndDTO> entityList) {
        if ( entityList == null ) {
            return null;
        }

        List<EntityWithServiceClassPaginationAndDTODTO> list = new ArrayList<EntityWithServiceClassPaginationAndDTODTO>( entityList.size() );
        for ( EntityWithServiceClassPaginationAndDTO entityWithServiceClassPaginationAndDTO : entityList ) {
            list.add( toDto( entityWithServiceClassPaginationAndDTO ) );
        }

        return list;
    }
}