Package org.hibernate.engine.jdbc.spi

Examples of org.hibernate.engine.jdbc.spi.SqlStatementLogger.logStatement()


              ips.close();
            }
            qps.close();
          }

          statementLogger.logStatement( update, FormatStyle.BASIC.getFormatter() );
          PreparedStatement ups = connection.prepareStatement( update );
          try {
            value.copy().increment().bind( ups, 1 );
            value.bind( ups, 2 );
            rows = ups.executeUpdate();
View Full Code Here


                final IntegralDataTypeHolder value = IdentifierGeneratorHelper.getIntegralDataTypeHolder(
                    numberType
                );
                int rows;
                do {
                  statementLogger.logStatement( selectQuery, FormatStyle.BASIC.getFormatter() );
                  PreparedStatement selectStatement = connection.prepareStatement( selectQuery );
                  try {
                    final ResultSet selectRS = selectStatement.executeQuery();
                    if ( !selectRS.next() ) {
                      final String err = "could not read a hi value - you need to populate the table: " + tableName;
View Full Code Here

                  }
                  finally {
                    selectStatement.close();
                  }

                  statementLogger.logStatement( updateQuery, FormatStyle.BASIC.getFormatter() );
                  final PreparedStatement updatePS = connection.prepareStatement( updateQuery );
                  try {
                    final int increment = applyIncrementSizeToSourceValues ? incrementSize : 1;
                    final IntegralDataTypeHolder updateValue = value.copy().add( increment );
                    updateValue.bind( updatePS, 1 );
View Full Code Here

                    final IntegralDataTypeHolder value = IdentifierGeneratorHelper.getIntegralDataTypeHolder(
                        identifierType.getReturnedClass()
                    );
                    int rows;
                    do {
                      statementLogger.logStatement(
                          selectQuery,
                          FormatStyle.BASIC.getFormatter()
                      );
                      PreparedStatement selectPS = connection.prepareStatement( selectQuery );
                      try {
View Full Code Here

                        final 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

                      }
                      finally {
                        selectPS.close();
                      }

                      statementLogger.logStatement(
                          updateQuery,
                          FormatStyle.BASIC.getFormatter()
                      );
                      final PreparedStatement updatePS = connection.prepareStatement( updateQuery );
                      try {
View Full Code Here

            do {
              // The loop ensures atomicity of the
              // select + update even for no transaction
              // or read committed isolation level

              statementLogger.logStatement( query, FormatStyle.BASIC.getFormatter() );
              PreparedStatement qps = connection.prepareStatement( query );
              try {
                ResultSet rs = qps.executeQuery();
                if ( !rs.next() ) {
                  String err = "could not read a hi value - you need to populate the table: " + tableName;
View Full Code Here

              }
              finally {
                qps.close();
              }

              statementLogger.logStatement( update, FormatStyle.BASIC.getFormatter() );
              PreparedStatement ups = connection.prepareStatement( update );
              try {
                value.copy().increment().bind( ups, 1 );
                value.bind( ups, 2 );
                rows = ups.executeUpdate();
View Full Code Here

            do {
              // The loop ensures atomicity of the
              // select + update even for no transaction
              // or read committed isolation level

              statementLogger.logStatement( query, FormatStyle.BASIC.getFormatter() );
              PreparedStatement qps = connection.prepareStatement( query );
              try {
                ResultSet rs = qps.executeQuery();
                if ( !rs.next() ) {
                  String err = "could not read a hi value - you need to populate the table: " + tableName;
View Full Code Here

              }
              finally {
                qps.close();
              }

              statementLogger.logStatement( update, FormatStyle.BASIC.getFormatter() );
              PreparedStatement ups = connection.prepareStatement(update);
              try {
                value.copy().increment().bind( ups, 1 );
                value.bind( ups, 2 );
                rows = ups.executeUpdate();
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.