# IdleTypeRowMapper.java

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

    import com.mycim.framework.jdbc.mapper.RowMapper;
    import com.mycim.valueobject.ems.pilot.IdleType;

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

    /**
     * @author Qiansheng.Wang
     * @since 2020-01-07
     */
    public class IdleTypeRowMapper implements RowMapper<IdleType> {

        @Override
        public IdleType mapRow(ResultSet rs, int rowNum) throws SQLException {
            IdleType idleType = new IdleType();
            idleType.setMaxRunTime(rs.getDouble("MAX_RUN_TIME"));
            idleType.setIdleTime(rs.getDouble("IDLE_TIME"));
            idleType.setResetComment(rs.getString("RESET_COMMENT"));
            idleType.setSubType(rs.getString("SUB_TYPE"));
            return idleType;
        }

    }