public void test() {
    int size = getCacheIdentityMap().getMaxSize() * factor;

    for (int i = 0; i < size; i++) {
      BigDecimal id = new java.math.BigDecimal(i);
      Employee employee = new Employee();
      Vector pk = new Vector(1);
      employee.setId(id);
      employee.setFirstName("Joe");
      employee.setLastName("Blow");
      pk.add(id);
      getPrimaryKeys().add(pk);
      getCacheIdentityMap().put(primaryKeys, employee, null, 0);
    }
  }
Exemple #2
0
 public static Employee createEmployee(
     EOEditingContext editingContext,
     Boolean admin,
     String firstName,
     NSTimestamp hireDate,
     Boolean insured,
     String lastName,
     er.uber.model.EmployeeStatus status,
     er.uber.model.Company company) {
   Employee eo =
       (Employee) EOUtilities.createAndInsertInstance(editingContext, _Employee.ENTITY_NAME);
   eo.setAdmin(admin);
   eo.setFirstName(firstName);
   eo.setHireDate(hireDate);
   eo.setInsured(insured);
   eo.setLastName(lastName);
   eo.setStatus(status);
   eo.setCompanyRelationship(company);
   return eo;
 }