Package org.hibernate.exception.spi

Examples of org.hibernate.exception.spi.SQLExceptionConversionDelegate


    } while ( cur < len && depth != 0 && pos != -1 );
    return depth == 0 ? pos : -1;
  }
  @Override
  public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate() {
    return new SQLExceptionConversionDelegate() {
      @Override
      public JDBCException convert(SQLException sqlException, String message, String sql) {
        final String sqlState = JdbcExceptionHelper.extractSqlState( sqlException );

        if"HY008".equals( sqlState )){
View Full Code Here


    }
  };
 
  @Override
  public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate() {
    SQLExceptionConversionDelegate delegate = super.buildSQLExceptionConversionDelegate();
    if (delegate == null) {
      delegate = new SQLExceptionConversionDelegate() {

        @Override
        public JDBCException convert(SQLException sqlException, String message, String sql) {
                    JDBCException exception = null;
View Full Code Here

    return false;
  }

  @Override
  public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate() {
    return new SQLExceptionConversionDelegate() {
      @Override
      public JDBCException convert(SQLException sqlException, String message, String sql) {
        final String sqlState = JdbcExceptionHelper.extractSqlState( sqlException );

        if ( "41000".equals( sqlState ) ) {
View Full Code Here

    return sql + new ForUpdateFragment( this, aliasedLockOptions, keyColumnNames ).toFragmentString();
  }

  @Override
  public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate() {
    return new SQLExceptionConversionDelegate() {
      @Override
      public JDBCException convert(SQLException sqlException, String message, String sql) {
        final String sqlState = JdbcExceptionHelper.extractSqlState( sqlException );
        final int errorCode = JdbcExceptionHelper.extractErrorCode( sqlException );
        if("JZ0TO".equals( sqlState ) || "JZ006".equals( sqlState )){
View Full Code Here

    return sqlCode == Types.BOOLEAN ? SmallIntTypeDescriptor.INSTANCE : super.getSqlTypeDescriptorOverride( sqlCode );
  }

  @Override
  public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate() {
    return new SQLExceptionConversionDelegate() {
      @Override
      public JDBCException convert(SQLException sqlException, String message, String sql) {
        final String sqlState = JdbcExceptionHelper.extractSqlState( sqlException );
        final int errorCode = JdbcExceptionHelper.extractErrorCode( sqlException );
View Full Code Here

    }
  }

  @Override
  public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate() {
    return new SQLExceptionConversionDelegate() {
      @Override
      public JDBCException convert(SQLException sqlException, String message, String sql) {
        final String sqlState = JdbcExceptionHelper.extractSqlState( sqlException );
        final int errorCode = JdbcExceptionHelper.extractErrorCode( sqlException );
        if ( "HY008".equals( sqlState ) ) {
View Full Code Here

  };

  @Override
  public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate() {
    return new SQLExceptionConversionDelegate() {
      @Override
      public JDBCException convert(SQLException sqlException, String message, String sql) {
        // interpreting Oracle exceptions is much much more precise based on their specific vendor codes.

        final int errorCode = JdbcExceptionHelper.extractErrorCode( sqlException );
View Full Code Here

    return false;
  }

  @Override
  public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate() {
    return new SQLExceptionConversionDelegate() {
      @Override
      public JDBCException convert(SQLException sqlException, String message, String sql) {
        final String sqlState = JdbcExceptionHelper.extractSqlState( sqlException );

        if ( "41000".equals( sqlState ) ) {
View Full Code Here

    }
  };
 
  @Override
  public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate() {
    SQLExceptionConversionDelegate delegate = super.buildSQLExceptionConversionDelegate();
    if (delegate == null) {
      delegate = new SQLExceptionConversionDelegate() {

        @Override
        public JDBCException convert(SQLException sqlException, String message, String sql) {
                    JDBCException exception = null;
View Full Code Here

    }
  };
 
  @Override
  public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate() {
    return new SQLExceptionConversionDelegate() {
      @Override
      public JDBCException convert(SQLException sqlException, String message, String sql) {
        final String sqlState = JdbcExceptionHelper.extractSqlState( sqlException );

        if ( "40P01".equals( sqlState ) ) { // DEADLOCK DETECTED
View Full Code Here

TOP

Related Classes of org.hibernate.exception.spi.SQLExceptionConversionDelegate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.