@Override protected void executeQuery(final ActionContext context, final QueryParameters queryParameters) { final ScheduledPaymentQuery query = (ScheduledPaymentQuery) queryParameters; List<ScheduledPayment> payments = null; if (LoggedUser.isAdministrator()) { query.setSearchType(SearchType.OUTGOING); } if (query.getOwner() instanceof SystemAccountOwner) { payments = scheduledPaymentService.searchSystem(query); } else { payments = scheduledPaymentService.search(query); } context.getRequest().setAttribute("payments", payments); }
public AccountOwner valueOf(final String string) { final Member member = REFERENCE_CONVERTER.valueOf(string); return member == null ? (zeroIsSystem ? SystemAccountOwner.instance() : LoggedUser.accountOwner()) : member; }