EntityWithServiceImplPaginationAndDTOMapperImpl.java
package io.github.jhipster.sample.service.mapper;
import io.github.jhipster.sample.domain.EntityWithServiceImplPaginationAndDTO;
import io.github.jhipster.sample.service.dto.EntityWithServiceImplPaginationAndDTODTO;
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 EntityWithServiceImplPaginationAndDTOMapperImpl implements EntityWithServiceImplPaginationAndDTOMapper {
@Override
public EntityWithServiceImplPaginationAndDTO toEntity(EntityWithServiceImplPaginationAndDTODTO dto) {
if ( dto == null ) {
return null;
}
EntityWithServiceImplPaginationAndDTO entityWithServiceImplPaginationAndDTO = new EntityWithServiceImplPaginationAndDTO();
entityWithServiceImplPaginationAndDTO.setId( dto.getId() );
entityWithServiceImplPaginationAndDTO.setTheo( dto.getTheo() );
return entityWithServiceImplPaginationAndDTO;
}
@Override
public EntityWithServiceImplPaginationAndDTODTO toDto(EntityWithServiceImplPaginationAndDTO entity) {
if ( entity == null ) {
return null;
}
EntityWithServiceImplPaginationAndDTODTO entityWithServiceImplPaginationAndDTODTO = new EntityWithServiceImplPaginationAndDTODTO();
entityWithServiceImplPaginationAndDTODTO.setId( entity.getId() );
entityWithServiceImplPaginationAndDTODTO.setTheo( entity.getTheo() );
return entityWithServiceImplPaginationAndDTODTO;
}
@Override
public List<EntityWithServiceImplPaginationAndDTO> toEntity(List<EntityWithServiceImplPaginationAndDTODTO> dtoList) {
if ( dtoList == null ) {
return null;
}
List<EntityWithServiceImplPaginationAndDTO> list = new ArrayList<EntityWithServiceImplPaginationAndDTO>( dtoList.size() );
for ( EntityWithServiceImplPaginationAndDTODTO entityWithServiceImplPaginationAndDTODTO : dtoList ) {
list.add( toEntity( entityWithServiceImplPaginationAndDTODTO ) );
}
return list;
}
@Override
public List<EntityWithServiceImplPaginationAndDTODTO> toDto(List<EntityWithServiceImplPaginationAndDTO> entityList) {
if ( entityList == null ) {
return null;
}
List<EntityWithServiceImplPaginationAndDTODTO> list = new ArrayList<EntityWithServiceImplPaginationAndDTODTO>( entityList.size() );
for ( EntityWithServiceImplPaginationAndDTO entityWithServiceImplPaginationAndDTO : entityList ) {
list.add( toDto( entityWithServiceImplPaginationAndDTO ) );
}
return list;
}
}