if (mainPanel != null) {
try {
Map<String, Account> accounts = (Map<String, Account>) system.query(new GetAccounts());
Map<String, Person> employee = (Map<String, Person>) system.query(new GetEmployee());
Map<String, ClassRoom> classRoom = (Map<String, ClassRoom>) system.query(new GetClassRoom());
Map<String, Course> courses = (Map<String, Course>) system.query(new GetCourse());
float contValueOfCourses = 0;
for (Course course : courses.values()) {
contValueOfCourses += course.getValue();
}