# LotRunCardStepParameterRowMapper.java

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

    import com.mycim.framework.jdbc.mapper.RowMapper;
    import com.mycim.framework.utils.lang.StringUtils;
    import com.mycim.framework.utils.lang.math.NumberUtils;
    import com.mycim.valueobject.wip.LotRunCardStepParameter;

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

    public class LotRunCardStepParameterRowMapper implements RowMapper<LotRunCardStepParameter> {

        LotRunCardStepParameter lotRunCardStepParameter;

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

            lotRunCardStepParameter.setRunCardRrn(rs.getLong("RUN_CARD_RRN"));
            lotRunCardStepParameter.setStepSerialNo(rs.getInt("STEP_SERIAL_NO"));

            lotRunCardStepParameter.setParameterSetRrn(rs.getLong("PARAMETER_SET_RRN"));
            lotRunCardStepParameter.setParameterSetVersion(rs.getInt("PARAMETER_SET_VERSION"));

            lotRunCardStepParameter.setParameterSequence(rs.getInt("PARAMETER_SEQUENCE"));
            lotRunCardStepParameter.setParameterRrn(rs.getLong("PARAMETER_RRN"));
            lotRunCardStepParameter.setParameterId(rs.getString("PARAMETER_ID"));

            lotRunCardStepParameter.setReadingPromptsSize(rs.getInt("READING_PROMPTS_SIZE"));

            String tmpStr = rs.getString("LOWER_CONTROL_LIMIT");
            lotRunCardStepParameter.setLowerControlLimit(StringUtils.isEmpty(tmpStr) ? null : NumberUtils.toDouble(tmpStr));
            tmpStr = rs.getString("UPPER_CONTROL_LIMIT");
            lotRunCardStepParameter.setUpperControlLimit(StringUtils.isEmpty(tmpStr) ? null : NumberUtils.toDouble(tmpStr));
            tmpStr = rs.getString("LOWER_SPECIFICATION_LIMIT");
            lotRunCardStepParameter
                    .setLowerSpecificationLimit(StringUtils.isEmpty(tmpStr) ? null : NumberUtils.toDouble(tmpStr));
            tmpStr = rs.getString("UPPER_SPECIFICATION_LIMIT");
            lotRunCardStepParameter
                    .setUpperSpecificationLimit(StringUtils.isEmpty(tmpStr) ? null : NumberUtils.toDouble(tmpStr));

            return lotRunCardStepParameter;
        }

    }