Re-populates the #allEntries list from the available databases. Call this after changing one of them.
()
| 75 | |
| 76 | /** Re-populates the {@link #allEntries} list from the available databases. Call this after changing one of them. */ |
| 77 | public static void fillEntries() { |
| 78 | allEntries.clear(); |
| 79 | allEntries.addAll(BCLibDatabase.LOCAL_DB.getAllHeaders()); |
| 80 | if (BCLibDatabase.remoteDB != null) { |
| 81 | for (LibraryEntryHeader header : BCLibDatabase.remoteDB.getAllHeaders()) { |
| 82 | if (!allEntries.contains(header)) { |
| 83 | allEntries.add(header); |
| 84 | } |
| 85 | } |
| 86 | } |
| 87 | allEntries.sort(Comparator.naturalOrder()); |
| 88 | } |
| 89 | |
| 90 | public static EntryStatus getStatus(LibraryEntryHeader header) { |
| 91 | boolean local = LOCAL_DB.getAllHeaders().contains(header); |
no test coverage detected