package com.utopiaindustries.dao.ctp;

import com.utopiaindustries.model.ctp.CutPiece;
import org.springframework.jdbc.core.RowMapper;

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

public class CutPieceRowMapper implements RowMapper<CutPiece>{
	public CutPiece mapRow( ResultSet rs, int rowNum ) throws SQLException {
		CutPiece cutPiece = new CutPiece();
		cutPiece.setId( rs.getLong( "id" ) );
		cutPiece.setJobCardItemId( rs.getLong( "job_card_item_id" ) );
		cutPiece.setType( rs.getString( "type" ) );
		cutPiece.setQuantity( rs.getBigDecimal( "quantity" ) );
		return cutPiece;
	}
}