@Override public PaymentMethodModelDao getPaymentMethod( final UUID paymentMethodId, final InternalTenantContext context) { synchronized (this) { for (final PaymentMethodModelDao cur : paymentMethods) { if (cur.getId().equals(paymentMethodId)) { return cur; } } return null; } }
@Override public void deletedPaymentMethod(final UUID paymentMethodId, final InternalCallContext context) { synchronized (this) { final Iterator<PaymentMethodModelDao> it = paymentMethods.iterator(); while (it.hasNext()) { final PaymentMethodModelDao cur = it.next(); if (cur.getId().equals(paymentMethodId)) { it.remove(); break; } } } }