# ProductSpecInfoRowMapper.java

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

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

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

    /**
     * @author Qiansheng.Wang
     * @since 2020-10-26
     */
    public class ProductSpecInfoRowMapper implements RowMapper<ProductSpecInfo> {

        private ProductSpecInfo productSpecInfo;

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

            productSpecInfo.setProductRrn(rs.getLong("PRODUCT_RRN"));
            productSpecInfo.setProductId(rs.getString("PRODUCT_ID"));
            productSpecInfo.setProductVersion(rs.getInt("PRODUCT_VERSION"));

            productSpecInfo.setProcessRrn(rs.getLong("PROCESS_RRN"));
            productSpecInfo.setProcessId(rs.getString("PROCESS_ID"));
            productSpecInfo.setProcessVersion(rs.getInt("PROCESS_VERSION"));

            productSpecInfo.setActiveFlag(rs.getBoolean("ACTIVE_FLAG"));
            productSpecInfo.setActiveTime(rs.getTimestamp("ACTIVE_TIME"));
            productSpecInfo.setActiveUser(rs.getString("ACTIVE_USER"));

            productSpecInfo.setCurrentStatus(rs.getString("CURRENT_STATUS"));

            productSpecInfo.setLastUpdatedUser(rs.getString("LAST_UPDATED_USER"));
            productSpecInfo.setLastUpdatedTime(rs.getTimestamp("LAST_UPDATED_TIME"));

            productSpecInfo.setCreateUserId(rs.getString("CREATE_USER_ID"));
            productSpecInfo.setCreateTime(rs.getTimestamp("CREATE_TIME"));

            return productSpecInfo;
        }

    }