package com.novoda.downloadmanager;

import android.arch.persistence.room.Database;
import android.arch.persistence.room.Room;
import android.arch.persistence.room.RoomDatabase;
import android.content.Context;

import java.util.ArrayList;
import java.util.List;

@Database(entities = {RoomBatch.class, RoomFile.class}, version = 1)
abstract class RoomAppDatabase extends RoomDatabase {

    private static RoomAppDatabase SINGLE_INSTANCE;

    abstract RoomBatchDao roomBatchDao();

    abstract RoomFileDao roomFileDao();

    List<String> fileNames() {
        List<RoomFile> roomFiles = roomFileDao().loadAllFiles();
        List<String> fileNames = new ArrayList<>();

        for (RoomFile roomFile : roomFiles) {
            fileNames.add(roomFile.name);
        }
        return fileNames;
    }

    static RoomAppDatabase obtainInstance(Context context) {
        if (SINGLE_INSTANCE == null) {
            SINGLE_INSTANCE = newInstance(context);
        }
        return SINGLE_INSTANCE;
    }

    private static RoomAppDatabase newInstance(Context context) {
        return Room.databaseBuilder(
                context.getApplicationContext(),
                RoomAppDatabase.class,
                "database-litedownloadmanager"
        ).build();
    }
}

@@ -208,60 +208,8 @@
 t;%0A%0A
-import java.util.ArrayList;%0Aimport java.util.List;%0A%0A
 @Dat
@@ -469,288 +469,8 @@
 );%0A%0A
-    List%3CString%3E fileNames() %7B%0A        List%3CRoomFile%3E roomFiles = roomFileDao().loadAllFiles();%0A        List%3CString%3E fileNames = new ArrayList%3C%3E();%0A%0A        for (RoomFile roomFile : roomFiles) %7B%0A            fileNames.add(roomFile.name);%0A        %7D%0A        return fileNames;%0A    %7D%0A%0A
     

Remove unused fileNames method