本文整理汇总了Java中nl.strohalm.cyclos.entities.accounts.transactions.ScheduledPaymentQuery.setPeriod方法的典型用法代码示例。如果您正苦于以下问题:Java ScheduledPaymentQuery.setPeriod方法的具体用法?Java ScheduledPaymentQuery.setPeriod怎么用?Java ScheduledPaymentQuery.setPeriod使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nl.strohalm.cyclos.entities.accounts.transactions.ScheduledPaymentQuery
的用法示例。
在下文中一共展示了ScheduledPaymentQuery.setPeriod方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: searchScheduledPayments
import nl.strohalm.cyclos.entities.accounts.transactions.ScheduledPaymentQuery; //导入方法依赖的package包/类
private ScheduledPaymentsResultPage searchScheduledPayments(final MemberAccount account, final SearchScheduledPaymentParams params) {
Member member = memberService.loadByIdOrPrincipal(params.getMemberId(), null, params.getMemberPrincipal());
// Convert the params to a TransferQuery
ScheduledPaymentQuery query = new ScheduledPaymentQuery();
queryHelper.fill(params, query);
query.setOwner(account.getOwner());
query.setMember(member);
query.setPeriod(Period.between(params.getBeginDate(), params.getEndDate()));
query.setSearchType(params.getIncoming() ? SearchType.INCOMING : SearchType.OUTGOING);
if (params.getStatus() == null) {
query.setStatusGroup(StatusGroup.OPEN);
} else {
query.setStatusGroup(StatusGroup.valueOf(params.getStatus().name()));
}
// Execute the search
List<ScheduledPayment> scheduledPayments = scheduledPaymentService.search(query);
return toScheduledResultPage(scheduledPayments);
}
示例2: listScheduledPayments
import nl.strohalm.cyclos.entities.accounts.transactions.ScheduledPaymentQuery; //导入方法依赖的package包/类
public static List<Entry> listScheduledPayments(final ScheduledPaymentService scheduledPaymentService, final Member owner, final Calendar date) {
final ScheduledPaymentQuery schedQuery = new ScheduledPaymentQuery();
schedQuery.setIterateAll();
schedQuery.setOwner(owner);
schedQuery.setSearchType(SearchType.INCOMING);
schedQuery.setPeriod(Period.day(date));
final List<ScheduledPayment> scheduledPayments = scheduledPaymentService.search(schedQuery);
final TransformedIteratorList<ScheduledPayment, Entry> scheduledPaymentEntries = new TransformedIteratorList<ScheduledPayment, Entry>(new TransformPaymentToEntry<ScheduledPayment>(owner), scheduledPayments);
return scheduledPaymentEntries;
}