public Long addFlvRecording(String fileHash, String fileName, Long fileSize, Long user_id,
Long room_id, Date recordStart, Date recordEnd, Long ownerId, String comment,
String recorderStreamId, Integer width, Integer height, Boolean isInterview) {
try {
FlvRecording flvRecording = new FlvRecording();
flvRecording.setDeleted("false");
flvRecording.setFileHash(fileHash);
flvRecording.setFileName(fileName);
flvRecording.setFileSize(fileSize);
flvRecording.setInserted(new Date());
flvRecording.setInsertedBy(user_id);
flvRecording.setIsFolder(false);
flvRecording.setIsImage(false);
flvRecording.setIsPresentation(false);
flvRecording.setIsRecording(true);
flvRecording.setComment(comment);
flvRecording.setIsInterview(isInterview);
flvRecording.setRoom_id(room_id);
flvRecording.setRecordStart(recordStart);
flvRecording.setRecordEnd(recordEnd);
flvRecording.setWidth(width);
flvRecording.setHeight(height);
flvRecording.setOwnerId(ownerId);
Object idf = PersistenceSessionUtil.createSession();
EntityManager session = PersistenceSessionUtil.getSession();
EntityTransaction tx = session.getTransaction();
tx.begin();
flvRecording = session.merge(flvRecording);
Long flvRecordingId = flvRecording.getFlvRecordingId();
tx.commit();
PersistenceSessionUtil.closeSession(idf);
return flvRecordingId;