@Test public void testRemoveDTOList() throws Exception { KeyStoreOperations ops = new KeyStoreOperations(storage, keySetJsonReader, keySetJsonWriter); List<TestDto> list = new ArrayList<TestDto>(); list.add(new TestDto(1, "Test1")); list.add(new TestDto(2, "Test2")); list.add(new TestDto(3, "Test3")); KeySet keySet = new KeySet(TestDto.class, "user", "UC_LIST"); ops.createList(list, keySet, testDtoJsonWriter); assertEquals(4, storage.getLength()); ops.removeDTOList(keySet); assertEquals(0, storage.getLength()); }
@Override public void removeDTOList(KeyCollection keyCollection) { for (String keyToRemove : keyCollection.getKeys()) { localStorage.removeItem(keyToRemove); } localStorage.removeItem(keyCollection.createKeyCollectionKey()); }
KeyStoreOperations implements IKeyStoreOperations { @Override public void removeDTOList(KeyCollection keyCollection) { for (String keyToRemove : keyCollection.getKeys()) { localStorage.removeItem(keyToRemove); } localStorage.removeItem(keyCollection.createKeyCollectionKey()); } }
KeyStoreOperations implements IKeyStoreOperations { @Override public void removeDTOList(KeyCollection keyCollection) { for (String keyToRemove : keyCollection.getKeys()) { localStorage.removeItem(keyToRemove); } localStorage.removeItem(keyCollection.createKeyCollectionKey()); } KeyStoreOperations(IStorage localStorage, JsonReader<KeySet> keyset_reader,
							  JsonWriter<KeySet> keyset_writer); }
KeyStoreOperations implements IKeyStoreOperations { @Override public void removeDTOList(KeyCollection keyCollection) { for (String keyToRemove : keyCollection.getKeys()) { localStorage.removeItem(keyToRemove); } localStorage.removeItem(keyCollection.createKeyCollectionKey()); } KeyStoreOperations(IStorage localStorage, JsonReader<KeySet> keyset_reader,
							  JsonWriter<KeySet> keyset_writer); @Override List<T> getDTOList(String userID, String useCase, Class<T> forClass, JsonReader<T> jsonReader); @Override List<T> getDTOListAndDeleteIt(String userID, String useCase, Class<T> forClass, JsonReader<T> jsonReader); @Override List<T> getDTOList(KeyCollection keyCollection, JsonReader<T> jsonReader); @Override void removeDTOList(KeyCollection keyCollection); @Override List<T> getDTOListAndDeleteIt(KeyCollection keyCollection, JsonReader<T> jsonReader); @Override void updateDTO(T toUpdate, KeySet keySet, String oid, JsonWriter<T> jsonWriter); @Override void deleteDTO(KeySet keySet, String oidToDelete, JsonWriter<T> jsonWriter); @Override void updateOrCreateDTOList(List<T> toUpdate, KeySet keySet, JsonWriter<T> jsonWriter, List<Long> oids); @Override KeySet loadKeysetFormStoreOrCreateEmptyOne(Class<?> forClass, String uuid, String useCase); @Override void createList(List<T> toUpdate, KeySet keySet, JsonWriter<T> jsonWriter); }
KeyStoreOperations implements IKeyStoreOperations { @Override public void removeDTOList(KeyCollection keyCollection) { for (String keyToRemove : keyCollection.getKeys()) { localStorage.removeItem(keyToRemove); } localStorage.removeItem(keyCollection.createKeyCollectionKey()); } KeyStoreOperations(IStorage localStorage, JsonReader<KeySet> keyset_reader,
							  JsonWriter<KeySet> keyset_writer); @Override List<T> getDTOList(String userID, String useCase, Class<T> forClass, JsonReader<T> jsonReader); @Override List<T> getDTOListAndDeleteIt(String userID, String useCase, Class<T> forClass, JsonReader<T> jsonReader); @Override List<T> getDTOList(KeyCollection keyCollection, JsonReader<T> jsonReader); @Override void removeDTOList(KeyCollection keyCollection); @Override List<T> getDTOListAndDeleteIt(KeyCollection keyCollection, JsonReader<T> jsonReader); @Override void updateDTO(T toUpdate, KeySet keySet, String oid, JsonWriter<T> jsonWriter); @Override void deleteDTO(KeySet keySet, String oidToDelete, JsonWriter<T> jsonWriter); @Override void updateOrCreateDTOList(List<T> toUpdate, KeySet keySet, JsonWriter<T> jsonWriter, List<Long> oids); @Override KeySet loadKeysetFormStoreOrCreateEmptyOne(Class<?> forClass, String uuid, String useCase); @Override void createList(List<T> toUpdate, KeySet keySet, JsonWriter<T> jsonWriter);  }