Examples of YearMonth


Examples of org.joda.time.YearMonth

    BigDecimal creditSum, debitSum = null;

    if (!cardNumber.equals(ALL_CARDS)) {
      Integer cardId = bankService.findCardIdByNumber(cardNumber);
      creditSum = bankService.sumResolvedCardAmountByCardIdAndYearMonthAndSign(cardId, new YearMonth(year, month), OperationSign.CREDIT);
      debitSum = bankService.sumResolvedCardAmountByCardIdAndYearMonthAndSign(cardId, new YearMonth(year, month), OperationSign.DEBIT);

    } else {
      Assert.notNull(accountNumber, "if no cardNumber, accountNumber is required");

      Integer accountId = bankService.findAccountIdByNumber(accountNumber);
      creditSum = bankService.sumResolvedCardAmountByAccountIdAndYearMonthAndSign(accountId, new YearMonth(year, month), OperationSign.CREDIT);
      debitSum = bankService.sumResolvedCardAmountByAccountIdAndYearMonthAndSign(accountId, new YearMonth(year, month), OperationSign.DEBIT);
    }

    model.put("creditSum", creditSum);
    model.put("debitSum", debitSum);
View Full Code Here

Examples of org.joda.time.YearMonth

    Page<Operation> operations = null;

    if (!cardNumber.equals(CardOperationsController.ALL_CARDS)) {
      Integer cardId = bankService.findCardIdByNumber(cardNumber);
      operations = bankService.findResolvedCardOperationsByCardIdAndYearMonth(cardId, new YearMonth(year, month), page);

    } else {
      Assert.notNull(accountNumber, "if no cardNumber, accountNumber is required");

      Integer accountId = bankService.findAccountIdByNumber(accountNumber);
      operations = bankService.findResolvedCardOperationsByAccountIdAndYearMonth(accountId, new YearMonth(year, month), page);
    }

    return converter.convert(operations);
  }
View Full Code Here

Examples of org.joda.time.YearMonth

                                                    @RequestParam(defaultValue = "1", value = "page") int page,
                                                    Model model) {

        Pageable pageRequest = PageableFactory.forLists(page);
        Page<Post> result = service.getPublishedPostsByDate(year, month, pageRequest);
        YearMonth yearMonth = new YearMonth(year, month);
        model.addAttribute("title", "Archive for " + yearMonth.toString("MMMM yyyy"));
        return renderListOfPosts(result, model, "All Posts");
    }
View Full Code Here

Examples of org.threeten.bp.YearMonth

        test.withYear(Year.MIN_VALUE - 1);
    }

    @Test(expectedExceptions=DateTimeException.class)
    public void test_withYear_tooHigh() {
        YearMonth test = YearMonth.of(2008, 6);
        test.withYear(Year.MAX_VALUE + 1);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.