# SeasonHRowMapper.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.time.DateUtils;
    import com.mycim.valueobject.ems.SeasonHistory;

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

    public class SeasonHRowMapper implements RowMapper<SeasonHistory> {

        @Override
        public SeasonHistory mapRow(ResultSet rs, int rowNum) throws SQLException {
            SeasonHistory seasonHistory = new SeasonHistory();
            seasonHistory.setSeasonId(rs.getString("SEASON_ID"));
            seasonHistory.setEqptId(rs.getString("EQPT_ID"));
            seasonHistory.setStatus(rs.getString("STATUS"));
            seasonHistory.setSeasonType(rs.getString("SEASON_TYPE"));
            seasonHistory.setSubType(rs.getString("SUBTYPE"));
            seasonHistory.setConstraintRecipeId(rs.getString("CONSTRAINT_RECIPE_ID"));
            seasonHistory.setIdleTime(rs.getDouble("IDLE_HOUR_TIME"));
            seasonHistory.setFromRecipeGroupId(rs.getString("FROM_RECIPE_GROUP_ID"));
            seasonHistory.setToRecipeGroupId(rs.getString("TO_RECIPE_GROUP_ID"));
            seasonHistory.setSeasonProdId(rs.getString("SEASON_PROD_ID"));
            seasonHistory.setSeasonRecipeId(rs.getString("SEASON_RECIPE_ID"));
            seasonHistory.setSeasonWaferCnt(rs.getLong("SEASON_WAFER_COUNT"));
            seasonHistory.setLastCompleteTime(rs.getTimestamp("LAST_COMPLETE_TIME"));
            seasonHistory.setResetComment(rs.getString("RESET_COMMENT"));
            seasonHistory.setMaxRunTime(rs.getDouble("MAX_RUN_TIME"));
            seasonHistory.setTransId(rs.getString("TRANS_ID"));
            seasonHistory.setTransUserId(rs.getString("TRANS_USER_ID"));
            String transTime = DateUtils.formatDate(rs.getTimestamp("TRANS_TIME"));
            seasonHistory.setTransTimeStr(StringUtils.isBlank(transTime) ? StringUtils.EMPTY: transTime);
            return seasonHistory;
        }

    }