Package org.springframework.jdbc.support

Examples of org.springframework.jdbc.support.SQLStateSQLExceptionTranslator


        super();
        if (dataSource != null) {
            this.exceptionTranslator = new SQLErrorCodeSQLExceptionTranslator(dataSource);
        }
        else {
            this.exceptionTranslator = new SQLStateSQLExceptionTranslator();
        }
    }
View Full Code Here


    if (this.exceptionTranslator == null) {
      DataSource ds = getDataSource();
      if (ds != null) {
        return new SQLErrorCodeSQLExceptionTranslator(ds);
      }
      return new SQLStateSQLExceptionTranslator();
    }
    return this.exceptionTranslator;
  }
View Full Code Here

  @Override
  public void exception(ExecuteContext ctx) {
    SQLDialect dialect = ctx.configuration().dialect();
    SQLExceptionTranslator translator = (dialect != null) ? new SQLErrorCodeSQLExceptionTranslator(dialect.name())
        : new SQLStateSQLExceptionTranslator();

    ctx.exception(translator.translate("jOOQ", ctx.sql(), ctx.sqlException()));
  }
View Full Code Here

        ctx.exception(translator().translate("jOOQ", ctx.sql(), ctx.sqlException()));
    }

    private SQLExceptionTranslator translator() {
        return ds == null
            ? new SQLStateSQLExceptionTranslator()
            : new SQLErrorCodeSQLExceptionTranslator(ds);
    }
View Full Code Here

    @Override
    public void exception(ExecuteContext ctx) {
        SQLDialect dialect = ctx.configuration().dialect();
        SQLExceptionTranslator translator = (dialect != null)
                ? new SQLErrorCodeSQLExceptionTranslator(dialect.name())
                : new SQLStateSQLExceptionTranslator();

        ctx.exception(translator.translate("jOOQ", ctx.sql(), ctx.sqlException()));
    }
View Full Code Here

  public static SQLExceptionTranslator newJdbcExceptionTranslator(SessionFactory sessionFactory) {
    DataSource ds = getDataSource(sessionFactory);
    if (ds != null) {
      return new SQLErrorCodeSQLExceptionTranslator(ds);
    }
    return new SQLStateSQLExceptionTranslator();
  }
View Full Code Here

    // Check for PersistenceManagerFactory's DataSource.
    if (connectionFactory instanceof DataSource) {
      return new SQLErrorCodeSQLExceptionTranslator((DataSource) connectionFactory);
    }
    else {
      return new SQLStateSQLExceptionTranslator();
    }
  }
View Full Code Here

  public static SQLExceptionTranslator newJdbcExceptionTranslator(SessionFactory sessionFactory) {
    DataSource ds = getDataSource(sessionFactory);
    if (ds != null) {
      return new SQLErrorCodeSQLExceptionTranslator(ds);
    }
    return new SQLStateSQLExceptionTranslator();
  }
View Full Code Here

  public static SQLExceptionTranslator newJdbcExceptionTranslator(SessionFactory sessionFactory) {
    DataSource ds = getDataSource(sessionFactory);
    if (ds != null) {
      return new SQLErrorCodeSQLExceptionTranslator(ds);
    }
    return new SQLStateSQLExceptionTranslator();
  }
View Full Code Here

    // Check for PersistenceManagerFactory's DataSource.
    if (connectionFactory instanceof DataSource) {
      return new SQLErrorCodeSQLExceptionTranslator((DataSource) connectionFactory);
    }
    else {
      return new SQLStateSQLExceptionTranslator();
    }
  }
View Full Code Here

TOP

Related Classes of org.springframework.jdbc.support.SQLStateSQLExceptionTranslator

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.