# PiLotViewRowMapper.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.valueobject.ems.pilot.PiLotView;

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

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

        @Override
        public PiLotView mapRow(ResultSet rs, int rowNum) throws SQLException {
            PiLotView piLotView = new PiLotView();
            piLotView.setViewRrn(rs.getLong("VIEW_RRN"));
            piLotView.setViewId(rs.getString("VIEW_ID"));
            piLotView.setPiLotRrn(rs.getLong("PI_LOT_RRN"));
            piLotView.setPiLotId(rs.getString("PI_LOT_ID"));
            piLotView.setType(rs.getString("PI_LOT_TYPE"));
            piLotView.setStatus(rs.getString("STATUS"));
            piLotView.setEqptId(rs.getString("EQPT_ID"));
            piLotView.setEqptRrn(rs.getLong("EQPT_RRN"));
            piLotView.setBoundLotId(rs.getString("LOT_ID"));
            piLotView.setBoundLotRrn(rs.getLong("LOT_RRN"));
            piLotView.setChildLotId(rs.getString("CHILD_LOT_ID"));
            piLotView.setChildLotRrn(rs.getLong("CHILD_LOT_RRN"));
            piLotView.setQty(rs.getInt("WAFER_QTY"));
            piLotView.setRetryCount(rs.getInt("RETRY_COUNT"));
            piLotView.setComplete(BooleanUtils.toBoolean(Integer.valueOf(rs.getString("FLOW_COMPLETE"))));
            piLotView.setCanSplit(BooleanUtils.toBoolean(Integer.valueOf(rs.getString("CAN_SPLIT"))));

            piLotView.setStartRoute(rs.getString("start_route_id"));
            piLotView.setStartRouteRrn(rs.getLong("start_route_rrn"));
            piLotView.setStartStep(rs.getString("start_step_id"));
            piLotView.setStartStepRrn(rs.getLong("start_step_rrn"));
            piLotView.setEndRoute(rs.getString("end_route_id"));
            piLotView.setEndRouteRrn(rs.getLong("end_route_rrn"));
            piLotView.setEndStep(rs.getString("end_step_id"));
            piLotView.setEndStepRrn(rs.getLong("end_step_rrn"));

            piLotView.setCreateTime(rs.getTimestamp("CREATE_TIME"));
            piLotView.setUpdateTime(rs.getTimestamp("UPDATE_TIME"));
            piLotView.setCreateUserRrn(rs.getLong("CREATE_USER_RRN"));
            piLotView.setUpdateUserRrn(rs.getLong("UPDATE_USER_RRN"));
            piLotView.setVersion(rs.getInt("LOCK_VERSION"));
            piLotView.setSingleLot(rs.getString("single_lot"));
            piLotView.setParallelRunType(rs.getString("PARALLEL_RUN_TYPE"));
            return piLotView;
        }

    }