Package org.hibernate.id

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


                           
                            //Update the counter row, if rows returns 0 the update failed due to a race condition, it will be retried
                            rows = jdbcOperations.update(UPDATE_QUERY, new PreparedStatementSetter() {
                                @Override
                                public void setValues(PreparedStatement ps) throws SQLException {
                                    updateValue.bind(ps, 1);
                                    ps.setString(2, counterName);
                                    value.bind(ps, 3);
                                }
                            });
                        } while (rows == 0);
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

          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

                          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

          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

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.