return numReports <= amount;
}
@Override
public long storeEmployee(EmployeeDTO employee) {
Employee e = new Employee();
e.setDepartment(employee.department);
e.setDisplayName(employee.displayName);
e.setPassword(employee.password);
e.setSupervisorKey(employee.supervisorKey);
e.setUserName(employee.userName);
e.persist();
return e.getId();
}
@Override
public long storeExpense(ExpenseDTO expense) {
Expense e = new Expense();
e.setReportId(expense.reportId);
e.setDescription(expense.description);
e.setCreated(expense.created);
e.setAmount(expense.amount);
e.setCategory(expense.category);
e.setApproval(expense.approval);
e.setReasonDenied(expense.reasonDenied);
e.persist();
return e.getId();
}
@Override
public long storeReport(ReportDTO report) {
Report r = new Report();
r.setApprovedSupervisorKey(report.approvedSupervisorKey);
r.setCreated(report.created);
r.setDepartment(report.department);
r.setNotes(report.notes);
r.setPurpose(report.purpose);
r.setReporterKey(report.reporterKey);
r.persist();
return r.getId();
}
};
}
try {
reportGenerator.init("dist.all.last.txt", "dist.female.first.txt", "dist.male.first.txt");
} catch (IOException e) {
throw new RuntimeException(e.getMessage());
}
}
reportGenerator.reset();