CountTypeRowMapper.java

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

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

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


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

    @Override
    public CountType mapRow(ResultSet rs, int rowNum) throws SQLException {
        CountType countType = new CountType();
        countType.setType(rs.getString("COUNT_TYPE"));
        countType.setCountSpec(rs.getInt("COUNT_SPEC"));
        countType.setTimePoint(rs.getTimestamp("TIME_POINT"));
        countType.setTriggerRcpRrn(rs.getLong("TRIGGER_RECIPE_RRN"));
        countType.setTriggerRcpId(rs.getString("TRIGGER_RECIPE_ID"));
        countType.setConstraintRcpRrn(rs.getLong("CONSTRAINT_RECIPE_RRN"));
        countType.setConstraintRcpId(rs.getString("CONSTRAINT_RECIPE_ID"));
        return countType;
    }

}