LocationTypeMapperImpl.java

  1. package org.openwms.common.location;

  2. import java.util.ArrayList;
  3. import java.util.List;
  4. import javax.annotation.processing.Generated;
  5. import org.openwms.common.location.api.LocationTypeVO;
  6. import org.springframework.stereotype.Component;

  7. @Generated(
  8.     value = "org.mapstruct.ap.MappingProcessor"
  9. )
  10. @Component
  11. public class LocationTypeMapperImpl extends LocationTypeMapper {

  12.     @Override
  13.     public LocationTypeVO convertToVO(LocationType eo) {
  14.         if ( eo == null ) {
  15.             return null;
  16.         }

  17.         String type = null;

  18.         type = eo.getType();

  19.         LocationTypeVO locationTypeVO = new LocationTypeVO( type );

  20.         if ( eo.hasPersistentKey() ) {
  21.             locationTypeVO.setpKey( eo.getPersistentKey() );
  22.         }
  23.         locationTypeVO.setDescription( eo.getDescription() );
  24.         locationTypeVO.setLength( eo.getLength() );
  25.         locationTypeVO.setWidth( eo.getWidth() );
  26.         locationTypeVO.setHeight( eo.getHeight() );
  27.         locationTypeVO.setCreateDt( eo.getCreateDt() );

  28.         return locationTypeVO;
  29.     }

  30.     @Override
  31.     public List<LocationTypeVO> convertToVO(List<LocationType> eo) {
  32.         if ( eo == null ) {
  33.             return null;
  34.         }

  35.         List<LocationTypeVO> list = new ArrayList<LocationTypeVO>( eo.size() );
  36.         for ( LocationType locationType : eo ) {
  37.             list.add( convertToVO( locationType ) );
  38.         }

  39.         return list;
  40.     }
  41. }