public static List<FileModel> findFilesToBeModeled(Integer index, Context context) { FileDAO dao = null; try { dao = daoFactory.getFileDAO(context); return dao.findFilesToBeModeled(index, context); } finally { if (dao != null) { dao.close(); } } }
public static List<FileModel> findNotUploadFiles(Integer num, Context context) { FileDAO dao = null; try { dao = daoFactory.getFileDAO(context); return dao.findNotUploadFiles(num, context); } finally { if (dao != null) { dao.close(); } } }
public static FileModel findLastFile(Context context) { FileDAO dao = null; try { dao = daoFactory.getFileDAO(context); return dao.findLastFile(context); } finally { if (dao != null) { dao.close(); } } }
public FileModel save(Context context) { FileDAO dao = null; FileModel file = null; try { dao = daoFactory.getFileDAO(context); file = dao.save(this); } catch (Exception e) { // TODO: handle exception Logger.e(e.getMessage()); } finally { dao.close(); } return file; }