com.star.jdbc.BeanListHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common Show documentation
Show all versions of common Show documentation
some utility class for java develop
The newest version!
package com.star.jdbc;
import java.sql.ResultSet;
import java.util.List;
/**
* rs转为pojo
*
* 借鉴dbutils
*
* @author starhq
*/
public class BeanListHandler implements RsHandler> {
/**
* 要转的类型
*/
private transient final Class type;
/**
* 解析器
*/
private transient final BeanProcessor processor = new BeanProcessor();
/**
* 构造方法
*/
public BeanListHandler(final Class type) {
super();
this.type = type;
}
/**
* result转换
*/
@Override
public List handle(final ResultSet resultSet) {
return processor.toBeanList(resultSet, type);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy