@Override public Batch buildBatch(BatchKey key, JdbcCoordinator jdbcCoordinator) { final Integer sessionJdbcBatchSize = jdbcCoordinator.getJdbcSessionOwner() .getJdbcBatchSize(); final int jdbcBatchSizeToUse = sessionJdbcBatchSize == null ? this.jdbcBatchSize : sessionJdbcBatchSize; return jdbcBatchSizeToUse > 1 ? new BatchingBatch( key, jdbcCoordinator, jdbcBatchSizeToUse ) : new NonBatchingBatch( key, jdbcCoordinator ); }
private void jdbcExecuteStatementEnd() { jdbcCoordinator.getJdbcSessionOwner().getJdbcSessionContext().getObserver().jdbcExecuteStatementEnd(); }
private void jdbcExecuteStatementStart() { jdbcCoordinator.getJdbcSessionOwner().getJdbcSessionContext().getObserver().jdbcExecuteStatementStart(); }
protected AbstractBatchImpl(BatchKey key, JdbcCoordinator jdbcCoordinator) { if ( key == null ) { throw new IllegalArgumentException( "batch key cannot be null" ); } if ( jdbcCoordinator == null ) { throw new IllegalArgumentException( "JDBC coordinator cannot be null" ); } this.key = key; this.jdbcCoordinator = jdbcCoordinator; final JdbcServices jdbcServices = jdbcCoordinator.getJdbcSessionOwner() .getJdbcSessionContext() .getServiceRegistry() .getService( JdbcServices.class ); this.sqlStatementLogger = jdbcServices.getSqlStatementLogger(); this.sqlExceptionHelper = jdbcServices.getSqlExceptionHelper(); }
private boolean canDoNameParameterBinding(Type hibernateType) { final ExtractedDatabaseMetaData databaseMetaData = procedureCall.getSession() .getJdbcCoordinator() .getJdbcSessionOwner() .getJdbcSessionContext() .getServiceRegistry().getService( JdbcEnvironment.class ) .getExtractedDatabaseMetaData(); return databaseMetaData.supportsNamedParameters() && ProcedureParameterNamedBinder.class.isInstance( hibernateType ) && ((ProcedureParameterNamedBinder) hibernateType).canDoSetting(); }
/** * Constructs a ResultSetReturnImpl * * @param jdbcCoordinator The JdbcCoordinator */ public ResultSetReturnImpl(JdbcCoordinator jdbcCoordinator) { this.jdbcCoordinator = jdbcCoordinator; final JdbcServices jdbcServices = jdbcCoordinator.getJdbcSessionOwner() .getJdbcSessionContext() .getServiceRegistry() .getService( JdbcServices.class ); this.dialect = jdbcServices.getDialect(); this.sqlStatementLogger = jdbcServices.getSqlStatementLogger(); this.sqlExceptionHelper = jdbcServices.getSqlExceptionHelper(); }
final int[] rowCounts; try { getJdbcCoordinator().getJdbcSessionOwner().getJdbcSessionContext().getObserver().jdbcExecuteBatchStart(); rowCounts = statement.executeBatch(); getJdbcCoordinator().getJdbcSessionOwner().getJdbcSessionContext().getObserver().jdbcExecuteBatchEnd();
private JdbcServices getJdbcService() { return jdbcCoordinator .getJdbcSessionOwner() .getJdbcSessionContext() .getServiceRegistry() .getService(JdbcServices.class); }
@Override public Batch buildBatch(BatchKey key, JdbcCoordinator jdbcCoordinator) { final Integer sessionJdbcBatchSize = jdbcCoordinator.getJdbcSessionOwner() .getJdbcBatchSize(); final int jdbcBatchSizeToUse = sessionJdbcBatchSize == null ? this.jdbcBatchSize : sessionJdbcBatchSize; return jdbcBatchSizeToUse > 1 ? new BatchingBatch( key, jdbcCoordinator, jdbcBatchSizeToUse ) : new NonBatchingBatch( key, jdbcCoordinator ); }
private JdbcServices getJdbcService() { return jdbcCoordinator .getJdbcSessionOwner() .getJdbcSessionContext() .getServiceRegistry() .getService(JdbcServices.class); }
private JdbcServices getJdbcService() { return jdbcCoordinator .getJdbcSessionOwner() .getJdbcSessionContext() .getServiceRegistry() .getService(JdbcServices.class); }
protected StatementPreparationTemplate(String incomingSql) { final String inspectedSql = jdbcCoordinator.getJdbcSessionOwner().getJdbcSessionContext().getStatementInspector().inspect(incomingSql); this.sql = inspectedSql == null ? incomingSql : inspectedSql; }
private JdbcServices getJdbcService() { return jdbcCoordinator .getJdbcSessionOwner() .getJdbcSessionContext() .getServiceRegistry() .getService(JdbcServices.class); }
private JdbcServices getJdbcService() { return jdbcCoordinator .getJdbcSessionOwner() .getJdbcSessionContext() .getServiceRegistry() .getService(JdbcServices.class); }
private JdbcServices getJdbcService() { return jdbcCoordinator .getJdbcSessionOwner() .getJdbcSessionContext() .getServiceRegistry() .getService(JdbcServices.class); }
private JdbcServices getJdbcService() { return jdbcCoordinator .getJdbcSessionOwner() .getJdbcSessionContext() .getServiceRegistry() .getService(JdbcServices.class); }
private JdbcServices getJdbcService() { return jdbcCoordinator .getJdbcSessionOwner() .getJdbcSessionContext() .getServiceRegistry() .getService(JdbcServices.class); }
protected StatementPreparationTemplate(String incomingSql) { final String inspectedSql = jdbcCoordinator.getJdbcSessionOwner().getJdbcSessionContext().getStatementInspector().inspect(incomingSql); this.sql = inspectedSql == null ? incomingSql : inspectedSql; }
protected StatementPreparationTemplate(String incomingSql) { final String inspectedSql = jdbcCoordinator.getJdbcSessionOwner().getJdbcSessionContext().getStatementInspector().inspect(incomingSql); this.sql = inspectedSql == null ? incomingSql : inspectedSql; }
protected StatementPreparationTemplate(String incomingSql) { final String inspectedSql = jdbcCoordinator.getJdbcSessionOwner().getJdbcSessionContext().getStatementInspector().inspect(incomingSql); this.sql = inspectedSql == null ? incomingSql : inspectedSql; }