LocationTypeMapperImpl.java

package org.openwms.common.location;

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

@Generated(
    value = "org.mapstruct.ap.MappingProcessor"
)
@Component
public class LocationTypeMapperImpl extends LocationTypeMapper {

    @Override
    public LocationTypeVO convertToVO(LocationType eo) {
        if ( eo == null ) {
            return null;
        }

        String type = null;

        type = eo.getType();

        LocationTypeVO locationTypeVO = new LocationTypeVO( type );

        if ( eo.hasPersistentKey() ) {
            locationTypeVO.setpKey( eo.getPersistentKey() );
        }
        locationTypeVO.setDescription( eo.getDescription() );
        locationTypeVO.setLength( eo.getLength() );
        locationTypeVO.setWidth( eo.getWidth() );
        locationTypeVO.setHeight( eo.getHeight() );
        locationTypeVO.setCreateDt( eo.getCreateDt() );

        return locationTypeVO;
    }

    @Override
    public List<LocationTypeVO> convertToVO(List<LocationType> eo) {
        if ( eo == null ) {
            return null;
        }

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

        return list;
    }
}