ResistEqptMappingRowMapper.java

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

import com.mycim.framework.jdbc.mapper.RowMapper;
import com.mycim.framework.utils.lang.time.DateUtils;
import com.mycim.valueobject.ems.ResistEqptMapping;

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

public class ResistEqptMappingRowMapper implements RowMapper<ResistEqptMapping> {

    @Override
    public ResistEqptMapping mapRow(ResultSet rs, int rowNum) throws SQLException {
        ResistEqptMapping mapping = new ResistEqptMapping();
        mapping.setResistNo(rs.getString("RESIST_NO"));
        mapping.setEqptId(rs.getString("EQPTID"));
        mapping.setPrPipe(rs.getString("PRPIPE"));
        mapping.setUnit(rs.getString("UNIT"));
        mapping.setCreateBy(rs.getString("CREATE_BY"));
        mapping.setCreateTime(DateUtils.parse(rs.getString("CREATE_TIME"), DateUtils.DATE_FORMAT4DATE));
        mapping.setModifyBy(rs.getString("MODIFY_BY"));
        mapping.setModifyTime(DateUtils.parse(rs.getString("MODIFY_TIME"), DateUtils.DATE_FORMAT4DATE));
        mapping.setResistEqptBarcode(rs.getString("RESIST_EQPT_BARCODE"));
        return mapping;
    }

}