/** * @see org.opencms.main.CmsException#createException(org.opencms.i18n.CmsMessageContainer, java.lang.Throwable) */ @Override public CmsException createException(CmsMessageContainer container, Throwable cause) { return new CmsDbIoException(container, cause); } }
/** * @see org.opencms.main.CmsException#createException(org.opencms.i18n.CmsMessageContainer, java.lang.Throwable) */ @Override public CmsException createException(CmsMessageContainer container, Throwable cause) { return new CmsDbIoException(container, cause); } }
throw new CmsDbIoException( Messages.get().container(Messages.ERR_GET_FILE_BYTES_1, file.getAbsolutePath()), e);
throw new CmsDbIoException(Messages.get().container(Messages.ERR_IO_WRITE_SYNCLIST_0), e); } finally {
throw new CmsDbIoException(Messages.get().container(Messages.ERR_IO_WRITE_SYNCLIST_0), e); } finally {
/** * Updates additional user info.<p> * @param dbc the current dbc * @param userId the user id to add the user info for * @param key the name of the additional user info * @param value the value of the additional user info * @throws CmsDataAccessException if something goes wrong */ protected void internalUpdateUserInfo(CmsDbContext dbc, CmsUUID userId, String key, Object value) throws CmsDataAccessException { try { Query q = m_sqlManager.createQuery(dbc, C_USERDATA_UPDATE_4); // write data to database q.setParameter(1, CmsDataTypeUtil.dataSerialize(value)); q.setParameter(2, value.getClass().getName()); q.setParameter(3, userId.toString()); q.setParameter(4, key); q.executeUpdate(); } catch (PersistenceException e) { throw new CmsDbSqlException(Messages.get().container(Messages.ERR_GENERIC_SQL_1, C_USERDATA_UPDATE_4), e); } catch (IOException e) { throw new CmsDbIoException(Messages.get().container(Messages.ERR_SERIALIZING_USER_DATA_1, userId), e); } }
/** * @see org.opencms.db.I_CmsUserDriver#writeUserInfo(org.opencms.db.CmsDbContext, org.opencms.util.CmsUUID, java.lang.String, java.lang.Object) */ public void writeUserInfo(CmsDbContext dbc, CmsUUID userId, String key, Object value) throws CmsDataAccessException { PreparedStatement stmt = null; Connection conn = null; try { conn = getSqlManager().getConnection(dbc); stmt = m_sqlManager.getPreparedStatement(conn, "C_USERDATA_WRITE_4"); // write data to database stmt.setString(1, userId.toString()); stmt.setString(2, key); m_sqlManager.setBytes(stmt, 3, CmsDataTypeUtil.dataSerialize(value)); stmt.setString(4, value.getClass().getName()); stmt.executeUpdate(); } catch (SQLException e) { throw new CmsDbSqlException(Messages.get().container( Messages.ERR_GENERIC_SQL_1, CmsDbSqlException.getErrorQuery(stmt)), e); } catch (IOException e) { throw new CmsDbIoException(Messages.get().container(Messages.ERR_SERIALIZING_USER_DATA_1, userId), e); } finally { m_sqlManager.closeAll(dbc, conn, stmt, null); } }
e); } catch (IOException e) { throw new CmsDbIoException(Messages.get().container(Messages.ERR_SERIALIZING_USER_DATA_1, userId), e); } finally { m_sqlManager.closeAll(dbc, conn, stmt, null);
e); } catch (IOException e) { throw new CmsDbIoException(Messages.get().container(Messages.ERR_SERIALIZING_USER_DATA_1, userId), e); } finally { m_sqlManager.closeAll(dbc, conn, stmt, null);
CmsDbSqlException.getErrorQuery(stmt)), e); } catch (IOException e) { throw new CmsDbIoException(Messages.get().container( Messages.ERR_SERIALIZING_PUBLISHLIST_1, publishJob.getPublishHistoryId().toString()), e);
e); } catch (IOException e) { throw new CmsDbIoException( Messages.get().container( Messages.ERR_SERIALIZING_PUBLISHLIST_1,
CmsDbSqlException.getErrorQuery(stmt)), e); } catch (IOException e) { throw new CmsDbIoException(Messages.get().container(Messages.ERR_SERIALIZING_USER_DATA_1, userId), e); } finally { org.opencms.db.oracle.CmsSqlManager.closeAllInTransaction(
e); } catch (IOException e) { throw new CmsDbIoException(Messages.get().container(Messages.ERR_SERIALIZING_USER_DATA_1, userId), e); } finally { org.opencms.db.oracle.CmsSqlManager.closeAllInTransaction(
throw new CmsDbIoException( Messages.get().container(Messages.ERR_WRITING_TO_OUTPUT_STREAM_1, publishJobHistoryId), e);
internalSerializePublishList(publishJob.getPublishList())); } catch (IOException e) { throw new CmsDbIoException(Messages.get().container( Messages.ERR_SERIALIZING_PUBLISHLIST_1, publishJob.getPublishHistoryId().toString()), e);
throw new CmsDbIoException(Messages.get().container(Messages.ERR_WRITING_TO_OUTPUT_STREAM_1, resourceId), e); } catch (SQLException e) { throw new CmsDbSqlException(org.opencms.db.generic.Messages.get().container(
throw new CmsDbIoException(Messages.get().container( Messages.ERR_WRITING_TO_OUTPUT_STREAM_1, publishJobHistoryId), e);
internalSerializePublishList(publishJob.getPublishList())); } catch (IOException e) { throw new CmsDbIoException( Messages.get().container( Messages.ERR_SERIALIZING_PUBLISHLIST_1,
throw new CmsDbIoException( Messages.get().container(Messages.ERR_WRITING_TO_OUTPUT_STREAM_1, resourceId), e);
/** * Writes a new additional user info.<p> * @param dbc the current dbc * @param userId the user id to add the user info for * @param key the name of the additional user info * @param value the value of the additional user info * @throws CmsDataAccessException if something goes wrong */ protected void internalWriteUserInfo(CmsDbContext dbc, CmsUUID userId, String key, Object value) throws CmsDataAccessException { try { CmsDAOUserData u = new CmsDAOUserData(); u.setUserId(userId.toString()); u.setDataKey(key); u.setDataValue(CmsDataTypeUtil.dataSerialize(value)); u.setDataType(value.getClass().getName()); m_sqlManager.persist(dbc, u); } catch (PersistenceException e) { throw new CmsDataAccessException(Messages.get().container(Messages.ERR_JPA_PERSITENCE_1, e), e); } catch (IOException e) { throw new CmsDbIoException(Messages.get().container(Messages.ERR_SERIALIZING_USER_DATA_1, userId), e); } }