人力资源管理系统。我不确定这是你想要的。但是,完成您具体要求的一种方法是通过使用RawRowMapper
可以传递给ORMLite 的DAO 方法的方法:dao.queryRaw(String, Rowmapper, String...)。
像下面这样的东西应该可以工作:
RawRowMapper<Integer> mapper = new RawRowMapper<Integer>() {
public Integer mapRow(String[] columnNames, String[] resultColumns) {
// maybe you should verify that there _is_ only 1 column here
// maybe you should handle the possibility of a bad number and throw
return Integer.parseInt(resultColumns[0]);
}
};
GenericRawResults<Integer> rawResults =
getHelper().getMyProcessDao().queryRaw(
queryBuild.selectColumns("nid").prepareStatementString(), mapper);
List<Integer> list = rawResults.getResults();