Examples of canBeBatched()


Examples of org.hibernate.jdbc.Expectation.canBeBatched()

            final Object entry = entries.next();
            if ( entry != null && collection.entryExists( entry, i ) ) {
              int offset = 1;
              PreparedStatement st = null;
              boolean callable = isUpdateCallable();
              boolean useBatch = expectation.canBeBatched();
              String sql = getSQLUpdateRowString();

              if ( useBatch ) {
                if ( recreateBatchKey == null ) {
                  recreateBatchKey = new BasicBatchKey(
View Full Code Here

Examples of org.hibernate.jdbc.Expectation.canBeBatched()

   
    try {
      int count = 0;
      if ( isRowDeleteEnabled() ) {
        final Expectation deleteExpectation = Expectations.appropriateExpectation( getDeleteCheckStyle() );
        final boolean useBatch = deleteExpectation.canBeBatched();
        if ( useBatch && deleteRowBatchKey == null ) {
          deleteRowBatchKey = new BasicBatchKey(
              getRole() + "#DELETEROW",
              deleteExpectation
          );
View Full Code Here

Examples of org.hibernate.jdbc.Expectation.canBeBatched()

        }
      }
     
      if ( isRowInsertEnabled() ) {
        final Expectation insertExpectation = Expectations.appropriateExpectation( getInsertCheckStyle() );
        boolean useBatch = insertExpectation.canBeBatched();
        boolean callable = isInsertCallable();
        if ( useBatch && insertRowBatchKey == null ) {
          insertRowBatchKey = new BasicBatchKey(
              getRole() + "#INSERTROW",
              insertExpectation
View Full Code Here

Examples of org.hibernate.jdbc.Expectation.canBeBatched()

    Expectation expectation = Expectations.appropriateExpectation( insertResultCheckStyles[j] );
    boolean callable = isInsertCallable( j );
    // we can't batch joined inserts, *especially* not if it is an identity insert;
    // nor can we batch statements where the expectation is based on an output param
    final boolean useBatch = j == 0 && expectation.canBeBatched();
    try {

      // Render the SQL query
      final PreparedStatement insert;
      if ( useBatch ) {
View Full Code Here

Examples of org.hibernate.jdbc.Expectation.canBeBatched()

          final SessionImplementor session) throws HibernateException {

    final boolean useVersion = j == 0 && isVersioned();
    final Expectation expectation = Expectations.appropriateExpectation( updateResultCheckStyles[j] );
    final boolean callable = isUpdateCallable( j );
    final boolean useBatch = j == 0 && expectation.canBeBatched() && isBatchable(); //note: updates to joined tables can't be batched...

    if ( log.isTraceEnabled() ) {
      log.trace( "Updating entity: " + MessageHelper.infoString( this, id, getFactory() ) );
      if ( useVersion ) {
        log.trace( "Existing version: " + oldVersion + " -> New version: " + fields[getVersionProperty()] );
View Full Code Here

Examples of org.hibernate.jdbc.Expectation.canBeBatched()

    }

    final boolean useVersion = j == 0 && isVersioned();
    final boolean callable = isDeleteCallable( j );
    final Expectation expectation = Expectations.appropriateExpectation( deleteResultCheckStyles[j] );
    final boolean useBatch = j == 0 && isBatchable() && expectation.canBeBatched();

    if ( log.isTraceEnabled() ) {
      log.trace( "Deleting entity: " + MessageHelper.infoString( this, id, getFactory() ) );
      if ( useVersion ) {
        log.trace( "Version: " + version );
View Full Code Here

Examples of org.hibernate.jdbc.Expectation.canBeBatched()

            if ( collection.needsUpdating( entry, i, elementType ) ) {  // will still be issued when it used to be null
              if ( st == null ) {
                String sql = getSQLDeleteRowString();
                if ( isDeleteCallable() ) {
                  expectation = Expectations.appropriateExpectation( getDeleteCheckStyle() );
                  useBatch = expectation.canBeBatched();
                  st = useBatch
                      ? session.getBatcher().prepareBatchCallableStatement( sql )
                            : session.getBatcher().prepareCallableStatement( sql );
                  offset += expectation.prepare( st );
                }
View Full Code Here

Examples of org.hibernate.jdbc.Expectation.canBeBatched()

      }
     
      if ( isRowInsertEnabled() ) {
        Expectation expectation = Expectations.appropriateExpectation( getInsertCheckStyle() );
        boolean callable = isInsertCallable();
        boolean useBatch = expectation.canBeBatched();
        String sql = getSQLInsertRowString();
        PreparedStatement st = null;
        // now update all changed or added rows fks
        try {
          int i = 0;
View Full Code Here

Examples of org.hibernate.jdbc.Expectation.canBeBatched()

    try {
      PreparedStatement st = null;
      Expectation expectation = Expectations.appropriateExpectation( getUpdateCheckStyle() );
      boolean callable = isUpdateCallable();
      boolean useBatch = expectation.canBeBatched();
      Iterator entries = collection.entries( this );
      String sql = getSQLUpdateRowString();
      int i = 0;
      int count = 0;
      while ( entries.hasNext() ) {
View Full Code Here

Examples of org.hibernate.jdbc.Expectation.canBeBatched()

    // TODO : shouldn't inserts be Expectations.NONE?
    final Expectation expectation = Expectations.appropriateExpectation( insertResultCheckStyles[j] );
    // we can't batch joined inserts, *especially* not if it is an identity insert;
    // nor can we batch statements where the expectation is based on an output param
    final boolean useBatch = j == 0 && expectation.canBeBatched();
    if ( useBatch && inserBatchKey == null ) {
      inserBatchKey = new BasicBatchKey(
          getEntityName() + "#INSERT",
          expectation
      );
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.