int onDeleteAll(Class<?> modelClass, String... conditions) { BaseUtility.checkConditionsCorrect(conditions); analyzeAssociations(modelClass); int rowsAffected = deleteAllCascade(modelClass, conditions); rowsAffected += mDatabase.delete( getTableName(modelClass), getWhereClause(conditions), getWhereArgs(conditions)); getForeignKeyTableToDelete().clear(); return rowsAffected; }
/** * The open interface for other classes in CRUD package to delete multiple rows. Using tableName * to decide which table to delete from, and conditions representing the WHERE part of an SQL * statement. * * @param tableName Which table to delete from. * @param conditions A string array representing the WHERE part of an SQL statement. * @return The number of rows affected. */ int onDeleteAll(String tableName, String... conditions) { BaseUtility.checkConditionsCorrect(conditions); return mDatabase.delete(tableName, getWhereClause(conditions), getWhereArgs(conditions)); }