当前位置: 首页>>代码示例>>Java>>正文


Java ScheduledPaymentQuery.setSearchType方法代码示例

本文整理汇总了Java中nl.strohalm.cyclos.entities.accounts.transactions.ScheduledPaymentQuery.setSearchType方法的典型用法代码示例。如果您正苦于以下问题:Java ScheduledPaymentQuery.setSearchType方法的具体用法?Java ScheduledPaymentQuery.setSearchType怎么用?Java ScheduledPaymentQuery.setSearchType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在nl.strohalm.cyclos.entities.accounts.transactions.ScheduledPaymentQuery的用法示例。


在下文中一共展示了ScheduledPaymentQuery.setSearchType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
 
开发者ID:mateli,项目名称:OpenCyclos,代码行数:21,代码来源:AccountsRestController.java

示例2: executeQuery

import nl.strohalm.cyclos.entities.accounts.transactions.ScheduledPaymentQuery; //导入方法依赖的package包/类
@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);
    }
    payments = scheduledPaymentService.search(query);
    context.getRequest().setAttribute("payments", payments);
}
 
开发者ID:mateli,项目名称:OpenCyclos,代码行数:11,代码来源:SearchScheduledPaymentsAction.java

示例3: 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;
}
 
开发者ID:mateli,项目名称:OpenCyclos,代码行数:11,代码来源:SearchTransactionsAction.java


注:本文中的nl.strohalm.cyclos.entities.accounts.transactions.ScheduledPaymentQuery.setSearchType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。