public void update(Object changedObject){
        ArrayList<String> fields;
        ArrayList<String> values;
        HashMap<String, String> map;

        String table = changedObject.getClass().getSimpleName();

        switch(table){
            case "User":
                User user = (User) changedObject;

                map = new HashMap<>(); map.put("username", user.getUsername());
                fields = new ArrayList<>(Arrays.asList("username", "password", "name", "email", "phonenumber"));
                values = new ArrayList<>(Arrays.asList(user.getUsername(), user.getPassword(), user.getName(), user.getEmail(), user.getPhoneNumber()));

                mySQLQuery.update(table, fields, values, map, null);
                break;
            case "Group":
                Group group = (Group) changedObject;

                map = new HashMap<>(); map.put("groupID", String.valueOf(group.getGroupID()));
                fields = new ArrayList<>(Arrays.asList("groupID", "supergroup"));
                values = new ArrayList<>(Arrays.asList(String.valueOf(group.getGroupID()), String.valueOf(group.getSuperGroup())));

                mySQLQuery.update(table, fields, values, map, null);
                break;
            case "Room":
                Room room = (Room) changedObject;

                map = new HashMap<>(); map.put("roomNumber", String.valueOf(room.getRoomNumber()));
                fields = new ArrayList<>(Arrays.asList("roomNumber", "capacity"));
                values = new ArrayList<>(Arrays.asList(String.valueOf(room.getRoomNumber()), String.valueOf(room.getCapacity())));

                mySQLQuery.update(table, fields, values, map, null);
                break;
            case "Meeting":
                Meeting meeting = (Meeting) changedObject;

                map = new HashMap<>(); map.put("meetingID", String.valueOf(meeting.getMeetingID()));
                fields = new ArrayList<>(Arrays.asList("meetingID", "startTime", "endTime", "description", "place", "room", "minCapacity", "creator", "lastUpdated"));
                values = new ArrayList<>(Arrays.asList(String.valueOf(meeting.getMeetingID()), meeting.getStarttime(), meeting.getEndtime(), meeting.getDescription(), meeting.getPlace(), String.valueOf(meeting.getRoom()), String.valueOf(meeting.getMinCapacity()), meeting.getCreator(), meeting.getLastUpdated()));

                mySQLQuery.update(table, fields, values, map, null);
                break;
            case "ExternalUser":
                ExternalUser externalUser = (ExternalUser) changedObject;

                map = new HashMap<>(); map.put("email", String.valueOf(externalUser.getEmail())); map.put("meetingID", String.valueOf(externalUser.getMeetingID()));
                fields = new ArrayList<>(Arrays.asList("email", "meetingID", "name", "phonenumber"));
                values = new ArrayList<>(Arrays.asList(externalUser.getEmail(), String.valueOf(externalUser.getMeetingID()), externalUser.getName(), externalUser.getPhoneNumber()));

                mySQLQuery.update(table, fields, values, map, null);
                break;
            case "GroupMembership":
                GroupMembership groupMembership = (GroupMembership) changedObject;

                map = new HashMap<>(); map.put("username", String.valueOf(groupMembership.getUsername())); map.put("groupID", String.valueOf(groupMembership.getGroupID()));
                fields = new ArrayList<>(Arrays.asList("username", "groupID"));
                values = new ArrayList<>(Arrays.asList(groupMembership.getUsername(), String.valueOf(groupMembership.getGroupID())));

                mySQLQuery.update(table, fields, values, map, null);
                break;
            case "MeetingInvite":
                MeetingInvite meetingInvite = (MeetingInvite) changedObject;

                map = new HashMap<>(); map.put("meetingID", String.valueOf(meetingInvite.getMeetingID())); map.put("username", String.valueOf(meetingInvite.getUsername()));
                fields = new ArrayList<>(Arrays.asList("username", "meetingID", "coming", "alarm", "lastSeen"));
                values = new ArrayList<>(Arrays.asList(meetingInvite.getUsername(), String.valueOf(meetingInvite.getMeetingID()), String.valueOf(meetingInvite.isComingAsTinyInt()), meetingInvite.getAlarm(), meetingInvite.getLastSeen()));

                mySQLQuery.update(table, fields, values, map, null);
                break;
            case "MeetingAdmin":
                MeetingAdmin meetingAdmin = (MeetingAdmin) changedObject;

                map = new HashMap<>(); map.put("meetingID", String.valueOf(meetingAdmin.getMeetingID())); map.put("username", String.valueOf(meetingAdmin.getUsername()));
                fields = new ArrayList<>(Arrays.asList("username", "meetingID"));
                values = new ArrayList<>(Arrays.asList(meetingAdmin.getUsername(), String.valueOf(meetingAdmin.getMeetingID())));

                mySQLQuery.update(table, fields, values, map, null);
                break;
            default:
                break;
        }
    }