# LotRunCardRowMapper.java

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

    import com.mycim.framework.jdbc.mapper.RowMapper;
    import com.mycim.valueobject.wip.LotRunCard;

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

    /**
     * @author pinyan.song
     * @version 6.0.0
     * @date 2019-12-25 14:19
     **/
    public class LotRunCardRowMapper implements RowMapper<LotRunCard> {

        private LotRunCard lotRunCard;

        @Override
        public LotRunCard mapRow(ResultSet rs, int rowNum) throws SQLException {
            lotRunCard = new LotRunCard();

            lotRunCard.setRunCardRrn(rs.getLong("RUN_CARD_RRN"));
            lotRunCard.setFacilityRrn(rs.getLong("FACILITY_RRN"));
            lotRunCard.setRunCardType(rs.getString("RUN_CARD_TYPE"));

            lotRunCard.setLotRrn(rs.getLong("LOT_RRN"));
            lotRunCard.setLotStepSequence(rs.getLong("LOT_STEP_SEQUENCE"));
            lotRunCard.setProductRrn(rs.getLong("PRODUCT_RRN"));
            lotRunCard.setProcessRrn(rs.getLong("PROCESS_RRN"));
            lotRunCard.setProcessVersion(rs.getInt("PROCESS_VERSION"));
            lotRunCard.setLotQty(rs.getDouble("LOT_QTY"));
            lotRunCard.setCarrierMapRrn(rs.getLong("CARRIER_MAP_RRN"));
            lotRunCard.setProcessLocation(rs.getString("PROCESS_LOCATION"));
            lotRunCard.setPollutionLevel(rs.getString("POLLUTION_LEVEL"));

            lotRunCard.setSplitFlowSeq(rs.getString("SPLIT_FLOW_SEQ"));
            lotRunCard.setSplitStepPath(rs.getString("SPLIT_STEP_PATH"));
            lotRunCard.setSplitOperationRrn(rs.getLong("SPLIT_OPERATION_RRN"));

            lotRunCard.setMergeFlowSeq(rs.getString("MERGE_FLOW_SEQ"));
            lotRunCard.setMergeStepPath(rs.getString("MERGE_STEP_PATH"));
            lotRunCard.setMergeOperationRrn(rs.getLong("MERGE_OPERATION_RRN"));
            lotRunCard.setMergedPollutionLevel(rs.getString("MERGE_POLLUTION_LEVEL"));
            lotRunCard.setMergedAction(rs.getString("NEXT_ACTION"));

            lotRunCard.setSupervisor(rs.getString("SUPERVISOR"));
            lotRunCard.setRelatedModuleManager(rs.getString("RELATED_MODULE_MANAGER"));
            lotRunCard.setLotOwner(rs.getString("LOT_OWNER"));
            lotRunCard.setE1Manager(rs.getString("E1_MANAGER"));
            lotRunCard.setMfgManager(rs.getString("MFG_MANAGER"));

            lotRunCard.setStatus(rs.getString("STATUS"));
            lotRunCard.setEffectiveTimestamp(rs.getTimestamp("EFFECTIVE_TIME"));
            lotRunCard.setFrozenTimestamp(rs.getTimestamp("FROZEN_TIME"));
            lotRunCard.setActiveTimestamp(rs.getTimestamp("ACTIVE_TIME"));
            lotRunCard.setStartTimestamp(rs.getTimestamp("START_TIME"));
            lotRunCard.setFinishedTimestamp(rs.getTimestamp("FINISHED_TIME"));

            lotRunCard.setCreatedUserId(rs.getString("CREATED_USER"));
            lotRunCard.setCreatedUserGroupId(rs.getString("CREATED_USER_GROUP"));
            lotRunCard.setCreatedTimestamp(rs.getTimestamp("CREATED_TIME"));
            lotRunCard.setLastUpdatedUserId(rs.getString("LAST_UPDATED_USER"));
            lotRunCard.setLastUpdatedTimestamp(rs.getTimestamp("LAST_UPDATED_TIME"));
            lotRunCard.setComments(rs.getString("COMMENTS"));

            lotRunCard.setMergedHoldCode(rs.getString("MERGE_HOLD_CODE"));
            lotRunCard.setMergedHoldReason(rs.getString("MERGE_HOLD_REASON"));

            return lotRunCard;
        }

    }