Boolean waitForRecording,
Boolean allowRecording,
Boolean hideTopBar){
try {
log.debug("*** updateRoom numberOfPartizipants: "+numberOfPartizipants);
Rooms r = this.getRoomById(rooms_id);
r.setComment(comment);
r.setIspublic(ispublic);
r.setNumberOfPartizipants(numberOfPartizipants);
r.setName(name);
r.setRoomtype(this.getRoomTypesById(roomtypes_id));
r.setUpdatetime(new Date());
r.setAllowUserQuestions(allowUserQuestions);
r.setIsAudioOnly(isAudioOnly);
r.setIsDemoRoom(isDemoRoom);
r.setDemoTime(demoTime);
r.setAppointment(appointment);
r.setIsModeratedRoom(isModeratedRoom);
r.setHideTopBar(hideTopBar);
r.setIsClosed(isClosed);
r.setRedirectURL(redirectURL);
r.setSipNumber(sipNumber);
r.setConferencePin(conferencePin);
r.setOwnerId(ownerId);
r.setWaitForRecording(waitForRecording);
r.setAllowRecording(allowRecording);
Object idf = PersistenceSessionUtil.createSession();
EntityManager session = PersistenceSessionUtil.getSession();
EntityTransaction tx = session.getTransaction();
tx.begin();
if (r.getRooms_id() == null) {
session.persist(r);
} else {
if (!session.contains(r)) {
r = session.merge(r);
}
}
session.flush();
session.refresh(r);
tx.commit();
PersistenceSessionUtil.closeSession(idf);
if (organisations!=null){
Long t = this.updateRoomOrganisations(organisations, r);
if (t==null) return null;
}
if (roomModerators!=null) {
RoomModeratorsDaoImpl.getInstance().updateRoomModeratorByUserList(roomModerators,r.getRooms_id());
}
return r.getRooms_id();
} catch (Exception ex2) {
log.error("[updateRoom] ", ex2);
}
return null;
}