Пример #1
0
 @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;
   }
 }
Пример #2
0
 @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;
       }
     }
   }
 }