package com.utopiaindustries.dao.ctp;

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

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

public class UserInventoryAccountRowMapper implements RowMapper<UserInventoryAccount> {

    @Override
    public UserInventoryAccount mapRow(ResultSet resultSet, int i) throws SQLException {
        UserInventoryAccount userInventoryAccount = new UserInventoryAccount();
        userInventoryAccount.setUsername( resultSet.getString("username") );
        userInventoryAccount.setAccountId( resultSet.getInt("account_id" ) );
        return userInventoryAccount;
    }
}
