# ProductSpecItemRowMapper.java

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

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

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

    /**
     * @author Qiansheng.Wang
     * @since 2020-09-07
     */
    public class ProductSpecItemRowMapper implements RowMapper<ProductSpecItem> {

        private ProductSpecItem productSpecItem;

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

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

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

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

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

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

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

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

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

            return productSpecItem;
        }

    }