@Test public void contains() { assertFalse(propagationByResource.contains(ResourceOperation.CREATE, KEY)); assertFalse(propagationByResource.contains(ResourceOperation.UPDATE, KEY)); assertFalse(propagationByResource.contains(ResourceOperation.DELETE, KEY)); assertFalse(propagationByResource.contains(ResourceOperation.NONE, KEY)); Set<String> matchingList = new HashSet<>(); matchingList.add(KEY); assertFalse(propagationByResource.contains(KEY)); ReflectionTestUtils.setField(propagationByResource, "toBeDeleted", matchingList); assertTrue(propagationByResource.contains(KEY)); }
public boolean contains(final ResourceOperation type, final T key) { boolean result = false; switch (type) { case CREATE: result = toBeCreated.contains(key); break; case UPDATE: result = toBeUpdated.contains(key); break; case DELETE: result = toBeDeleted.contains(key); break; default: } return result; }
PropagationByResource implements Serializable { public boolean contains(final ResourceOperation type, final T key) { boolean result = false; switch (type) { case CREATE: result = toBeCreated.contains(key); break; case UPDATE: result = toBeUpdated.contains(key); break; case DELETE: result = toBeDeleted.contains(key); break; default: } return result; } }
PropagationByResource implements Serializable { public boolean contains(final ResourceOperation type, final T key) { boolean result = false; switch (type) { case CREATE: result = toBeCreated.contains(key); break; case UPDATE: result = toBeUpdated.contains(key); break; case DELETE: result = toBeDeleted.contains(key); break; default: } return result; } PropagationByResource(); }
PropagationByResource implements Serializable { public boolean contains(final ResourceOperation type, final T key) { boolean result = false; switch (type) { case CREATE: result = toBeCreated.contains(key); break; case UPDATE: result = toBeUpdated.contains(key); break; case DELETE: result = toBeDeleted.contains(key); break; default: } return result; } PropagationByResource(); final void purge(); final boolean add(final ResourceOperation type, final T key); boolean addAll(final ResourceOperation type, final Collection<T> keys); final boolean remove(final ResourceOperation type, final T key); boolean removeAll(final ResourceOperation type, final Set<T> keys); boolean removeAll(final Collection<T> keys); boolean retainAll(final Collection<T> keys); boolean contains(final ResourceOperation type, final T key); boolean contains(final T key); final Set<T> get(final ResourceOperation type); Map<T, ResourceOperation> asMap(); final void set(final ResourceOperation type, final Collection<T> keys); final void merge(final PropagationByResource<T> propByRes); void clear(); final boolean isEmpty(); Map<String, String> getOldConnObjectKeys(); String getOldConnObjectKey(final String resourceKey); void addOldConnObjectKey(final String resourceKey, final String oldConnObjectKey); @Override String toString(); }
PropagationByResource implements Serializable { public boolean contains(final ResourceOperation type, final T key) { boolean result = false; switch (type) { case CREATE: result = toBeCreated.contains(key); break; case UPDATE: result = toBeUpdated.contains(key); break; case DELETE: result = toBeDeleted.contains(key); break; default: } return result; } PropagationByResource(); final void purge(); final boolean add(final ResourceOperation type, final T key); boolean addAll(final ResourceOperation type, final Collection<T> keys); final boolean remove(final ResourceOperation type, final T key); boolean removeAll(final ResourceOperation type, final Set<T> keys); boolean removeAll(final Collection<T> keys); boolean retainAll(final Collection<T> keys); boolean contains(final ResourceOperation type, final T key); boolean contains(final T key); final Set<T> get(final ResourceOperation type); Map<T, ResourceOperation> asMap(); final void set(final ResourceOperation type, final Collection<T> keys); final void merge(final PropagationByResource<T> propByRes); void clear(); final boolean isEmpty(); Map<String, String> getOldConnObjectKeys(); String getOldConnObjectKey(final String resourceKey); void addOldConnObjectKey(final String resourceKey, final String oldConnObjectKey); @Override String toString();  }