Package org.hibernate.id

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


                    if ( !selectRS.next() ) {
                      String err = "could not read a hi value - you need to populate the table: " + tableName;
                      LOG.error( err );
                      throw new IdentifierGenerationException( err );
                    }
                    value.initialize( selectRS, 1 );
                    selectRS.close();
                  }
                  catch ( SQLException sqle ) {
                    LOG.error( "could not read a hi value", sqle );
                    throw sqle;
View Full Code Here


                      PreparedStatement selectPS = connection.prepareStatement( selectQuery );
                      try {
                        selectPS.setString( 1, segmentValue );
                        ResultSet selectRS = selectPS.executeQuery();
                        if ( !selectRS.next() ) {
                          value.initialize( initialValue );
                          PreparedStatement insertPS = null;
                          try {
                            statementLogger.logStatement( insertQuery, FormatStyle.BASIC.getFormatter() );
                            insertPS = connection.prepareStatement( insertQuery );
                            insertPS.setString( 1, segmentValue );
View Full Code Here

                              insertPS.close();
                            }
                          }
                        }
                        else {
                          value.initialize( selectRS, 1 );
                        }
                        selectRS.close();
                      }
                      catch ( SQLException e ) {
                          LOG.unableToReadOrInitHiValue(e);
View Full Code Here

                      PreparedStatement selectPS = connection.prepareStatement( selectQuery );
                      try {
                        selectPS.setString( 1, segmentValue );
                        ResultSet selectRS = selectPS.executeQuery();
                        if ( !selectRS.next() ) {
                          value.initialize( initialValue );
                          PreparedStatement insertPS = null;
                          try {
                            statementLogger.logStatement( insertQuery, FormatStyle.BASIC.getFormatter() );
                            insertPS = connection.prepareStatement( insertQuery );
                            insertPS.setString( 1, segmentValue );
View Full Code Here

                              insertPS.close();
                            }
                          }
                        }
                        else {
                          value.initialize( selectRS, 1 );
                        }
                        selectRS.close();
                      }
                      catch ( SQLException e ) {
                          LOG.unableToReadOrInitHiValue(e);
View Full Code Here

          try {
            ResultSet rs = session.getTransactionCoordinator().getJdbcCoordinator().getResultSetReturn().extract( st );
            try {
              rs.next();
              IntegralDataTypeHolder value = IdentifierGeneratorHelper.getIntegralDataTypeHolder( numberType );
              value.initialize( rs, 1 );
              if ( LOG.isDebugEnabled() ) {
                LOG.debugf( "Sequence value obtained: %s", value.makeValue() );
              }
              return value;
            }
View Full Code Here

                    if ( !selectRS.next() ) {
                      String err = "could not read a hi value - you need to populate the table: " + tableName;
                      LOG.error( err );
                      throw new IdentifierGenerationException( err );
                    }
                    value.initialize( selectRS, 1 );
                    selectRS.close();
                  }
                  catch ( SQLException sqle ) {
                    LOG.error( "could not read a hi value", sqle );
                    throw sqle;
View Full Code Here

                    if ( !selectRS.next() ) {
                      String err = "could not read a hi value - you need to populate the table: " + tableName;
                      LOG.error( err );
                      throw new IdentifierGenerationException( err );
                    }
                    value.initialize( selectRS, 1 );
                    selectRS.close();
                  }
                  catch ( SQLException sqle ) {
                    LOG.error( "could not read a hi value", sqle );
                    throw sqle;
View Full Code Here

                      PreparedStatement selectPS = connection.prepareStatement( selectQuery );
                      try {
                        selectPS.setString( 1, segmentValue );
                        ResultSet selectRS = selectPS.executeQuery();
                        if ( !selectRS.next() ) {
                          value.initialize( initialValue );
                          PreparedStatement insertPS = null;
                          try {
                            statementLogger.logStatement( insertQuery, FormatStyle.BASIC.getFormatter() );
                            insertPS = connection.prepareStatement( insertQuery );
                            insertPS.setString( 1, segmentValue );
View Full Code Here

                              insertPS.close();
                            }
                          }
                        }
                        else {
                          value.initialize( selectRS, 1 );
                        }
                        selectRS.close();
                      }
                      catch ( SQLException e ) {
                          LOG.unableToReadOrInitHiValue(e);
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.