Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private List<EstabelecimentoORM> getListEstabelecimentoORM(){
- List<EstabelecimentoORM> listEstabelecimentoORM = null;
- try {
- final EstabelecimentoDAO estabelecimentoDAO = new EstabelecimentoDAO(dbHelper.getConnectionSource());
- listEstabelecimentoORM = new ArrayList<EstabelecimentoORM>();
- final List<Integer> listIds = new ArrayList<Integer>();
- GenericRawResults<EstabelecimentoORM> list = estabelecimentoDAO.queryRaw(
- "SELECT * FROM responsavel WHERE status = " + Constants.TypeObject.ENVIAR_SERVIDOR,
- new RawRowMapper<EstabelecimentoORM>() {
- @Override
- public EstabelecimentoORM mapRow(String[] columnNames, String[] resp) throws SQLException {
- for(int i = 0 ; i<resp.length ; i++){
- listIds.add(Integer.parseInt(resp[0]));
- }
- return null;
- }
- });
- for(int a: listIds){
- listEstabelecimentoORM.add(estabelecimentoDAO.queryForId(a));
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- return listEstabelecimentoORM;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement