public class org.hibernate.id.ForeignGenerator 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.ForeignGenerator
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.String entityName;
descriptor: Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
private java.lang.String propertyName;
descriptor: Ljava/lang/String;
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/ForeignGenerator;
invokestatic org.hibernate.internal.CoreLogging.messageLogger:(Ljava/lang/Class;)Lorg/hibernate/internal/CoreMessageLogger;
putstatic org.hibernate.id.ForeignGenerator.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/ForeignGenerator;
public java.lang.String getEntityName();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.hibernate.id.ForeignGenerator.entityName:Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/hibernate/id/ForeignGenerator;
public java.lang.String getPropertyName();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.hibernate.id.ForeignGenerator.propertyName:Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/hibernate/id/ForeignGenerator;
public java.lang.String getRole();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new java.lang.StringBuilder
dup
aload 0
invokevirtual org.hibernate.id.ForeignGenerator.getEntityName:()Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
bipush 46
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
aload 0
invokevirtual org.hibernate.id.ForeignGenerator.getPropertyName:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/hibernate/id/ForeignGenerator;
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=3, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 2
ldc "property"
invokevirtual java.util.Properties.getProperty:(Ljava/lang/String;)Ljava/lang/String;
putfield org.hibernate.id.ForeignGenerator.propertyName:Ljava/lang/String;
1: aload 0
aload 2
ldc "entity_name"
invokevirtual java.util.Properties.getProperty:(Ljava/lang/String;)Ljava/lang/String;
putfield org.hibernate.id.ForeignGenerator.entityName:Ljava/lang/String;
2: aload 0
getfield org.hibernate.id.ForeignGenerator.propertyName:Ljava/lang/String;
ifnonnull 4
3: new org.hibernate.MappingException
dup
ldc "param named \"property\" is required for foreign id generation strategy"
invokespecial org.hibernate.MappingException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/hibernate/id/ForeignGenerator;
0 5 1 type Lorg/hibernate/type/Type;
0 5 2 params Ljava/util/Properties;
0 5 3 serviceRegistry Lorg/hibernate/service/ServiceRegistry;
Exceptions:
throws org.hibernate.MappingException
MethodParameters:
Name Flags
type
params
serviceRegistry
public 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: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=9, args_size=3
start local 0 start local 1 start local 2 0: aload 1
checkcast org.hibernate.Session
astore 3
start local 3 1: aload 1
invokeinterface org.hibernate.engine.spi.SharedSessionContractImplementor.getFactory:()Lorg/hibernate/engine/spi/SessionFactoryImplementor;
invokeinterface org.hibernate.engine.spi.SessionFactoryImplementor.getMetamodel:()Lorg/hibernate/metamodel/spi/MetamodelImplementor;
aload 0
getfield org.hibernate.id.ForeignGenerator.entityName:Ljava/lang/String;
invokeinterface org.hibernate.metamodel.spi.MetamodelImplementor.entityPersister:(Ljava/lang/String;)Lorg/hibernate/persister/entity/EntityPersister;
astore 4
start local 4 2: aload 4
aload 2
aload 0
getfield org.hibernate.id.ForeignGenerator.propertyName:Ljava/lang/String;
invokeinterface org.hibernate.persister.entity.EntityPersister.getPropertyValue:(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
astore 5
start local 5 3: aload 5
ifnonnull 7
4: new org.hibernate.id.IdentifierGenerationException
dup
5: new java.lang.StringBuilder
dup
ldc "attempted to assign id from null one-to-one property ["
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual org.hibernate.id.ForeignGenerator.getRole:()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;
6: invokespecial org.hibernate.id.IdentifierGenerationException.<init>:(Ljava/lang/String;)V
athrow
7: StackMap locals: org.hibernate.Session org.hibernate.persister.entity.EntityPersister java.lang.Object
StackMap stack:
aload 4
aload 0
getfield org.hibernate.id.ForeignGenerator.propertyName:Ljava/lang/String;
invokeinterface org.hibernate.persister.entity.EntityPersister.getPropertyType:(Ljava/lang/String;)Lorg/hibernate/type/Type;
astore 7
start local 7 8: aload 7
invokeinterface org.hibernate.type.Type.isEntityType:()Z
ifeq 11
9: aload 7
checkcast org.hibernate.type.EntityType
astore 6
start local 6 10: goto 12
end local 6 11: StackMap locals: org.hibernate.id.ForeignGenerator org.hibernate.engine.spi.SharedSessionContractImplementor java.lang.Object org.hibernate.Session org.hibernate.persister.entity.EntityPersister java.lang.Object top org.hibernate.type.Type
StackMap stack:
aload 4
new java.lang.StringBuilder
dup
ldc "_identifierMapper."
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield org.hibernate.id.ForeignGenerator.propertyName:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokeinterface org.hibernate.persister.entity.EntityPersister.getPropertyType:(Ljava/lang/String;)Lorg/hibernate/type/Type;
checkcast org.hibernate.type.EntityType
astore 6
start local 6 12: StackMap locals: org.hibernate.id.ForeignGenerator org.hibernate.engine.spi.SharedSessionContractImplementor java.lang.Object org.hibernate.Session org.hibernate.persister.entity.EntityPersister java.lang.Object org.hibernate.type.EntityType org.hibernate.type.Type
StackMap stack:
aload 6
invokevirtual org.hibernate.type.EntityType.getAssociatedEntityName:()Ljava/lang/String;
13: aload 5
14: aload 1
15: invokestatic org.hibernate.engine.internal.ForeignKeys.getEntityIdentifierIfNotUnsaved:(Ljava/lang/String;Ljava/lang/Object;Lorg/hibernate/engine/spi/SharedSessionContractImplementor;)Ljava/io/Serializable;
astore 8
start local 8 16: goto 24
end local 8 17: StackMap locals:
StackMap stack: org.hibernate.TransientObjectException
pop
18: getstatic org.hibernate.id.ForeignGenerator.LOG:Lorg/hibernate/internal/CoreMessageLogger;
invokeinterface org.hibernate.internal.CoreMessageLogger.isDebugEnabled:()Z
ifeq 23
19: getstatic org.hibernate.id.ForeignGenerator.LOG:Lorg/hibernate/internal/CoreMessageLogger;
20: ldc "ForeignGenerator detected a transient entity [%s]"
21: aload 6
invokevirtual org.hibernate.type.EntityType.getAssociatedEntityName:()Ljava/lang/String;
22: invokeinterface org.hibernate.internal.CoreMessageLogger.debugf:(Ljava/lang/String;Ljava/lang/Object;)V
23: StackMap locals:
StackMap stack:
aload 3
aload 6
invokevirtual org.hibernate.type.EntityType.getAssociatedEntityName:()Ljava/lang/String;
aload 5
invokeinterface org.hibernate.Session.save:(Ljava/lang/String;Ljava/lang/Object;)Ljava/io/Serializable;
astore 8
start local 8 24: StackMap locals: java.io.Serializable
StackMap stack:
aload 3
aload 0
getfield org.hibernate.id.ForeignGenerator.entityName:Ljava/lang/String;
aload 2
invokeinterface org.hibernate.Session.contains:(Ljava/lang/String;Ljava/lang/Object;)Z
ifeq 26
25: getstatic org.hibernate.id.IdentifierGeneratorHelper.SHORT_CIRCUIT_INDICATOR:Ljava/io/Serializable;
areturn
26: StackMap locals:
StackMap stack:
aload 8
areturn
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 27 0 this Lorg/hibernate/id/ForeignGenerator;
0 27 1 sessionImplementor Lorg/hibernate/engine/spi/SharedSessionContractImplementor;
0 27 2 object Ljava/lang/Object;
1 27 3 session Lorg/hibernate/Session;
2 27 4 persister Lorg/hibernate/persister/entity/EntityPersister;
3 27 5 associatedObject Ljava/lang/Object;
10 11 6 foreignValueSourceType Lorg/hibernate/type/EntityType;
12 27 6 foreignValueSourceType Lorg/hibernate/type/EntityType;
8 27 7 propertyType Lorg/hibernate/type/Type;
16 17 8 id Ljava/io/Serializable;
24 27 8 id Ljava/io/Serializable;
Exception table:
from to target type
12 16 17 Class org.hibernate.TransientObjectException
MethodParameters:
Name Flags
sessionImplementor
object
}
SourceFile: "ForeignGenerator.java"