コード例 #1
0
 private Holiday buildHolidayFromCurrentHolidayWithRepaymentRule(
     Holiday originalHoliday, RepaymentRuleTypes rule) {
   HolidayPK holidayPK = new HolidayPK((short) 1, originalHoliday.getFromDate().toDate());
   RepaymentRuleEntity repaymentRuleEntity =
       new RepaymentRuleEntity(rule.getValue(), "lookup.value.key");
   try {
     return new HolidayBO(
         holidayPK,
         originalHoliday.getThruDate().toDate(),
         "temporaryHoliday",
         repaymentRuleEntity);
   } catch (ApplicationException e) {
     throw new IllegalStateException("Could not create temporary holiday", e);
   }
 }
コード例 #2
0
  private List<Object[]> getListOfAccountIdsHavingSchedulesWithinAHoliday(
      final String queryName, final Holiday holiday) throws PersistenceException {

    Map<String, Object> parameters = new HashMap<String, Object>();
    parameters.put("HOLIDAY_ID", holiday.getId());
    parameters.put(
        "HOLIDAY_FROM_DATE",
        DateUtils.getLocalDateFromDate(holiday.getFromDate().toDate()).toString());
    parameters.put(
        "HOLIDAY_THRU_DATE",
        DateUtils.getLocalDateFromDate(holiday.getThruDate().toDate()).toString());

    List<Object[]> queryResult = executeNamedQuery(queryName, parameters);
    if (queryResult != null) {
      return queryResult;
    }

    return new ArrayList<Object[]>();
  }