@Override public BookingGroup createGroup(WrappedBooking booking) { if (booking == null) { return null; } if (booking.getRuleIds() != null) { return new BookingGroup(booking.getBankConnection(), booking.getRuleIds().toString(), getGroupName(), getGroupType()); } else if (booking.getAmount() != null) { return new BookingGroup(booking.getBankConnection(), booking.getAmount().toPlainString(), getGroupName(), getGroupType()); } return null; }
@Override public BookingGroup createGroup(WrappedBooking booking) { if (booking == null || booking.getPurpose() == null || booking.getMandateReference() == null || booking.getCreditorId() == null || booking.getRuleIds() == null) { return null; } log.trace("create group for {}, {}", booking.getCreditorId(), booking.getMandateReference()); return new BookingGroup(booking.getCreditorId()+"|"+booking.getMandateReference(), booking.getRuleIds().toString(), getGroupName(), getGroupType()); }
@Override public BookingGroup createGroup(WrappedBooking booking) { if (booking == null) { return null; } if (booking.getRuleIds() != null) { return new BookingGroup(booking.getBankConnection(), booking.getRuleIds().toString(), getGroupName(), getGroupType()); } return new BookingGroup(booking.getBankConnection(), booking.getPurpose(), getGroupName(), getGroupType()); }
if (booking.getRuleIds() == null) { return false;
static BookingCategory mapToBookingcategory(WrappedBooking wrappedBooking) { BookingCategory bookingCategory = new BookingCategory(); bookingCategory.setReceiver(wrappedBooking.getOtherAccount()); bookingCategory.setMainCategory(wrappedBooking.getMainCategory()); bookingCategory.setSubCategory(wrappedBooking.getSubCategory()); bookingCategory.setSpecification(wrappedBooking.getSpecification()); bookingCategory.setCustom(wrappedBooking.getCustom()); bookingCategory.setEmail(wrappedBooking.getEmail()); bookingCategory.setHomepage(wrappedBooking.getHomepage()); bookingCategory.setHotline(wrappedBooking.getHotline()); bookingCategory.setLogo(wrappedBooking.getLogo()); if (wrappedBooking.getCycle() != null) { bookingCategory.setInterval(Cycle.valueOf(wrappedBooking.getCycle().toString())); } bookingCategory.setRules(wrappedBooking.getRuleIds()); return bookingCategory; }
static BookingCategory mapToBookingcategory(WrappedBooking wrappedBooking) { BookingCategory bookingCategory = new BookingCategory(); bookingCategory.setReceiver(wrappedBooking.getOtherAccount()); bookingCategory.setMainCategory(wrappedBooking.getMainCategory()); bookingCategory.setSubCategory(wrappedBooking.getSubCategory()); bookingCategory.setSpecification(wrappedBooking.getSpecification()); bookingCategory.setCustom(wrappedBooking.getCustom()); bookingCategory.setEmail(wrappedBooking.getEmail()); bookingCategory.setHomepage(wrappedBooking.getHomepage()); bookingCategory.setHotline(wrappedBooking.getHotline()); bookingCategory.setLogo(wrappedBooking.getLogo()); if (wrappedBooking.getCycle() != null) { bookingCategory.setInterval(Cycle.valueOf(wrappedBooking.getCycle().toString())); } bookingCategory.setRules(wrappedBooking.getRuleIds()); return bookingCategory; }