Package com.google.gwt.sample.expenses.server.domain

Examples of com.google.gwt.sample.expenses.server.domain.Employee


            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();
   
View Full Code Here

TOP

Related Classes of com.google.gwt.sample.expenses.server.domain.Employee

Copyright © 2018 www.massapicom. 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.