⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bookrowmapper.java

📁 spring入门 spring入门spri ng入门 spring入门
💻 JAVA
字号:
package de.laliluna.library;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.springframework.jdbc.core.RowMapper;
/**
* rowmapper is used by Spring to read a line from a database table
* and to fill an instance of the class with the values
*/
public class BookRowMapper implements RowMapper {
public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
// I use JDK 5 so I do not have to wrap int with an Integer object
Book book = new Book(rs.getInt("id"), rs.getString("title"),rs.getString("author"),rs.getInt("borrowedby"));
return book;
}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -