Package org.hibernate.jdbc

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


                  expectation = Expectations.appropriateExpectation( getDeleteCheckStyle() );
                  useBatch = expectation.canBeBatched();
                  st = useBatch
                      ? session.getBatcher().prepareBatchCallableStatement( sql )
                            : session.getBatcher().prepareCallableStatement( sql );
                  offset += expectation.prepare( st );
                }
                else {
                  st = session.getBatcher().prepareBatchStatement( getSQLDeleteRowString() );
                }
              }
View Full Code Here


                else {
                  st = session.getBatcher().prepareStatement( sql );
                }
              }

              offset += expectation.prepare( st );

              int loc = writeKey( st, id, offset, session );
              if ( hasIndex && !indexContainsFormula ) {
                loc = writeIndexToWhere( st, collection.getIndex( entry, i, this ), loc, session );
              }
View Full Code Here

              st = session.getBatcher().prepareStatement( sql );
            }
          }

          try {
            offset+= expectation.prepare( st );
            int loc = writeElement( st, collection.getElement( entry ), offset, session );
            if ( hasIdentifier ) {
              writeIdentifier( st, collection.getIdentifier( entry, i ), loc, session );
            }
            else {
View Full Code Here

        }
      }

      try {
        int index = 1;
        index += expectation.prepare( insert );

        // Write the values of fields onto the prepared statement - we MUST use the state at the time the
        // insert was issued (cos of foreign key constraints). Not necessarily the object's current state

        dehydrate( id, fields, null, notNull, propertyColumnInsertable, j, insert, session, index );
View Full Code Here

        }
      }

      try {

        index+= expectation.prepare( update );

        //Now write the values of fields onto the prepared statement
        index = dehydrate( id, fields, rowId, includeProperty, propertyColumnUpdateable, j, update, session, index );

        // Write any appropriate versioning conditional parameters
View Full Code Here

        }
      }

      try {

        index += expectation.prepare( delete );

        // Do the key. The key is immutable so we can use the _current_ object state - not necessarily
        // the state at the time the delete was issued
        getIdentifierType().nullSafeSet( delete, id, index, session );
        index += getIdentifierColumnSpan();
View Full Code Here

          }
        }


        try {
          offset+= expectation.prepare( st );

          writeKey( st, id, offset, session );
          if ( useBatch ) {
            session.getBatcher().addToBatch( expectation );
          }
View Full Code Here

                }
              }


              try {
                offset+= expectation.prepare( st );

                //TODO: copy/paste from insertRows()
                int loc = writeKey( st, id, offset, session );
                if ( hasIdentifier ) {
                  loc = writeIdentifier( st, collection.getIdentifier(entry, i), loc, session );
View Full Code Here

                st = session.getBatcher().prepareStatement( sql );
              }
            }

            try {
              expectation.prepare( st );

              Object entry = deletes.next();
              int loc = offset;
              if ( hasIdentifier ) {
                writeIdentifier( st, entry, loc, session );
View Full Code Here

                st = session.getBatcher().prepareStatement( sql );
              }
            }

            try {
              offset += expectation.prepare( st );
              //TODO: copy/paste from recreate()
              offset = writeKey( st, id, offset, session );
              if ( hasIdentifier ) {
                offset = writeIdentifier( st, collection.getIdentifier(entry, i), offset, session );
              }
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.