private void sendNotification() { ConfigurationDataManager cdm = ConfigurationDataManager.getInstance(); if (current.getTimeOffStatusid().equals(cdm.getDefaultStatus())) { cdm.updateConfigurationData(); MailUtil.sendNewTimeOffRequestEmail( current.getEmployeeid().getName(), current.getStart(), current.getEnd()); if (!cdm.isAdmin()) { cdm.clearData(); } } }
public List<TimeOff> getActiveTimeOffs() { List<TimeOff> all_items = ejbFacade.findAll(); activeTimeOffs = new ArrayList(); for (TimeOff to : all_items) { if (to.getEmployeeid().getIsActive()) { activeTimeOffs.add(to); } } Collections.sort(activeTimeOffs, Collections.reverseOrder()); return activeTimeOffs; }