public SQLExceptionConverter getSQLExceptionConverter() { return getCurrentSessionFactoryImplementor().getSQLExceptionConverter(); }
public int getRowNumber() throws HibernateException { try { return rs.getRow()-1; } catch (SQLException sqle) { throw JDBCExceptionHelper.convert( sess.getFactory().getSQLExceptionConverter(), sqle, "exception calling getRow()" ); } }
public void cancelLastQuery() throws HibernateException { try { if (lastQuery!=null) lastQuery.cancel(); } catch (SQLException sqle) { throw JDBCExceptionHelper.convert( factory.getSQLExceptionConverter(), sqle, "Cannot cancel query" ); } }
/** * @see org.hibernate.ScrollableResults#beforeFirst() */ public void beforeFirst() throws HibernateException { try { rs.beforeFirst(); } catch (SQLException sqle) { throw JDBCExceptionHelper.convert( sess.getFactory().getSQLExceptionConverter(), sqle, "exception calling beforeFirst()" ); } }
public void cancelLastQuery() throws HibernateException { try { if (lastQuery!=null) lastQuery.cancel(); } catch (SQLException sqle) { throw JDBCExceptionHelper.convert( factory.getSQLExceptionConverter(), sqle, "Cannot cancel query" ); } }
public Connection openConnection() throws HibernateException { log.debug("opening JDBC connection"); try { return factory.getConnectionProvider().getConnection(); } catch (SQLException sqle) { throw JDBCExceptionHelper.convert( factory.getSQLExceptionConverter(), sqle, "Cannot open connection" ); } }
public Connection openConnection() throws HibernateException { log.debug("opening JDBC connection"); try { return factory.getConnectionProvider().getConnection(); } catch (SQLException sqle) { throw JDBCExceptionHelper.convert( factory.getSQLExceptionConverter(), sqle, "Cannot open connection" ); } }
public int getRowNumber() throws HibernateException { try { return getResultSet().getRow()-1; } catch (SQLException sqle) { throw JDBCExceptionHelper.convert( getSession().getFactory().getSQLExceptionConverter(), sqle, "exception calling getRow()" ); } }
public boolean setRowNumber(int rowNumber) throws HibernateException { if (rowNumber>=0) rowNumber++; try { boolean result = rs.absolute(rowNumber); prepareCurrentRow(result); return result; } catch (SQLException sqle) { throw JDBCExceptionHelper.convert( sess.getFactory().getSQLExceptionConverter(), sqle, "could not advance using absolute()" ); } }
/** * @see org.hibernate.ScrollableResults#isLast() */ public boolean isLast() throws HibernateException { try { return rs.isLast(); } catch (SQLException sqle) { throw JDBCExceptionHelper.convert( sess.getFactory().getSQLExceptionConverter(), sqle, "exception calling isLast()" ); } }
/** * @see org.hibernate.ScrollableResults#afterLast() */ public void afterLast() throws HibernateException { try { rs.afterLast(); } catch (SQLException sqle) { throw JDBCExceptionHelper.convert( sess.getFactory().getSQLExceptionConverter(), sqle, "exception calling afterLast()" ); } }
/** * @see org.hibernate.ScrollableResults#isFirst() */ public boolean isFirst() throws HibernateException { try { return rs.isFirst(); } catch (SQLException sqle) { throw JDBCExceptionHelper.convert( sess.getFactory().getSQLExceptionConverter(), sqle, "exception calling isFirst()" ); } }
public Integer doInTransaction(TransactionStatus status) { try { return updateSequence(Bootstrap.getBean(DBUtil.class).getConnection()); } catch (SQLException sqle) { throw JDBCExceptionHelper.convert(session.getFactory() .getSQLExceptionConverter(), sqle, "could not get or update next value", null); } } });
public boolean setRowNumber(int rowNumber) throws HibernateException { if (rowNumber>=0) rowNumber++; try { boolean result = getResultSet().absolute(rowNumber); prepareCurrentRow(result); return result; } catch (SQLException sqle) { throw JDBCExceptionHelper.convert( getSession().getFactory().getSQLExceptionConverter(), sqle, "could not advance using absolute()" ); } }
/** * @see org.hibernate.ScrollableResults#close() */ public void close() throws HibernateException { try { sess.getBatcher().closeQueryStatement(ps, rs); //not absolutely necessary } catch (SQLException sqle) { throw JDBCExceptionHelper.convert( sess.getFactory().getSQLExceptionConverter(), sqle, "could not close results" ); } }
public final void close() throws HibernateException { try { // not absolutely necessary, but does help with aggressive release session.getBatcher().closeQueryStatement(ps, resultSet); } catch (SQLException sqle) { throw JDBCExceptionHelper.convert( session.getFactory().getSQLExceptionConverter(), sqle, "could not close results" ); } }
/** * @see org.hibernate.ScrollableResults#scroll(int) */ public boolean scroll(int i) throws HibernateException { try { boolean result = rs.relative(i); prepareCurrentRow(result); return result; } catch (SQLException sqle) { throw JDBCExceptionHelper.convert( sess.getFactory().getSQLExceptionConverter(), sqle, "could not advance using scroll()" ); } }
/** * @see org.hibernate.ScrollableResults#afterLast() */ public void afterLast() throws HibernateException { try { getResultSet().afterLast(); } catch (SQLException sqle) { throw JDBCExceptionHelper.convert( getSession().getFactory().getSQLExceptionConverter(), sqle, "exception calling afterLast()" ); } }
/** * @see org.hibernate.ScrollableResults#isFirst() */ public boolean isFirst() throws HibernateException { try { return getResultSet().isFirst(); } catch (SQLException sqle) { throw JDBCExceptionHelper.convert( getSession().getFactory().getSQLExceptionConverter(), sqle, "exception calling isFirst()" ); } }
/** * @see org.hibernate.ScrollableResults#isLast() */ public boolean isLast() throws HibernateException { try { return getResultSet().isLast(); } catch (SQLException sqle) { throw JDBCExceptionHelper.convert( getSession().getFactory().getSQLExceptionConverter(), sqle, "exception calling isLast()" ); } }