Examples of SqlExceptionHelper


Examples of org.hibernate.engine.jdbc.spi.SqlExceptionHelper

    props.putAll( properties );
    this.connectionHelper = new ManagedProviderConnectionHelper( props );

    this.sqlStatementLogger = new SqlStatementLogger( false, true );
    this.formatter = FormatStyle.DDL.getFormatter();
    this.sqlExceptionHelper = new SqlExceptionHelper();

    this.importFiles = ConfigurationHelper.getString(
        Environment.HBM2DDL_IMPORT_FILES,
        properties,
        DEFAULT_IMPORT_FILE
View Full Code Here

Examples of org.hibernate.engine.jdbc.spi.SqlExceptionHelper

  public SchemaExport(Configuration configuration, Connection connection) throws HibernateException {
    this.connectionHelper = new SuppliedConnectionHelper( connection );

    this.sqlStatementLogger = new SqlStatementLogger( false, true );
    this.formatter = FormatStyle.DDL.getFormatter();
    this.sqlExceptionHelper = new SqlExceptionHelper();

    this.importFiles = ConfigurationHelper.getString(
        Environment.HBM2DDL_IMPORT_FILES,
        configuration.getProperties(),
        DEFAULT_IMPORT_FILE
View Full Code Here

Examples of org.hibernate.engine.jdbc.spi.SqlExceptionHelper

    this.connectionHelper = connectionHelper;
    this.dropSQL = dropSql;
    this.createSQL = createSql;
    this.importFiles = "";
    this.sqlStatementLogger = new SqlStatementLogger( false, true );
    this.sqlExceptionHelper = new SqlExceptionHelper();
    this.formatter = FormatStyle.DDL.getFormatter();
  }
View Full Code Here

Examples of org.hibernate.engine.jdbc.spi.SqlExceptionHelper

    }
  }

  private void execute(boolean script, boolean export, Writer fileOutput, Statement statement, final String sql)
      throws IOException, SQLException {
    final SqlExceptionHelper sqlExceptionHelper = new SqlExceptionHelper();

    String formatted = formatter.format( sql );
        if (delimiter != null) formatted += delimiter;
        if (script) System.out.println(formatted);
        LOG.debugf(formatted);
    if ( outputFile != null ) {
      fileOutput.write( formatted + "\n" );
    }
    if ( export ) {

      statement.executeUpdate( sql );
      try {
        SQLWarning warnings = statement.getWarnings();
        if ( warnings != null) {
          sqlExceptionHelper.logAndClearWarnings( connectionHelper.getConnection() );
        }
      }
      catch( SQLException sqle ) {
                LOG.unableToLogSqlWarnings(sqle);
      }
View Full Code Here

Examples of org.hibernate.engine.jdbc.spi.SqlExceptionHelper

    Properties props = new Properties();
    props.putAll( dialect.getDefaultProperties() );
    props.putAll( properties );
    this.connectionHelper = new ManagedProviderConnectionHelper( props );

    this.sqlExceptionHelper = new SqlExceptionHelper();
    this.sqlStatementLogger = new SqlStatementLogger( false, true );
    this.formatter = FormatStyle.DDL.getFormatter();
  }
View Full Code Here

Examples of org.hibernate.engine.jdbc.spi.SqlExceptionHelper

    final JdbcServices jdbcServices = serviceRegistry.getService( JdbcServices.class );
    this.dialect = jdbcServices.getDialect();
    this.connectionHelper = new SuppliedConnectionProviderConnectionHelper( jdbcServices.getConnectionProvider() );

    this.sqlExceptionHelper = new SqlExceptionHelper();
    this.sqlStatementLogger = jdbcServices.getSqlStatementLogger();
    this.formatter = ( sqlStatementLogger.isFormat() ? FormatStyle.DDL : FormatStyle.NONE ).getFormatter();
  }
View Full Code Here

Examples of org.hibernate.engine.jdbc.spi.SqlExceptionHelper

    props.putAll( properties );
    this.connectionHelper = new ManagedProviderConnectionHelper( props );

    this.sqlStatementLogger = new SqlStatementLogger( false, true );
    this.formatter = FormatStyle.DDL.getFormatter();
    this.sqlExceptionHelper = new SqlExceptionHelper();

    this.importFiles = ConfigurationHelper.getString(
        AvailableSettings.HBM2DDL_IMPORT_FILES,
        properties,
        DEFAULT_IMPORT_FILE
View Full Code Here

Examples of org.hibernate.engine.jdbc.spi.SqlExceptionHelper

  public SchemaExport(Configuration configuration, Connection connection) throws HibernateException {
    this.connectionHelper = new SuppliedConnectionHelper( connection );

    this.sqlStatementLogger = new SqlStatementLogger( false, true );
    this.formatter = FormatStyle.DDL.getFormatter();
    this.sqlExceptionHelper = new SqlExceptionHelper();

    this.importFiles = ConfigurationHelper.getString(
        AvailableSettings.HBM2DDL_IMPORT_FILES,
        configuration.getProperties(),
        DEFAULT_IMPORT_FILE
View Full Code Here

Examples of org.hibernate.engine.jdbc.spi.SqlExceptionHelper

    this.connectionHelper = connectionHelper;
    this.dropSQL = dropSql;
    this.createSQL = createSql;
    this.importFiles = "";
    this.sqlStatementLogger = new SqlStatementLogger( false, true );
    this.sqlExceptionHelper = new SqlExceptionHelper();
    this.formatter = FormatStyle.DDL.getFormatter();
  }
View Full Code Here

Examples of org.hibernate.engine.jdbc.spi.SqlExceptionHelper

    }
  }

  private void execute(boolean script, boolean export, Writer fileOutput, Statement statement, final String sql)
      throws IOException, SQLException {
    final SqlExceptionHelper sqlExceptionHelper = new SqlExceptionHelper();

    String formatted = formatter.format( sql );
        if (delimiter != null) formatted += delimiter;
        if (script) System.out.println(formatted);
        LOG.debug(formatted);
    if ( outputFile != null ) {
      fileOutput.write( formatted + "\n" );
    }
    if ( export ) {

      statement.executeUpdate( sql );
      try {
        SQLWarning warnings = statement.getWarnings();
        if ( warnings != null) {
          sqlExceptionHelper.logAndClearWarnings( connectionHelper.getConnection() );
        }
      }
      catch( SQLException sqle ) {
                LOG.unableToLogSqlWarnings(sqle);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.