public class

CGLIBProxyFactory

extends Object
implements ProxyFactory
java.lang.Object
   ↳ org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory

This class is deprecated.
Per HHH-5451 support for cglib as a bytecode provider has been deprecated.

Summary

Fields
protected static final Class[] NO_CLASSES
Public Constructors
CGLIBProxyFactory()
Public Methods
HibernateProxy getProxy(Serializable id, SessionImplementor session)
Create a new proxy instance
void postInstantiate(String entityName, Class persistentClass, Set interfaces, Method getIdentifierMethod, Method setIdentifierMethod, CompositeType componentIdType)
Called immediately after instantiation of this factory.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.hibernate.proxy.ProxyFactory

Fields

protected static final Class[] NO_CLASSES

Public Constructors

public CGLIBProxyFactory ()

Public Methods

public HibernateProxy getProxy (Serializable id, SessionImplementor session)

Create a new proxy instance

Parameters
id The id value for the proxy to be generated.
session The session to which the generated proxy will be associated.
Returns
  • The generated proxy.

public void postInstantiate (String entityName, Class persistentClass, Set interfaces, Method getIdentifierMethod, Method setIdentifierMethod, CompositeType componentIdType)

Called immediately after instantiation of this factory.

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

Parameters
entityName The name of the entity for which this factory should generate proxies.
persistentClass The entity class for which to generate proxies; not always the same as the entityName.
interfaces The interfaces to expose in the generated proxy; HibernateProxy is already included in this collection.
getIdentifierMethod Reference to the identifier getter method; invocation on this method should not force initialization
setIdentifierMethod Reference to the identifier setter method; invocation on this method should not force initialization
componentIdType 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.