private BoundaryCategory getBoundaryCategory( final Boundary zone, final Installment installment, final Long usageId, final Date occupancyDate) { List<BoundaryCategory> categories = new ArrayList<BoundaryCategory>(); categories = persistenceService.findAllByNamedQuery( QUERY_BASERATE_BY_OCCUPANCY_ZONE, zone.getId(), usageId, occupancyDate, installment.getToDate()); LOGGER.debug("baseRentOfUnit - Installment : " + installment); return categories.get(0); }
public String populateLocations() { try { locationList = boundaryService.getChildBoundariesByBoundaryId(Long.valueOf(areaId)); final StringBuilder result = new StringBuilder(); for (final Boundary boundary : locationList) result .append("Text:") .append(boundary.getName()) .append("Value:") .append(boundary.getId()) .append("\n"); returnStream = result.toString(); } catch (final Exception e) { LOGGER.error("populateLocations() - Error while loading locations." + e.getMessage()); addFieldError(CommonAjaxAction.LOCATION, "Unable to load location information"); throw new ApplicationRuntimeException("Unable to load location information", e); } return "AJAX_RESULT"; }