public class org.hibernate.dialect.lock.UpdateLockingStrategy implements org.hibernate.dialect.lock.LockingStrategy
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.hibernate.dialect.lock.UpdateLockingStrategy
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 final org.hibernate.persister.entity.Lockable lockable;
descriptor: Lorg/hibernate/persister/entity/Lockable;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.hibernate.LockMode lockMode;
descriptor: Lorg/hibernate/LockMode;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.String sql;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: ldc Lorg/hibernate/internal/CoreMessageLogger;
1: ldc Lorg/hibernate/dialect/lock/UpdateLockingStrategy;
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
2: invokestatic org.jboss.logging.Logger.getMessageLogger:(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Object;
checkcast org.hibernate.internal.CoreMessageLogger
putstatic org.hibernate.dialect.lock.UpdateLockingStrategy.LOG:Lorg/hibernate/internal/CoreMessageLogger;
3: return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(org.hibernate.persister.entity.Lockable, org.hibernate.LockMode);
descriptor: (Lorg/hibernate/persister/entity/Lockable;Lorg/hibernate/LockMode;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
putfield org.hibernate.dialect.lock.UpdateLockingStrategy.lockable:Lorg/hibernate/persister/entity/Lockable;
2: aload 0
aload 2
putfield org.hibernate.dialect.lock.UpdateLockingStrategy.lockMode:Lorg/hibernate/LockMode;
3: aload 2
getstatic org.hibernate.LockMode.UPGRADE:Lorg/hibernate/LockMode;
invokevirtual org.hibernate.LockMode.lessThan:(Lorg/hibernate/LockMode;)Z
ifeq 5
4: new org.hibernate.HibernateException
dup
new java.lang.StringBuilder
dup
ldc "["
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 2
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc "] not valid for update statement"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial org.hibernate.HibernateException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals: org.hibernate.dialect.lock.UpdateLockingStrategy org.hibernate.persister.entity.Lockable org.hibernate.LockMode
StackMap stack:
aload 1
invokeinterface org.hibernate.persister.entity.Lockable.isVersioned:()Z
ifne 9
6: getstatic org.hibernate.dialect.lock.UpdateLockingStrategy.LOG:Lorg/hibernate/internal/CoreMessageLogger;
aload 1
invokeinterface org.hibernate.persister.entity.Lockable.getEntityName:()Ljava/lang/String;
invokeinterface org.hibernate.internal.CoreMessageLogger.writeLocksNotSupported:(Ljava/lang/String;)V
7: aload 0
aconst_null
putfield org.hibernate.dialect.lock.UpdateLockingStrategy.sql:Ljava/lang/String;
8: goto 10
9: StackMap locals:
StackMap stack:
aload 0
aload 0
invokevirtual org.hibernate.dialect.lock.UpdateLockingStrategy.generateLockString:()Ljava/lang/String;
putfield org.hibernate.dialect.lock.UpdateLockingStrategy.sql:Ljava/lang/String;
10: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/hibernate/dialect/lock/UpdateLockingStrategy;
0 11 1 lockable Lorg/hibernate/persister/entity/Lockable;
0 11 2 lockMode Lorg/hibernate/LockMode;
MethodParameters:
Name Flags
lockable
lockMode
public void lock(java.io.Serializable, java.lang.Object, java.lang.Object, int, org.hibernate.engine.spi.SharedSessionContractImplementor);
descriptor: (Ljava/io/Serializable;Ljava/lang/Object;Ljava/lang/Object;ILorg/hibernate/engine/spi/SharedSessionContractImplementor;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=11, args_size=6
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 0: aload 0
getfield org.hibernate.dialect.lock.UpdateLockingStrategy.lockable:Lorg/hibernate/persister/entity/Lockable;
invokeinterface org.hibernate.persister.entity.Lockable.isVersioned:()Z
ifne 2
1: new org.hibernate.HibernateException
dup
new java.lang.StringBuilder
dup
ldc "write locks via update not supported for non-versioned entities ["
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield org.hibernate.dialect.lock.UpdateLockingStrategy.lockable:Lorg/hibernate/persister/entity/Lockable;
invokeinterface org.hibernate.persister.entity.Lockable.getEntityName:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "]"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial org.hibernate.HibernateException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 5
invokeinterface org.hibernate.engine.spi.SharedSessionContractImplementor.getFactory:()Lorg/hibernate/engine/spi/SessionFactoryImplementor;
astore 6
start local 6 3: aload 5
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.dialect.lock.UpdateLockingStrategy.sql:Ljava/lang/String;
invokeinterface org.hibernate.engine.jdbc.spi.StatementPreparer.prepareStatement:(Ljava/lang/String;)Ljava/sql/PreparedStatement;
astore 7
start local 7 4: aload 0
getfield org.hibernate.dialect.lock.UpdateLockingStrategy.lockable:Lorg/hibernate/persister/entity/Lockable;
invokeinterface org.hibernate.persister.entity.Lockable.getVersionType:()Lorg/hibernate/type/VersionType;
aload 7
aload 2
iconst_1
aload 5
invokeinterface org.hibernate.type.VersionType.nullSafeSet:(Ljava/sql/PreparedStatement;Ljava/lang/Object;ILorg/hibernate/engine/spi/SharedSessionContractImplementor;)V
5: iconst_2
istore 8
start local 8 6: aload 0
getfield org.hibernate.dialect.lock.UpdateLockingStrategy.lockable:Lorg/hibernate/persister/entity/Lockable;
invokeinterface org.hibernate.persister.entity.Lockable.getIdentifierType:()Lorg/hibernate/type/Type;
aload 7
aload 1
iload 8
aload 5
invokeinterface org.hibernate.type.Type.nullSafeSet:(Ljava/sql/PreparedStatement;Ljava/lang/Object;ILorg/hibernate/engine/spi/SharedSessionContractImplementor;)V
7: iload 8
aload 0
getfield org.hibernate.dialect.lock.UpdateLockingStrategy.lockable:Lorg/hibernate/persister/entity/Lockable;
invokeinterface org.hibernate.persister.entity.Lockable.getIdentifierType:()Lorg/hibernate/type/Type;
aload 6
invokeinterface org.hibernate.type.Type.getColumnSpan:(Lorg/hibernate/engine/spi/Mapping;)I
iadd
istore 8
8: aload 0
getfield org.hibernate.dialect.lock.UpdateLockingStrategy.lockable:Lorg/hibernate/persister/entity/Lockable;
invokeinterface org.hibernate.persister.entity.Lockable.isVersioned:()Z
ifeq 10
9: aload 0
getfield org.hibernate.dialect.lock.UpdateLockingStrategy.lockable:Lorg/hibernate/persister/entity/Lockable;
invokeinterface org.hibernate.persister.entity.Lockable.getVersionType:()Lorg/hibernate/type/VersionType;
aload 7
aload 2
iload 8
aload 5
invokeinterface org.hibernate.type.VersionType.nullSafeSet:(Ljava/sql/PreparedStatement;Ljava/lang/Object;ILorg/hibernate/engine/spi/SharedSessionContractImplementor;)V
10: StackMap locals: org.hibernate.engine.spi.SessionFactoryImplementor java.sql.PreparedStatement int
StackMap stack:
aload 5
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 7
invokeinterface org.hibernate.engine.jdbc.spi.ResultSetReturn.executeUpdate:(Ljava/sql/PreparedStatement;)I
istore 9
start local 9 11: iload 9
ifge 19
12: aload 6
invokeinterface org.hibernate.engine.spi.SessionFactoryImplementor.getStatistics:()Lorg/hibernate/stat/spi/StatisticsImplementor;
invokeinterface org.hibernate.stat.spi.StatisticsImplementor.isStatisticsEnabled:()Z
ifeq 14
13: aload 6
invokeinterface org.hibernate.engine.spi.SessionFactoryImplementor.getStatistics:()Lorg/hibernate/stat/spi/StatisticsImplementor;
aload 0
getfield org.hibernate.dialect.lock.UpdateLockingStrategy.lockable:Lorg/hibernate/persister/entity/Lockable;
invokeinterface org.hibernate.persister.entity.Lockable.getEntityName:()Ljava/lang/String;
invokeinterface org.hibernate.stat.spi.StatisticsImplementor.optimisticFailure:(Ljava/lang/String;)V
14: StackMap locals: int
StackMap stack:
new org.hibernate.StaleObjectStateException
dup
aload 0
getfield org.hibernate.dialect.lock.UpdateLockingStrategy.lockable:Lorg/hibernate/persister/entity/Lockable;
invokeinterface org.hibernate.persister.entity.Lockable.getEntityName:()Ljava/lang/String;
aload 1
invokespecial org.hibernate.StaleObjectStateException.<init>:(Ljava/lang/String;Ljava/io/Serializable;)V
athrow
end local 9 end local 8 15: StackMap locals: org.hibernate.dialect.lock.UpdateLockingStrategy java.io.Serializable java.lang.Object java.lang.Object int org.hibernate.engine.spi.SharedSessionContractImplementor org.hibernate.engine.spi.SessionFactoryImplementor java.sql.PreparedStatement
StackMap stack: java.lang.Throwable
astore 10
16: aload 5
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 7
invokeinterface org.hibernate.resource.jdbc.ResourceRegistry.release:(Ljava/sql/Statement;)V
17: aload 5
invokeinterface org.hibernate.engine.spi.SharedSessionContractImplementor.getJdbcCoordinator:()Lorg/hibernate/engine/jdbc/spi/JdbcCoordinator;
invokeinterface org.hibernate.engine.jdbc.spi.JdbcCoordinator.afterStatementExecution:()V
18: aload 10
athrow
19: StackMap locals:
StackMap stack:
aload 5
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 7
invokeinterface org.hibernate.resource.jdbc.ResourceRegistry.release:(Ljava/sql/Statement;)V
20: aload 5
invokeinterface org.hibernate.engine.spi.SharedSessionContractImplementor.getJdbcCoordinator:()Lorg/hibernate/engine/jdbc/spi/JdbcCoordinator;
invokeinterface org.hibernate.engine.jdbc.spi.JdbcCoordinator.afterStatementExecution:()V
end local 7 21: goto 28
22: StackMap locals: org.hibernate.dialect.lock.UpdateLockingStrategy java.io.Serializable java.lang.Object java.lang.Object int org.hibernate.engine.spi.SharedSessionContractImplementor org.hibernate.engine.spi.SessionFactoryImplementor
StackMap stack: java.sql.SQLException
astore 7
start local 7 23: aload 5
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;
24: aload 7
25: new java.lang.StringBuilder
dup
ldc "could not lock: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield org.hibernate.dialect.lock.UpdateLockingStrategy.lockable:Lorg/hibernate/persister/entity/Lockable;
aload 1
aload 5
invokeinterface org.hibernate.engine.spi.SharedSessionContractImplementor.getFactory:()Lorg/hibernate/engine/spi/SessionFactoryImplementor;
invokestatic org.hibernate.pretty.MessageHelper.infoString:(Lorg/hibernate/persister/entity/EntityPersister;Ljava/lang/Object;Lorg/hibernate/engine/spi/SessionFactoryImplementor;)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
26: aload 0
getfield org.hibernate.dialect.lock.UpdateLockingStrategy.sql:Ljava/lang/String;
27: invokevirtual org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert:(Ljava/sql/SQLException;Ljava/lang/String;Ljava/lang/String;)Lorg/hibernate/JDBCException;
athrow
end local 7 28: StackMap locals:
StackMap stack:
return
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 29 0 this Lorg/hibernate/dialect/lock/UpdateLockingStrategy;
0 29 1 id Ljava/io/Serializable;
0 29 2 version Ljava/lang/Object;
0 29 3 object Ljava/lang/Object;
0 29 4 timeout I
0 29 5 session Lorg/hibernate/engine/spi/SharedSessionContractImplementor;
3 29 6 factory Lorg/hibernate/engine/spi/SessionFactoryImplementor;
4 21 7 st Ljava/sql/PreparedStatement;
6 15 8 offset I
11 15 9 affected I
23 28 7 sqle Ljava/sql/SQLException;
Exception table:
from to target type
4 15 15 any
3 21 22 Class java.sql.SQLException
Exceptions:
throws org.hibernate.StaleObjectStateException, org.hibernate.JDBCException
MethodParameters:
Name Flags
id
version
object
timeout
session
protected java.lang.String generateLockString();
descriptor: ()Ljava/lang/String;
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=3, args_size=1
start local 0 0: aload 0
getfield org.hibernate.dialect.lock.UpdateLockingStrategy.lockable:Lorg/hibernate/persister/entity/Lockable;
invokeinterface org.hibernate.persister.entity.Lockable.getFactory:()Lorg/hibernate/engine/spi/SessionFactoryImplementor;
astore 1
start local 1 1: new org.hibernate.sql.Update
dup
aload 1
invokeinterface org.hibernate.engine.spi.SessionFactoryImplementor.getDialect:()Lorg/hibernate/dialect/Dialect;
invokespecial org.hibernate.sql.Update.<init>:(Lorg/hibernate/dialect/Dialect;)V
astore 2
start local 2 2: aload 2
aload 0
getfield org.hibernate.dialect.lock.UpdateLockingStrategy.lockable:Lorg/hibernate/persister/entity/Lockable;
invokeinterface org.hibernate.persister.entity.Lockable.getRootTableName:()Ljava/lang/String;
invokevirtual org.hibernate.sql.Update.setTableName:(Ljava/lang/String;)Lorg/hibernate/sql/Update;
pop
3: aload 2
aload 0
getfield org.hibernate.dialect.lock.UpdateLockingStrategy.lockable:Lorg/hibernate/persister/entity/Lockable;
invokeinterface org.hibernate.persister.entity.Lockable.getRootTableIdentifierColumnNames:()[Ljava/lang/String;
invokevirtual org.hibernate.sql.Update.addPrimaryKeyColumns:([Ljava/lang/String;)Lorg/hibernate/sql/Update;
pop
4: aload 2
aload 0
getfield org.hibernate.dialect.lock.UpdateLockingStrategy.lockable:Lorg/hibernate/persister/entity/Lockable;
invokeinterface org.hibernate.persister.entity.Lockable.getVersionColumnName:()Ljava/lang/String;
invokevirtual org.hibernate.sql.Update.setVersionColumnName:(Ljava/lang/String;)Lorg/hibernate/sql/Update;
pop
5: aload 2
aload 0
getfield org.hibernate.dialect.lock.UpdateLockingStrategy.lockable:Lorg/hibernate/persister/entity/Lockable;
invokeinterface org.hibernate.persister.entity.Lockable.getVersionColumnName:()Ljava/lang/String;
invokevirtual org.hibernate.sql.Update.addColumn:(Ljava/lang/String;)Lorg/hibernate/sql/Update;
pop
6: aload 1
invokeinterface org.hibernate.engine.spi.SessionFactoryImplementor.getSessionFactoryOptions:()Lorg/hibernate/boot/spi/SessionFactoryOptions;
invokeinterface org.hibernate.boot.spi.SessionFactoryOptions.isCommentsEnabled:()Z
ifeq 8
7: aload 2
new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
aload 0
getfield org.hibernate.dialect.lock.UpdateLockingStrategy.lockMode:Lorg/hibernate/LockMode;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc " lock "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0
getfield org.hibernate.dialect.lock.UpdateLockingStrategy.lockable:Lorg/hibernate/persister/entity/Lockable;
invokeinterface org.hibernate.persister.entity.Lockable.getEntityName:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual org.hibernate.sql.Update.setComment:(Ljava/lang/String;)Lorg/hibernate/sql/Update;
pop
8: StackMap locals: org.hibernate.engine.spi.SessionFactoryImplementor org.hibernate.sql.Update
StackMap stack:
aload 2
invokevirtual org.hibernate.sql.Update.toStatementString:()Ljava/lang/String;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/hibernate/dialect/lock/UpdateLockingStrategy;
1 9 1 factory Lorg/hibernate/engine/spi/SessionFactoryImplementor;
2 9 2 update Lorg/hibernate/sql/Update;
protected org.hibernate.LockMode getLockMode();
descriptor: ()Lorg/hibernate/LockMode;
flags: (0x0004) ACC_PROTECTED
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.hibernate.dialect.lock.UpdateLockingStrategy.lockMode:Lorg/hibernate/LockMode;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/hibernate/dialect/lock/UpdateLockingStrategy;
}
SourceFile: "UpdateLockingStrategy.java"