Package org.hibernate.jdbc

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


                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

        }
      }

      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

                    .getStatementPreparer()
                    .prepareStatement( sql, callable );
              }

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

                    .getJdbcCoordinator()
                    .getStatementPreparer()
                    .prepareStatement( sql, callable );
              }

              offset += insertExpectation.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

            .prepareStatement( sql, callable );
      }

      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, false );
View Full Code Here

            .getStatementPreparer()
            .prepareStatement( sql, callable );
      }

      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, true );

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

            .prepareStatement( sql, callable );
      }

      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

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.