//
PCCountry country1 = new PCCountry("100", "Employee 1 Country");
PCCountry country2 = new PCCountry("200", "Employee 2 Country");
PCCountry ccountry = new PCCountry("300", "Company Country");
PCCompany company = new PCCompany("Company");
PCDepartment dept1 = new PCDepartment("Department1");
PCDepartment dept2 = new PCDepartment("Department2");
PCEmployee emp1 = new PCEmployee("Employee1");
PCEmployee emp2 = new PCEmployee("Employee2");
PCAddress addr1 = new PCAddress("Street1", "city1", country1);
PCAddress addr2 = new PCAddress("Street2", "city2", country2);
PCAddress caddr = new PCAddress("Street3", "city3", ccountry);
dept1.addEmployee(emp1);
dept2.addEmployee(emp2);
company.addDepartment(dept1);
company.addDepartment(dept2);
company.setAddress(caddr);
emp1.setAddress(addr1);
emp2.setAddress(addr2);
OpenJPAEntityManager pm = getPM();
startTx(pm);
pm.persist(rootDir);
pm.persist(company);
// _rootDirId = pm.getObjectId(rootDir);
_rootDirId = rootDir.getId();
assertNotNull(_rootDirId);
// _rootCompanyId = pm.getObjectId(company);
_rootCompanyId = company.getId();
assertNotNull(_rootCompanyId);
endTx(pm);
endEm(pm);
}