# PiLotViewHRowMapper.java

    package com.mycim.server.wip.dao.mapper;

    import com.mycim.framework.jdbc.mapper.RowMapper;
    import com.mycim.framework.utils.lang.BooleanUtils;
    import com.mycim.framework.utils.lang.time.DateUtils;
    import com.mycim.valueobject.ems.pilot.dto.PiLotViewHDTO;

    import java.sql.ResultSet;
    import java.sql.SQLException;

    /**
     * @author Qiansheng.Wang
     * @since 2020-01-07
     */
    public class PiLotViewHRowMapper implements RowMapper<PiLotViewHDTO> {

        @Override
        public PiLotViewHDTO mapRow(ResultSet rs, int rowNum) throws SQLException {
            PiLotViewHDTO dto = new PiLotViewHDTO();
            dto.setViewRrn(rs.getLong("view_rrn"));
            dto.setViewId(rs.getString("view_id"));
            dto.setStatus(rs.getString("status"));
            dto.setRetryCount(rs.getInt("retry_count"));
            dto.setBoundLotId(rs.getString("lot_id"));
            dto.setChildLotId(rs.getString("child_lot_id"));
            dto.setComplete(BooleanUtils.toBoolean(Integer.valueOf(rs.getString("FLOW_COMPLETE"))));
            dto.setCanSplit(BooleanUtils.toBoolean(Integer.valueOf(rs.getString("CAN_SPLIT"))));
            dto.setStartRoute(rs.getString("start_route_id"));
            dto.setStartStep(rs.getString("start_step_id"));
            dto.setEndRoute(rs.getString("end_route_id"));
            dto.setEndStep(rs.getString("end_step_id"));
            dto.setTransId(rs.getString("trans_id"));
            dto.setTransRrn(rs.getLong("trans_rrn"));
            dto.setTransUserRrn(rs.getLong("trans_user_rrn"));
            dto.setTransUserId(rs.getString("trans_user_id"));
            dto.setTransTime(rs.getTimestamp("trans_time"));
            dto.setTransTimeStr(DateUtils.formatDate(dto.getTransTime()));
            dto.setSingleLot(rs.getString("SINGLE_LOT"));
            dto.setParallelRunType(rs.getString("PARALLEL_RUN_TYPE"));
            dto.setComments(rs.getString("COMMENTS"));
            return dto;
        }

    }