use of org.xutils.ex.DbException in project xUtils3 by wyouflf.
the class Selector method findAll.
public List<T> findAll() throws DbException {
if (!table.tableIsExist())
return null;
List<T> result = null;
Cursor cursor = table.getDb().execQuery(this.toString());
if (cursor != null) {
try {
result = new ArrayList<T>();
while (cursor.moveToNext()) {
T entity = CursorUtils.getEntity(table, cursor);
result.add(entity);
}
} catch (Throwable e) {
throw new DbException(e);
} finally {
IOUtil.closeQuietly(cursor);
}
}
return result;
}
Aggregations