Guest User

Untitled

a guest
Feb 16th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. package c8service.line;
  2.  
  3. import c8.formats.IDataSourceLine;
  4. import c8.formats.IShape;
  5. import java.util.ArrayList;
  6. import java.util.List;
  7. import javax.annotation.Generated;
  8. import org.springframework.beans.factory.annotation.Autowired;
  9. import org.springframework.stereotype.Component;
  10.  
  11. @Generated(
  12. value = "org.mapstruct.ap.MappingProcessor",
  13. comments = "version: 1.3.0.Final, compiler: javac, environment: Java 10.0.2 (Oracle Corporation)"
  14. )
  15. @Component
  16. public class DataSourceLineMapperImpl implements DataSourceLineMapper {
  17.  
  18. @Autowired
  19. private ShapeMapper shapeMapper;
  20.  
  21. @Override
  22. public DataSourceLineDto toSourceLineDto(IDataSourceLine sourceDataLine) {
  23. if ( sourceDataLine == null ) {
  24. return null;
  25. }
  26.  
  27. DataSourceLineDto dataSourceLineDto = new DataSourceLineDto();
  28.  
  29. dataSourceLineDto.setShapes( iShapeArrayToShapeDtoList( sourceDataLine.getShapes() ) );
  30. dataSourceLineDto.setBoundingBox( sourceDataLine.getBoundingBox() );
  31.  
  32. return dataSourceLineDto;
  33. }
  34.  
  35. protected List<ShapeDto> iShapeArrayToShapeDtoList(IShape[] iShapeArray) {
  36. if ( iShapeArray == null ) {
  37. return null;
  38. }
  39.  
  40. List<ShapeDto> list = new ArrayList<ShapeDto>( iShapeArray.length );
  41. for ( IShape iShape : iShapeArray ) {
  42. list.add( shapeMapper.toSourceLineDto( iShape ) );
  43. }
  44.  
  45. return list;
  46. }
  47. }
Add Comment
Please, Sign In to add comment