Top Fields Constructors Methods
org.hibernate.proxy.pojo.bytebuddy

public Class ByteBuddyProxyFactory

extends Object
implements ProxyFactory, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.hibernate.proxy.ProxyFactory
Imports
java.io.Serializable, java.lang.reflect.Method, java.util.Set, org.hibernate.HibernateException, org.hibernate.engine.spi.SharedSessionContractImplementor, org.hibernate.internal.CoreMessageLogger, org.hibernate.internal.util.ReflectHelper, org.hibernate.internal.util.collections.ArrayHelper, org.hibernate.proxy.HibernateProxy, .ProxyConfiguration, .ProxyFactory, org.hibernate.type.CompositeType

Field Summary

Modifier and TypeField and Description
private final ByteBuddyProxyHelper
private CompositeType
private String
private Method
private Class<T>[]
private static final CoreMessageLogger
private boolean
private Class<T>
private Class<T>
private Method

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public HibernateProxy
getProxy(Serializable
The id value for the proxy to be generated.
id
,
SharedSessionContractImplementor
The session to which the generated proxy will be associated.
session
)

Implements org.hibernate.proxy.ProxyFactory.getProxy.

Create a new proxy instance
public void
postInstantiate(String
The name of the entity for which this factory should generate proxies.
entityName
,
Class<T>
The entity class for which to generate proxies; not always the same as the entityName.
persistentClass
,
Set<Class<T>>
The interfaces to expose in the generated proxy; HibernateProxy is already included in this collection.
interfaces
,
Method
Reference to the identifier getter method; invocation on this method should not force initialization
getIdentifierMethod
,
Method
Reference to the identifier setter method; invocation on this method should not force initialization
setIdentifierMethod
,
CompositeType
For composite identifier types, a reference to the type of the identifier property; again accessing the id should generally not cause initialization - but need to bear in mind mappings.
componentIdType
)

Implements org.hibernate.proxy.ProxyFactory.postInstantiate.

Called immediately after instantiation of this factory.
private Class<T>[]
toArray(Set<Class<T>> interfaces)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

byteBuddyProxyHelperback to summary
private final ByteBuddyProxyHelper byteBuddyProxyHelper
componentIdTypeback to summary
private CompositeType componentIdType
entityNameback to summary
private String entityName
getIdentifierMethodback to summary
private Method getIdentifierMethod
interfacesback to summary
private Class<T>[] interfaces
LOGback to summary
private static final CoreMessageLogger LOG
overridesEqualsback to summary
private boolean overridesEquals
persistentClassback to summary
private Class<T> persistentClass
proxyClassback to summary
private Class<T> proxyClass
setIdentifierMethodback to summary
private Method setIdentifierMethod

Constructor Detail

ByteBuddyProxyFactoryback to summary
public ByteBuddyProxyFactory(ByteBuddyProxyHelper byteBuddyProxyHelper)

Method Detail

getProxyback to summary
public HibernateProxy getProxy(Serializable id, SharedSessionContractImplementor session) throws HibernateException

Implements org.hibernate.proxy.ProxyFactory.getProxy.

Doc from org.hibernate.proxy.ProxyFactory.getProxy.

Create a new proxy instance

Parameters
id:Serializable

The id value for the proxy to be generated.

session:SharedSessionContractImplementor

The session to which the generated proxy will be associated.

Returns:HibernateProxy

The generated proxy.

Annotations
@Override
Exceptions
HibernateException:
Indicates problems generating the requested proxy.
postInstantiateback to summary
public void postInstantiate(String entityName, Class<T> persistentClass, Set<Class<T>> interfaces, Method getIdentifierMethod, Method setIdentifierMethod, CompositeType componentIdType) throws HibernateException

Implements org.hibernate.proxy.ProxyFactory.postInstantiate.

Doc from org.hibernate.proxy.ProxyFactory.postInstantiate.

Called immediately after instantiation of this factory.

Essentially equivalent to constructor injection, but contracted here via interface.

Parameters
entityName:String

The name of the entity for which this factory should generate proxies.

persistentClass:Class<T>

The entity class for which to generate proxies; not always the same as the entityName.

interfaces:Set<Class<T>>

The interfaces to expose in the generated proxy; HibernateProxy is already included in this collection.

getIdentifierMethod:Method

Reference to the identifier getter method; invocation on this method should not force initialization

setIdentifierMethod:Method

Reference to the identifier setter method; invocation on this method should not force initialization

componentIdType:CompositeType

For composite identifier types, a reference to the type of the identifier property; again accessing the id should generally not cause initialization - but need to bear in mind mappings.

Annotations
@Override
Exceptions
HibernateException:
Indicates a problem completing post instantiation initialization.
toArrayback to summary
private Class<T>[] toArray(Set<Class<T>> interfaces)