company = new Company(this, rs);
} else {
company = getDummyCompany();
final Department d = getDummyDepartment();
final Employee e = getDummyEmployee();
final Project project = getDummyProject();
final WorkPackage workPackage = getRootWorkPackage();
dbConnector.execute("SET REFERENTIAL_INTEGRITY FALSE;",
e.toSQL(owner), company.toSQL(owner), d.toSQL(owner), project.toSQL(owner), workPackage.toSQL(owner),
"SET REFERENTIAL_INTEGRITY TRUE;");
}
employees = new HashMap<Long, Employee>();
rs = dbConnector.query("SELECT * FROM " + Employee.getTableName());
while (rs.next()) {
employees.put(rs.getLong("id"), new Employee(this, rs));
}
departments = new HashMap<Long, Department>();
rs = dbConnector.query("SELECT * FROM " + Department.getTableName());
while (rs.next()) {
departments.put(rs.getLong("id"), new Department(this, rs));
}
projects = new HashMap<Long, Project>();
rs = dbConnector.query("SELECT * FROM " + Project.getTableName());
while (rs.next()) {
projects.put(rs.getLong("id"), new Project(this, rs));
}
workPackages = new HashMap<Long, WorkPackage>();
rs = dbConnector.query("SELECT * FROM " + WorkPackage.getTableName());
while (rs.next()) {