# PiLotSetupRowMapper.java

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

    import com.mycim.framework.jdbc.mapper.RowMapper;
    import com.mycim.valueobject.ems.pilot.PiLotSetup;

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

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

        @Override
        public PiLotSetup mapRow(ResultSet rs, int rowNum) throws SQLException {
            PiLotSetup setup = new PiLotSetup();
            setup.setPiLotRrn(rs.getLong("PI_LOT_RRN"));
            setup.setPiLotId(rs.getString("PI_LOT_ID"));
            setup.setType(rs.getString("PI_LOT_TYPE"));
            setup.setStatus(rs.getString("STATUS"));
            setup.setEnableFlag(rs.getString("ENABLE_FLAG"));
            setup.setEqptId(rs.getString("EQPT_ID"));
            setup.setEqptRrn(rs.getLong("EQPT_RRN"));

            setup.setQty(rs.getInt("WAFER_QTY"));
            setup.setRuleId(rs.getString("WAFER_RULE_ID"));
            setup.setRetryCount(rs.getInt("RETRY_COUNT"));
            setup.setBoundLotId(rs.getString("LOT_ID"));
            setup.setBoundLotRrn(rs.getLong("LOT_RRN"));
            setup.setBoundViewRrn(rs.getLong("VIEW_RRN"));

            setup.setCreateTime(rs.getTimestamp("CREATE_TIME"));
            setup.setUpdateTime(rs.getTimestamp("UPDATE_TIME"));
            setup.setCreateUserRrn(rs.getLong("CREATE_USER_RRN"));
            setup.setUpdateUserRrn(rs.getLong("UPDATE_USER_RRN"));
            setup.setVersion(rs.getInt("LOCK_VERSION"));

            setup.setCloseTime(rs.getTimestamp("CLOSE_TIME"));
            setup.setParallelRunType(rs.getString("PARALLEL_RUN_TYPE"));
            setup.setSingleLot(rs.getString("single_lot"));
            return setup;
        }

    }