Class NiceByteBuddyProxyFactory

java.lang.Object
org.hibernate.proxy.pojo.bytebuddy.ByteBuddyProxyFactory
ch.tocco.nice2.persist.core.impl.hibernate.proxy.NiceByteBuddyProxyFactory
All Implemented Interfaces:
Serializable, org.hibernate.proxy.ProxyFactory

public class NiceByteBuddyProxyFactory extends org.hibernate.proxy.pojo.bytebuddy.ByteBuddyProxyFactory
Custom ByteBuddyProxyFactory that sets our own custom lazy initializer to the created proxies.
See Also:
  • Constructor Details

    • NiceByteBuddyProxyFactory

      public NiceByteBuddyProxyFactory(org.hibernate.proxy.pojo.bytebuddy.ByteBuddyProxyHelper proxyHelper, DataModel dataModel, Context context)
  • Method Details

    • getProxy

      public org.hibernate.proxy.HibernateProxy getProxy(Object id, org.hibernate.engine.spi.SharedSessionContractImplementor session) throws org.hibernate.HibernateException
      Specified by:
      getProxy in interface org.hibernate.proxy.ProxyFactory
      Overrides:
      getProxy in class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyProxyFactory
      Throws:
      org.hibernate.HibernateException
    • postInstantiate

      public void postInstantiate(String entityName, Class<?> persistentClass, Set<Class<?>> interfaces, Method getIdentifierMethod, Method setIdentifierMethod, org.hibernate.type.CompositeType componentIdType) throws org.hibernate.HibernateException
      Specified by:
      postInstantiate in interface org.hibernate.proxy.ProxyFactory
      Overrides:
      postInstantiate in class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyProxyFactory
      Throws:
      org.hibernate.HibernateException