public void newDepartmentWithEmployees(
PollsSynchronizations pollsSync,
StringBuffer outStr,
PersistenceManager pm) {
outStr.append("\nCreate new deparment with its employees");
Department d = new Department("Dept-" + Alea.randomstring(4, 9));
pm.makePersistent(d);
pollsSync.addInPool(DatabaseImpl.poolOfDepartmentId, d.getDeptid());
logger.log(BasicLevel.DEBUG,
"Create a new department id :" + d.getDeptid());
int nbEmployees = Alea.rand(MIN_EMPLOYEE_PER_DEPARTMENT, MAX_EMPLOYEE_PER_DEPARTMENT);
outStr.append("\n\tAdd new Department : ").append(d.getDeptid());
outStr.append(" with ").append(nbEmployees).append(" employees");
Employee boss = null;
for (int i = 0; i < nbEmployees; i++) {
Calendar cal = Calendar.getInstance();
cal.set(Alea.rand(1900, 2004), Alea.rand(1, 12), Alea.rand(1, 28));