private void checkStudents(Group newGroup, Group oldGroup)
			throws ServerException {
		if (log.isDebugEnabled())
			log.debug("Method call. Arguments: " + newGroup + " " + oldGroup);
		for (Student oldStudent : oldGroup.getStudents()) {
			int j = 0;
			for (Student newStudent : newGroup.getStudents()) {
				if (!oldStudent.equals(newStudent)
						&& oldStudent.getId() == newStudent.getId()) {
					updateStudentInDB(newStudent);
					break;
				}
				if (oldStudent.equals(newStudent)) {
					break;
				}
				j++;
			}
			if (j == newGroup.getStudents().size()) {
				removeStudentFromDB(oldStudent);
			}
		}
		for (Student newStudent : newGroup.getStudents()) {
			checkStudentForNew(newStudent, oldGroup);
		}
	}