Beispiel #1
0
 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();
     }
   }
 }
Beispiel #2
0
 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();
     }
   }
 }
Beispiel #3
0
 public static FileModel findLastFile(Context context) {
   FileDAO dao = null;
   try {
     dao = daoFactory.getFileDAO(context);
     return dao.findLastFile(context);
   } finally {
     if (dao != null) {
       dao.close();
     }
   }
 }
Beispiel #4
0
  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;
  }