Package org.hibernate.id

Examples of org.hibernate.id.IntegralDataTypeHolder.bind()


          PreparedStatement insertPS = null;
          try {
            SQL_STATEMENT_LOGGER.logStatement( insertQuery, FormatStyle.BASIC );
            insertPS = conn.prepareStatement( insertQuery );
            insertPS.setString( 1, segmentValue );
            value.bind( insertPS, 2 );
            insertPS.execute();
          }
          finally {
            if ( insertPS != null ) {
              insertPS.close();
View Full Code Here


          updateValue.add( incrementSize );
        }
        else {
          updateValue.increment();
        }
        updateValue.bind( updatePS, 1 );
        value.bind( updatePS, 2 );
        updatePS.setString( 3, segmentValue );
        rows = updatePS.executeUpdate();
      }
      catch ( SQLException sqle ) {
View Full Code Here

                  final PreparedStatement updatePS = prepareStatement( connection, updateQuery, statementLogger, statsCollector );
                  try {
                    final int increment = applyIncrementSizeToSourceValues ? incrementSize : 1;
                    final IntegralDataTypeHolder updateValue = value.copy().add( increment );
                    updateValue.bind( updatePS, 1 );
                    value.bind( updatePS, 2 );
                    rows = executeUpdate( updatePS, statsCollector );
                  }
                  catch (SQLException e) {
                    LOG.unableToUpdateQueryHiValue( tableName, e );
View Full Code Here

                          value.initialize( initialValue );

                          final PreparedStatement insertPS = prepareStatement( connection, insertQuery, statementLogger, statsCollector );
                          try {
                            insertPS.setString( 1, segmentValue );
                            value.bind( insertPS, 2 );
                            executeUpdate( insertPS, statsCollector );
                          }
                          finally {
                            insertPS.close();
                          }
View Full Code Here

                          updateValue.add( incrementSize );
                        }
                        else {
                          updateValue.increment();
                        }
                        updateValue.bind( updatePS, 1 );
                        value.bind( updatePS, 2 );
                        updatePS.setString( 3, segmentValue );
                        rows = executeUpdate( updatePS, statsCollector );
                      }
                      catch (SQLException e) {
View Full Code Here

                  statementLogger.logStatement( updateQuery, FormatStyle.BASIC.getFormatter() );
                  PreparedStatement updatePS = connection.prepareStatement( updateQuery );
                  try {
                    final int increment = applyIncrementSizeToSourceValues ? incrementSize : 1;
                    final IntegralDataTypeHolder updateValue = value.copy().add( increment );
                    updateValue.bind( updatePS, 1 );
                    value.bind( updatePS, 2 );
                    rows = updatePS.executeUpdate();
                  }
                  catch ( SQLException e ) {
                      LOG.unableToUpdateQueryHiValue(tableName, e);
View Full Code Here

                          PreparedStatement insertPS = null;
                          try {
                            statementLogger.logStatement( insertQuery, FormatStyle.BASIC.getFormatter() );
                            insertPS = connection.prepareStatement( insertQuery );
                            insertPS.setString( 1, segmentValue );
                            value.bind( insertPS, 2 );
                            insertPS.execute();
                          }
                          finally {
                            if ( insertPS != null ) {
                              insertPS.close();
View Full Code Here

                          updateValue.add( incrementSize );
                        }
                        else {
                          updateValue.increment();
                        }
                        updateValue.bind( updatePS, 1 );
                        value.bind( updatePS, 2 );
                        updatePS.setString( 3, segmentValue );
                        rows = updatePS.executeUpdate();
                      }
                      catch ( SQLException e ) {
View Full Code Here

      SQL_STATEMENT_LOGGER.logStatement( updateQuery, FormatStyle.BASIC );
      PreparedStatement updatePS = conn.prepareStatement( updateQuery );
      try {
        final int increment = applyIncrementSizeToSourceValues ? incrementSize : 1;
        final IntegralDataTypeHolder updateValue = value.copy().add( increment );
        updateValue.bind( updatePS, 1 );
        value.bind( updatePS, 2 );
        rows = updatePS.executeUpdate();
      }
      catch ( SQLException sqle ) {
        log.error( "could not updateQuery hi value in: " + tableName, sqle );
View Full Code Here

          PreparedStatement insertPS = null;
          try {
            SQL_STATEMENT_LOGGER.logStatement( insertQuery, FormatStyle.BASIC );
            insertPS = conn.prepareStatement( insertQuery );
            insertPS.setString( 1, segmentValue );
            value.bind( insertPS, 2 );
            insertPS.execute();
          }
          finally {
            if ( insertPS != null ) {
              insertPS.close();
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.