private boolean FindAcceptedPaymentType(
     AcceptedPaymentType acceptedPaymentType, List<AcceptedPaymentType> acceptedPaymentTypes) {
   for (AcceptedPaymentType newAcceptedPaymentType : acceptedPaymentTypes) {
     if ((newAcceptedPaymentType.getTransactionTypeEntity().getTransactionId().shortValue()
             == acceptedPaymentType.getTransactionTypeEntity().getTransactionId().shortValue())
         && (newAcceptedPaymentType.getPaymentTypeEntity().getId().shortValue())
             == acceptedPaymentType.getPaymentTypeEntity().getId().shortValue()) {
       return true;
     }
   }
   return false;
 }
 private boolean IsDeleted(AcceptedPaymentType a, List<AcceptedPaymentType> list) {
   if ((list == null) || (list.size() == 0)) {
     return true;
   }
   for (AcceptedPaymentType type : list) {
     if ((type.getTransactionTypeEntity().getTransactionId().shortValue()
             == a.getTransactionTypeEntity().getTransactionId().shortValue())
         && (type.getPaymentTypeEntity().getId().shortValue()
             == a.getPaymentTypeEntity().getId().shortValue())) {
       return false;
     }
   }
   return true;
 }