public class org.hibernate.id.IncrementGenerator implements org.hibernate.id.IdentifierGenerator, org.hibernate.id.Configurable
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.hibernate.id.IncrementGenerator
super_class: java.lang.Object
{
private static final org.hibernate.internal.CoreMessageLogger LOG;
descriptor: Lorg/hibernate/internal/CoreMessageLogger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private java.lang.Class returnClass;
descriptor: Ljava/lang/Class;
flags: (0x0002) ACC_PRIVATE
private java.lang.String sql;
descriptor: Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
private org.hibernate.id.IntegralDataTypeHolder previousValueHolder;
descriptor: Lorg/hibernate/id/IntegralDataTypeHolder;
flags: (0x0002) ACC_PRIVATE
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lorg/hibernate/id/IncrementGenerator;
invokestatic org.hibernate.internal.CoreLogging.messageLogger:(Ljava/lang/Class;)Lorg/hibernate/internal/CoreMessageLogger;
putstatic org.hibernate.id.IncrementGenerator.LOG:Lorg/hibernate/internal/CoreMessageLogger;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/hibernate/id/IncrementGenerator;
public synchronized java.io.Serializable generate(org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object);
descriptor: (Lorg/hibernate/engine/spi/SharedSessionContractImplementor;Ljava/lang/Object;)Ljava/io/Serializable;
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield org.hibernate.id.IncrementGenerator.sql:Ljava/lang/String;
ifnull 2
1: aload 0
aload 1
invokevirtual org.hibernate.id.IncrementGenerator.initializePreviousValueHolder:(Lorg/hibernate/engine/spi/SharedSessionContractImplementor;)V
2: StackMap locals:
StackMap stack:
aload 0
getfield org.hibernate.id.IncrementGenerator.previousValueHolder:Lorg/hibernate/id/IntegralDataTypeHolder;
invokeinterface org.hibernate.id.IntegralDataTypeHolder.makeValueThenIncrement:()Ljava/lang/Number;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/hibernate/id/IncrementGenerator;
0 3 1 session Lorg/hibernate/engine/spi/SharedSessionContractImplementor;
0 3 2 object Ljava/lang/Object;
Exceptions:
throws org.hibernate.HibernateException
MethodParameters:
Name Flags
session
object
public void configure(org.hibernate.type.Type, java.util.Properties, org.hibernate.service.ServiceRegistry);
descriptor: (Lorg/hibernate/type/Type;Ljava/util/Properties;Lorg/hibernate/service/ServiceRegistry;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=14, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 1
invokeinterface org.hibernate.type.Type.getReturnedClass:()Ljava/lang/Class;
putfield org.hibernate.id.IncrementGenerator.returnClass:Ljava/lang/Class;
1: aload 3
ldc Lorg/hibernate/engine/jdbc/env/spi/JdbcEnvironment;
invokeinterface org.hibernate.service.ServiceRegistry.getService:(Ljava/lang/Class;)Lorg/hibernate/service/Service;
checkcast org.hibernate.engine.jdbc.env.spi.JdbcEnvironment
astore 4
start local 4 2: aload 2
ldc "identifier_normalizer"
invokevirtual java.util.Properties.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast org.hibernate.boot.model.naming.ObjectNameNormalizer
3: astore 5
start local 5 4: aload 2
ldc "column"
invokevirtual java.util.Properties.getProperty:(Ljava/lang/String;)Ljava/lang/String;
astore 6
start local 6 5: aload 6
ifnonnull 7
6: aload 2
ldc "target_column"
invokevirtual java.util.Properties.getProperty:(Ljava/lang/String;)Ljava/lang/String;
astore 6
7: StackMap locals: org.hibernate.engine.jdbc.env.spi.JdbcEnvironment org.hibernate.boot.model.naming.ObjectNameNormalizer java.lang.String
StackMap stack:
aload 5
aload 6
invokevirtual org.hibernate.boot.model.naming.ObjectNameNormalizer.normalizeIdentifierQuoting:(Ljava/lang/String;)Lorg/hibernate/boot/model/naming/Identifier;
aload 4
invokeinterface org.hibernate.engine.jdbc.env.spi.JdbcEnvironment.getDialect:()Lorg/hibernate/dialect/Dialect;
invokevirtual org.hibernate.boot.model.naming.Identifier.render:(Lorg/hibernate/dialect/Dialect;)Ljava/lang/String;
astore 6
8: aload 2
ldc "tables"
invokevirtual java.util.Properties.getProperty:(Ljava/lang/String;)Ljava/lang/String;
astore 7
start local 7 9: aload 7
ifnonnull 11
10: aload 2
ldc "identity_tables"
invokevirtual java.util.Properties.getProperty:(Ljava/lang/String;)Ljava/lang/String;
astore 7
11: StackMap locals: java.lang.String
StackMap stack:
ldc ", "
aload 7
invokestatic org.hibernate.internal.util.StringHelper.split:(Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;
astore 8
start local 8 12: aload 5
13: aload 2
ldc "schema"
invokevirtual java.util.Properties.getProperty:(Ljava/lang/String;)Ljava/lang/String;
14: invokevirtual org.hibernate.boot.model.naming.ObjectNameNormalizer.toDatabaseIdentifierText:(Ljava/lang/String;)Ljava/lang/String;
astore 9
start local 9 15: aload 5
16: aload 2
ldc "catalog"
invokevirtual java.util.Properties.getProperty:(Ljava/lang/String;)Ljava/lang/String;
17: invokevirtual org.hibernate.boot.model.naming.ObjectNameNormalizer.toDatabaseIdentifierText:(Ljava/lang/String;)Ljava/lang/String;
astore 10
start local 10 18: new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
astore 11
start local 11 19: iconst_0
istore 12
start local 12 20: goto 28
21: StackMap locals: org.hibernate.id.IncrementGenerator org.hibernate.type.Type java.util.Properties org.hibernate.service.ServiceRegistry org.hibernate.engine.jdbc.env.spi.JdbcEnvironment org.hibernate.boot.model.naming.ObjectNameNormalizer java.lang.String java.lang.String java.lang.String[] java.lang.String java.lang.String java.lang.StringBuilder int
StackMap stack:
aload 5
aload 8
iload 12
aaload
invokevirtual org.hibernate.boot.model.naming.ObjectNameNormalizer.toDatabaseIdentifierText:(Ljava/lang/String;)Ljava/lang/String;
astore 13
start local 13 22: aload 8
arraylength
iconst_1
if_icmple 24
23: aload 11
ldc "select max("
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 6
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc ") as mx from "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
24: StackMap locals: java.lang.String
StackMap stack:
aload 11
aload 10
aload 9
aload 13
invokestatic org.hibernate.mapping.Table.qualify:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
25: iload 12
aload 8
arraylength
iconst_1
isub
if_icmpge 27
26: aload 11
ldc " union "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
end local 13 27: StackMap locals:
StackMap stack:
iinc 12 1
StackMap locals:
StackMap stack:
28: iload 12
aload 8
arraylength
if_icmplt 21
end local 12 29: aload 8
arraylength
iconst_1
if_icmple 32
30: aload 11
iconst_0
ldc "( "
invokevirtual java.lang.StringBuilder.insert:(ILjava/lang/String;)Ljava/lang/StringBuilder;
ldc " ) ids_"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
31: ldc "ids_.mx"
astore 6
32: StackMap locals:
StackMap stack:
aload 0
new java.lang.StringBuilder
dup
ldc "select max("
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 6
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc ") from "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 11
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
putfield org.hibernate.id.IncrementGenerator.sql:Ljava/lang/String;
33: return
end local 11 end local 10 end local 9 end local 8 end local 7 end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 34 0 this Lorg/hibernate/id/IncrementGenerator;
0 34 1 type Lorg/hibernate/type/Type;
0 34 2 params Ljava/util/Properties;
0 34 3 serviceRegistry Lorg/hibernate/service/ServiceRegistry;
2 34 4 jdbcEnvironment Lorg/hibernate/engine/jdbc/env/spi/JdbcEnvironment;
4 34 5 normalizer Lorg/hibernate/boot/model/naming/ObjectNameNormalizer;
5 34 6 column Ljava/lang/String;
9 34 7 tableList Ljava/lang/String;
12 34 8 tables [Ljava/lang/String;
15 34 9 schema Ljava/lang/String;
18 34 10 catalog Ljava/lang/String;
19 34 11 buf Ljava/lang/StringBuilder;
20 29 12 i I
22 27 13 tableName Ljava/lang/String;
Exceptions:
throws org.hibernate.MappingException
MethodParameters:
Name Flags
type
params
serviceRegistry
private void initializePreviousValueHolder(org.hibernate.engine.spi.SharedSessionContractImplementor);
descriptor: (Lorg/hibernate/engine/spi/SharedSessionContractImplementor;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=7, args_size=2
start local 0 start local 1 0: aload 0
aload 0
getfield org.hibernate.id.IncrementGenerator.returnClass:Ljava/lang/Class;
invokestatic org.hibernate.id.IdentifierGeneratorHelper.getIntegralDataTypeHolder:(Ljava/lang/Class;)Lorg/hibernate/id/IntegralDataTypeHolder;
putfield org.hibernate.id.IncrementGenerator.previousValueHolder:Lorg/hibernate/id/IntegralDataTypeHolder;
1: getstatic org.hibernate.id.IncrementGenerator.LOG:Lorg/hibernate/internal/CoreMessageLogger;
invokeinterface org.hibernate.internal.CoreMessageLogger.isDebugEnabled:()Z
istore 2
start local 2 2: iload 2
ifeq 4
3: getstatic org.hibernate.id.IncrementGenerator.LOG:Lorg/hibernate/internal/CoreMessageLogger;
ldc "Fetching initial value: %s"
aload 0
getfield org.hibernate.id.IncrementGenerator.sql:Ljava/lang/String;
invokeinterface org.hibernate.internal.CoreMessageLogger.debugf:(Ljava/lang/String;Ljava/lang/Object;)V
4: StackMap locals: int
StackMap stack:
aload 1
invokeinterface org.hibernate.engine.spi.SharedSessionContractImplementor.getJdbcCoordinator:()Lorg/hibernate/engine/jdbc/spi/JdbcCoordinator;
invokeinterface org.hibernate.engine.jdbc.spi.JdbcCoordinator.getStatementPreparer:()Lorg/hibernate/engine/jdbc/spi/StatementPreparer;
aload 0
getfield org.hibernate.id.IncrementGenerator.sql:Ljava/lang/String;
invokeinterface org.hibernate.engine.jdbc.spi.StatementPreparer.prepareStatement:(Ljava/lang/String;)Ljava/sql/PreparedStatement;
astore 3
start local 3 5: aload 1
invokeinterface org.hibernate.engine.spi.SharedSessionContractImplementor.getJdbcCoordinator:()Lorg/hibernate/engine/jdbc/spi/JdbcCoordinator;
invokeinterface org.hibernate.engine.jdbc.spi.JdbcCoordinator.getResultSetReturn:()Lorg/hibernate/engine/jdbc/spi/ResultSetReturn;
aload 3
invokeinterface org.hibernate.engine.jdbc.spi.ResultSetReturn.extract:(Ljava/sql/PreparedStatement;)Ljava/sql/ResultSet;
astore 4
start local 4 6: aload 4
invokeinterface java.sql.ResultSet.next:()Z
ifeq 9
7: aload 0
getfield org.hibernate.id.IncrementGenerator.previousValueHolder:Lorg/hibernate/id/IntegralDataTypeHolder;
aload 4
lconst_0
invokeinterface org.hibernate.id.IntegralDataTypeHolder.initialize:(Ljava/sql/ResultSet;J)Lorg/hibernate/id/IntegralDataTypeHolder;
invokeinterface org.hibernate.id.IntegralDataTypeHolder.increment:()Lorg/hibernate/id/IntegralDataTypeHolder;
pop
8: goto 10
9: StackMap locals: java.sql.PreparedStatement java.sql.ResultSet
StackMap stack:
aload 0
getfield org.hibernate.id.IncrementGenerator.previousValueHolder:Lorg/hibernate/id/IntegralDataTypeHolder;
lconst_1
invokeinterface org.hibernate.id.IntegralDataTypeHolder.initialize:(J)Lorg/hibernate/id/IntegralDataTypeHolder;
pop
10: StackMap locals:
StackMap stack:
aload 0
aconst_null
putfield org.hibernate.id.IncrementGenerator.sql:Ljava/lang/String;
11: iload 2
ifeq 17
12: getstatic org.hibernate.id.IncrementGenerator.LOG:Lorg/hibernate/internal/CoreMessageLogger;
ldc "First free id: %s"
aload 0
getfield org.hibernate.id.IncrementGenerator.previousValueHolder:Lorg/hibernate/id/IntegralDataTypeHolder;
invokeinterface org.hibernate.id.IntegralDataTypeHolder.makeValue:()Ljava/lang/Number;
invokeinterface org.hibernate.internal.CoreMessageLogger.debugf:(Ljava/lang/String;Ljava/lang/Object;)V
13: goto 17
14: StackMap locals:
StackMap stack: java.lang.Throwable
astore 5
15: aload 1
invokeinterface org.hibernate.engine.spi.SharedSessionContractImplementor.getJdbcCoordinator:()Lorg/hibernate/engine/jdbc/spi/JdbcCoordinator;
invokeinterface org.hibernate.engine.jdbc.spi.JdbcCoordinator.getLogicalConnection:()Lorg/hibernate/resource/jdbc/spi/LogicalConnectionImplementor;
invokeinterface org.hibernate.resource.jdbc.spi.LogicalConnectionImplementor.getResourceRegistry:()Lorg/hibernate/resource/jdbc/ResourceRegistry;
aload 4
aload 3
invokeinterface org.hibernate.resource.jdbc.ResourceRegistry.release:(Ljava/sql/ResultSet;Ljava/sql/Statement;)V
16: aload 5
athrow
17: StackMap locals:
StackMap stack:
aload 1
invokeinterface org.hibernate.engine.spi.SharedSessionContractImplementor.getJdbcCoordinator:()Lorg/hibernate/engine/jdbc/spi/JdbcCoordinator;
invokeinterface org.hibernate.engine.jdbc.spi.JdbcCoordinator.getLogicalConnection:()Lorg/hibernate/resource/jdbc/spi/LogicalConnectionImplementor;
invokeinterface org.hibernate.resource.jdbc.spi.LogicalConnectionImplementor.getResourceRegistry:()Lorg/hibernate/resource/jdbc/ResourceRegistry;
aload 4
aload 3
invokeinterface org.hibernate.resource.jdbc.ResourceRegistry.release:(Ljava/sql/ResultSet;Ljava/sql/Statement;)V
end local 4 18: goto 23
19: StackMap locals: org.hibernate.id.IncrementGenerator org.hibernate.engine.spi.SharedSessionContractImplementor int java.sql.PreparedStatement
StackMap stack: java.lang.Throwable
astore 6
20: aload 1
invokeinterface org.hibernate.engine.spi.SharedSessionContractImplementor.getJdbcCoordinator:()Lorg/hibernate/engine/jdbc/spi/JdbcCoordinator;
invokeinterface org.hibernate.engine.jdbc.spi.JdbcCoordinator.getLogicalConnection:()Lorg/hibernate/resource/jdbc/spi/LogicalConnectionImplementor;
invokeinterface org.hibernate.resource.jdbc.spi.LogicalConnectionImplementor.getResourceRegistry:()Lorg/hibernate/resource/jdbc/ResourceRegistry;
aload 3
invokeinterface org.hibernate.resource.jdbc.ResourceRegistry.release:(Ljava/sql/Statement;)V
21: aload 1
invokeinterface org.hibernate.engine.spi.SharedSessionContractImplementor.getJdbcCoordinator:()Lorg/hibernate/engine/jdbc/spi/JdbcCoordinator;
invokeinterface org.hibernate.engine.jdbc.spi.JdbcCoordinator.afterStatementExecution:()V
22: aload 6
athrow
23: StackMap locals:
StackMap stack:
aload 1
invokeinterface org.hibernate.engine.spi.SharedSessionContractImplementor.getJdbcCoordinator:()Lorg/hibernate/engine/jdbc/spi/JdbcCoordinator;
invokeinterface org.hibernate.engine.jdbc.spi.JdbcCoordinator.getLogicalConnection:()Lorg/hibernate/resource/jdbc/spi/LogicalConnectionImplementor;
invokeinterface org.hibernate.resource.jdbc.spi.LogicalConnectionImplementor.getResourceRegistry:()Lorg/hibernate/resource/jdbc/ResourceRegistry;
aload 3
invokeinterface org.hibernate.resource.jdbc.ResourceRegistry.release:(Ljava/sql/Statement;)V
24: aload 1
invokeinterface org.hibernate.engine.spi.SharedSessionContractImplementor.getJdbcCoordinator:()Lorg/hibernate/engine/jdbc/spi/JdbcCoordinator;
invokeinterface org.hibernate.engine.jdbc.spi.JdbcCoordinator.afterStatementExecution:()V
end local 3 25: goto 32
26: StackMap locals: org.hibernate.id.IncrementGenerator org.hibernate.engine.spi.SharedSessionContractImplementor int
StackMap stack: java.sql.SQLException
astore 3
start local 3 27: aload 1
invokeinterface org.hibernate.engine.spi.SharedSessionContractImplementor.getJdbcServices:()Lorg/hibernate/engine/jdbc/spi/JdbcServices;
invokeinterface org.hibernate.engine.jdbc.spi.JdbcServices.getSqlExceptionHelper:()Lorg/hibernate/engine/jdbc/spi/SqlExceptionHelper;
28: aload 3
29: ldc "could not fetch initial value for increment generator"
30: aload 0
getfield org.hibernate.id.IncrementGenerator.sql:Ljava/lang/String;
31: invokevirtual org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert:(Ljava/sql/SQLException;Ljava/lang/String;Ljava/lang/String;)Lorg/hibernate/JDBCException;
athrow
end local 3 32: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 33 0 this Lorg/hibernate/id/IncrementGenerator;
0 33 1 session Lorg/hibernate/engine/spi/SharedSessionContractImplementor;
2 33 2 debugEnabled Z
5 25 3 st Ljava/sql/PreparedStatement;
6 18 4 rs Ljava/sql/ResultSet;
27 32 3 sqle Ljava/sql/SQLException;
Exception table:
from to target type
6 14 14 any
5 19 19 any
4 25 26 Class java.sql.SQLException
MethodParameters:
Name Flags
session
}
SourceFile: "IncrementGenerator.java"