/** * Saves each object in the provided list to the server in a background thread. This is preferable * to using saveAll, unless your code is already running from a background thread. * * @param objects The objects to save. */ public static void saveAllInBackground(List<? extends AVObject> objects) { _saveAll(false, objects, null); }
/** * Saves each object in the provided list to the server in a background thread. This is preferable * to using saveAll, unless your code is already running from a background thread. * * @param objects The objects to save. * @param callback callback.done(e) is called when the save completes. */ public static void saveAllInBackground(List<? extends AVObject> objects, SaveCallback callback) { _saveAll(false, objects, callback); }
/** * Saves each object in the provided list to the server in a background thread. This is preferable * to using saveAll, unless your code is already running from a background thread. * * @param objects The objects to save. */ public static void saveAllInBackground(List<? extends AVObject> objects) { _saveAll(false, objects, null); }
/** * Saves each object in the provided list to the server in a background thread. This is preferable * to using saveAll, unless your code is already running from a background thread. * * @param objects The objects to save. * @param callback callback.done(e) is called when the save completes. */ public static void saveAllInBackground(List<? extends AVObject> objects, SaveCallback callback) { _saveAll(false, objects, callback); }
/** * Saves each object in the provided list. This is faster than saving each object individually * because it batches the requests. * * @param objects The objects to save. * @throws AVException Throws an exception if the server returns an error or is inaccessible. */ public static void saveAll(List<? extends AVObject> objects) throws AVException { _saveAll(true, objects, new SaveCallback() { @Override public void done(AVException e) { if (e != null) { AVExceptionHolder.add(e); } } @Override protected boolean mustRunOnUIThread() { return false; } }); if (AVExceptionHolder.exists()) { throw AVExceptionHolder.remove(); } }
/** * Saves each object in the provided list. This is faster than saving each object individually * because it batches the requests. * * @param objects The objects to save. * @throws AVException Throws an exception if the server returns an error or is inaccessible. */ public static void saveAll(List<? extends AVObject> objects) throws AVException { _saveAll(true, objects, new SaveCallback() { @Override public void done(AVException e) { if (e != null) { AVExceptionHolder.add(e); } } @Override protected boolean mustRunOnUIThread() { return false; } }); if (AVExceptionHolder.exists()) { throw AVExceptionHolder.remove(); } }