# ProductSpecItemHistoryRowMapper.java

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

    import com.mycim.framework.jdbc.mapper.RowMapper;
    import com.mycim.valueobject.prp.ProductSpecItemHistory;

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

    /**
     * @author Qiansheng.Wang
     * @since 2020-09-23
     */
    public class ProductSpecItemHistoryRowMapper implements RowMapper<ProductSpecItemHistory> {

        private ProductSpecItemHistory productSpecItemHistory;

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

            productSpecItemHistory.setTransRrn(rs.getLong("TRANS_RRN"));
            productSpecItemHistory.setTransId(rs.getString("TRANS_ID"));
            productSpecItemHistory.setTransSequence(rs.getInt("TRANS_SEQ"));
            productSpecItemHistory.setSubTransId(rs.getString("SUB_TRANS_ID"));
            productSpecItemHistory.setTransTimestamp(rs.getTimestamp("TRANS_TIMESTAMP"));
            productSpecItemHistory.setTransPerformedBy(rs.getString("TRANS_PERFORMED_BY"));

            productSpecItemHistory.setProductRrn(rs.getLong("PRODUCT_RRN"));
            productSpecItemHistory.setProcessRrn(rs.getLong("PROCESS_RRN"));
            productSpecItemHistory.setProcessVersion(rs.getInt("PROCESS_VERSION"));

            productSpecItemHistory.setRouteSeq(rs.getString("ROUTE_SEQ"));
            productSpecItemHistory.setRouteRrn(rs.getLong("ROUTE_RRN"));

            productSpecItemHistory.setOperationSeq(rs.getString("OPERATION_SEQ"));
            productSpecItemHistory.setOperationRrn(rs.getLong("OPERATION_RRN"));

            productSpecItemHistory.setFlowSeq(rs.getString("FLOW_SEQ"));
            productSpecItemHistory.setOperationDesc(rs.getString("OPERATION_DESCRIPTION"));
            productSpecItemHistory.setStageId(rs.getString("STAGE_ID"));
            productSpecItemHistory.setRecipeRrn(rs.getLong("RECIPE_RRN"));
            productSpecItemHistory.setParameterSetRrn(rs.getLong("PARAMETER_SET_RRN"));
            productSpecItemHistory.setReticleFamilyRrn(rs.getLong("RETICLE_GROUP_RRN"));
            productSpecItemHistory.setProcessLocation(rs.getString("PROCESS_LOCATION"));
            productSpecItemHistory.setPollutionLevel(rs.getString("ATTRIBUTE_DATA1"));

            productSpecItemHistory.setStatus(rs.getString("STATUS"));
            productSpecItemHistory.setEffectiveTime(rs.getTimestamp("EFFECTIVE_TIME"));
            productSpecItemHistory.setTerminatedTime(rs.getTimestamp("TERMINATED_TIME"));
            productSpecItemHistory.setCreatedUser(rs.getString("CREATED_USER"));
            productSpecItemHistory.setCreatedTime(rs.getTimestamp("CREATED_TIME"));
            productSpecItemHistory.setUpdatedUser(rs.getString("UPDATED_USER"));
            productSpecItemHistory.setUpdatedTime(rs.getTimestamp("UPDATED_TIME"));
            productSpecItemHistory.setEcnRrn(rs.getLong("ECN_RRN"));

            productSpecItemHistory.setBankFlag(rs.getString("ATTRIBUTE_DATA2"));
            productSpecItemHistory.setWorkArea(rs.getString("ATTRIBUTE_DATA3"));
            productSpecItemHistory.setOperationType(rs.getString("ATTRIBUTE_DATA4"));
            productSpecItemHistory.setCpDefine(rs.getString("ATTRIBUTE_DATA5"));

            productSpecItemHistory.setProductId(rs.getString("PRODUCT_ID"));
            productSpecItemHistory.setProductVersion(rs.getInt("PRODUCT_VERSION"));
            productSpecItemHistory.setProcessId(rs.getString("PROCESS_ID"));
            productSpecItemHistory.setRouteId(rs.getString("ROUTE_ID"));
            productSpecItemHistory.setRouteVersion(rs.getInt("ROUTE_VERSION"));
            productSpecItemHistory.setOperationId(rs.getString("OPERATION_ID"));

            productSpecItemHistory.setRecipeId(rs.getString("RECIPE_ID"));
            productSpecItemHistory.setReticleFamilyId(rs.getString("RETICLE_FAMILY_ID"));
            productSpecItemHistory.setParameterSetId(rs.getString("PARAMETER_SET_ID"));
            productSpecItemHistory.setEquipmentGroupRrn(rs.getLong("EQUIPMENT_GROUP_RRN"));
            productSpecItemHistory.setEquipmentGroupId(rs.getString("EQUIPMENT_GROUP_ID"));

            return productSpecItemHistory;
        }

    }