Class ByteBuddyProxyFactory
- java.lang.Object
-
- org.hibernate.proxy.pojo.bytebuddy.ByteBuddyProxyFactory
-
- All Implemented Interfaces:
java.io.Serializable
,ProxyFactory
public class ByteBuddyProxyFactory extends java.lang.Object implements ProxyFactory, java.io.Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ByteBuddyProxyFactory(ByteBuddyProxyHelper byteBuddyProxyHelper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HibernateProxy
getProxy(java.io.Serializable id, SharedSessionContractImplementor session)
Create a new proxy instancevoid
postInstantiate(java.lang.String entityName, java.lang.Class persistentClass, java.util.Set<java.lang.Class> interfaces, java.lang.reflect.Method getIdentifierMethod, java.lang.reflect.Method setIdentifierMethod, CompositeType componentIdType)
Called immediately after instantiation of this factory.
-
-
-
Constructor Detail
-
ByteBuddyProxyFactory
public ByteBuddyProxyFactory(ByteBuddyProxyHelper byteBuddyProxyHelper)
-
-
Method Detail
-
postInstantiate
public void postInstantiate(java.lang.String entityName, java.lang.Class persistentClass, java.util.Set<java.lang.Class> interfaces, java.lang.reflect.Method getIdentifierMethod, java.lang.reflect.Method setIdentifierMethod, CompositeType componentIdType) throws HibernateException
Description copied from interface:ProxyFactory
Called immediately after instantiation of this factory. Essentially equivalent to constructor injection, but contracted here via interface.- Specified by:
postInstantiate
in interfaceProxyFactory
- 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 initializationsetIdentifierMethod
- Reference to the identifier setter method; invocation on this method should not force initializationcomponentIdType
- For composite identifier types, a reference to thetype
of the identifier property; again accessing the id should generally not cause initialization - but need to bear in mindmappings. - Throws:
HibernateException
- Indicates a problem completing post instantiation initialization.
-
getProxy
public HibernateProxy getProxy(java.io.Serializable id, SharedSessionContractImplementor session) throws HibernateException
Description copied from interface:ProxyFactory
Create a new proxy instance- Specified by:
getProxy
in interfaceProxyFactory
- 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.
- Throws:
HibernateException
- Indicates problems generating the requested proxy.
-
-