@Override public SqlExceptionHelper getSQLExceptionHelper() { return delegate.getSQLExceptionHelper(); }
protected JDBCException convert(SQLException sqle, String message) { return getSession().getFactory().getSQLExceptionHelper().convert( sqle, message ); }
@Override public void beforeFirst() { try { getResultSet().beforeFirst(); } catch (SQLException e) { throw getSession().getFactory().getSQLExceptionHelper().convert( e, "exception calling beforeFirst()" ); } currentRow = null; currentPosition = 0; }
@Override public Blob mergeBlob(Blob original, Blob target, SharedSessionContractImplementor session) { if ( original != target ) { try { // the BLOB just read during the load phase of merge final OutputStream connectedStream = target.setBinaryStream( 1L ); // the BLOB from the detached state final InputStream detachedStream = original.getBinaryStream(); StreamCopier.copy( detachedStream, connectedStream ); return target; } catch (SQLException e ) { throw session.getFactory().getSQLExceptionHelper().convert( e, "unable to merge BLOB data" ); } } else { return NEW_LOCATOR_LOB_MERGE_STRATEGY.mergeBlob( original, target, session ); } }
@Override public Clob mergeClob(Clob original, Clob target, SharedSessionContractImplementor session) { if ( original == null && target == null ) { return null; } try { final LobCreator lobCreator = session.getFactory().getServiceRegistry().getService( JdbcServices.class ).getLobCreator( session ); return original == null ? lobCreator.createClob( "" ) : lobCreator.createClob( original.getCharacterStream(), original.length() ); } catch (SQLException e) { throw session.getFactory().getSQLExceptionHelper().convert( e, "unable to merge CLOB data" ); } }
@Override public Blob mergeBlob(Blob original, Blob target, SharedSessionContractImplementor session) { if ( original == null && target == null ) { return null; } try { final LobCreator lobCreator = session.getFactory().getServiceRegistry().getService( JdbcServices.class ).getLobCreator( session ); return original == null ? lobCreator.createBlob( ArrayHelper.EMPTY_BYTE_ARRAY ) : lobCreator.createBlob( original.getBinaryStream(), original.length() ); } catch (SQLException e) { throw session.getFactory().getSQLExceptionHelper().convert( e, "unable to merge BLOB data" ); } }
private boolean isResultSetEmpty() { try { return currentPosition == 0 && !getResultSet().isBeforeFirst() && !getResultSet().isAfterLast(); } catch (SQLException e) { throw getSession().getFactory().getSQLExceptionHelper().convert( e, "Could not determine if resultset is empty due to exception calling isBeforeFirst or isAfterLast()" ); } }
@Override public Clob mergeClob(Clob original, Clob target, SharedSessionContractImplementor session) { if ( original != target ) { try { // the CLOB just read during the load phase of merge final OutputStream connectedStream = target.setAsciiStream( 1L ); // the CLOB from the detached state final InputStream detachedStream = original.getAsciiStream(); StreamCopier.copy( detachedStream, connectedStream ); return target; } catch (SQLException e ) { throw session.getFactory().getSQLExceptionHelper().convert( e, "unable to merge CLOB data" ); } } else { return NEW_LOCATOR_LOB_MERGE_STRATEGY.mergeClob( original, target, session ); } }
@Override public NClob mergeNClob(NClob original, NClob target, SharedSessionContractImplementor session) { if ( original != target ) { try { // the NCLOB just read during the load phase of merge final OutputStream connectedStream = target.setAsciiStream( 1L ); // the NCLOB from the detached state final InputStream detachedStream = original.getAsciiStream(); StreamCopier.copy( detachedStream, connectedStream ); return target; } catch (SQLException e ) { throw session.getFactory().getSQLExceptionHelper().convert( e, "unable to merge NCLOB data" ); } } else { return NEW_LOCATOR_LOB_MERGE_STRATEGY.mergeNClob( original, target, session ); } } };
throw procedureCall.getSession().getFactory().getSQLExceptionHelper().convert( e, "Unable to extract OUT/INOUT parameter value"
@Override public NClob mergeNClob(NClob original, NClob target, SharedSessionContractImplementor session) { if ( original == null && target == null ) { return null; } try { final LobCreator lobCreator = session.getFactory().getServiceRegistry().getService( JdbcServices.class ).getLobCreator( session ); return original == null ? lobCreator.createNClob( "" ) : lobCreator.createNClob( original.getCharacterStream(), original.length() ); } catch (SQLException e) { throw session.getFactory().getSQLExceptionHelper().convert( e, "unable to merge NCLOB data" ); } } };
throw session.getFactory().getSQLExceptionHelper().convert( sqle, "could not get next iterator result"
throw getFactory().getSQLExceptionHelper().convert( sqle, "could not load an entity batch: " + MessageHelper.infoString( entityPersister, ids, getFactory() ),
throw getSession().getFactory().getSQLExceptionHelper().convert( e, "exception calling isAfterLast()"
throw getSession().getFactory().getSQLExceptionHelper().convert( e, "exception calling isAfterLast()"
throw getFactory().getSQLExceptionHelper().convert( e, String.format(
throw session.getFactory().getSQLExceptionHelper().convert( sqle, "could not execute native bulk manipulation query",
throw getFactory().getSQLExceptionHelper().convert( e, "unable to select generated column values",
throw context.getSession().getFactory().getSQLExceptionHelper().convert( sqle, "could not read next row of results"
protected interface InclusionChecker { boolean includeProperty(int propertyNumber); }