package org.artgasmator.data.rowmapper;

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

import org.artgasmator.model.AlbumGenre;
import org.springframework.jdbc.core.RowMapper;

public class AlbumGenreRowMapper implements RowMapper<AlbumGenre> {

	public AlbumGenre mapRow(ResultSet rs, int rowIndex) throws SQLException {
		AlbumGenre albumGenre = new AlbumGenre();
		albumGenre.setGenreId(rs.getInt(1));
		albumGenre.setGenreName(rs.getString(2));
		albumGenre.setGenreDescription(rs.getString(3));
		return albumGenre;
	}

}
