Class ByteBuddyGroovyProxyFactory

  • All Implemented Interfaces:
    java.io.Serializable, org.hibernate.proxy.ProxyFactory

    public class ByteBuddyGroovyProxyFactory
    extends java.lang.Object
    implements org.hibernate.proxy.ProxyFactory, java.io.Serializable
    Replaces the stock ByteBuddyProxyFactory instead of overriding since everything is private and not easy extend. A copy paste of original with slight modifications for class construction. Make it easier to extend too for others to modify
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ByteBuddyGroovyProxyFactory​(org.hibernate.proxy.pojo.bytebuddy.ByteBuddyProxyHelper byteBuddyProxyHelper, boolean replaceToString)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.hibernate.proxy.HibernateProxy getProxy​(java.io.Serializable id, org.hibernate.engine.spi.SharedSessionContractImplementor session)  
      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, org.hibernate.type.CompositeType componentIdType)  
      static java.lang.Class[] toArray​(java.util.Set<java.lang.Class> interfaces)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • byteBuddyProxyHelper

        protected final org.hibernate.proxy.pojo.bytebuddy.ByteBuddyProxyHelper byteBuddyProxyHelper
      • persistentClass

        protected java.lang.Class persistentClass
      • entityName

        protected java.lang.String entityName
      • interfaces

        protected java.lang.Class[] interfaces
      • getIdentifierMethod

        protected java.lang.reflect.Method getIdentifierMethod
      • setIdentifierMethod

        protected java.lang.reflect.Method setIdentifierMethod
      • componentIdType

        protected org.hibernate.type.CompositeType componentIdType
      • overridesEquals

        protected boolean overridesEquals
      • overridesToString

        protected boolean overridesToString
      • replaceToString

        protected boolean replaceToString
      • proxyClass

        protected java.lang.Class proxyClass
    • Constructor Detail

      • ByteBuddyGroovyProxyFactory

        public ByteBuddyGroovyProxyFactory​(org.hibernate.proxy.pojo.bytebuddy.ByteBuddyProxyHelper byteBuddyProxyHelper,
                                           boolean replaceToString)
    • 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,
                                    org.hibernate.type.CompositeType componentIdType)
                             throws org.hibernate.HibernateException
        Specified by:
        postInstantiate in interface org.hibernate.proxy.ProxyFactory
        Throws:
        org.hibernate.HibernateException
      • toArray

        public static java.lang.Class[] toArray​(java.util.Set<java.lang.Class> interfaces)
      • getProxy

        public org.hibernate.proxy.HibernateProxy getProxy​(java.io.Serializable id,
                                                           org.hibernate.engine.spi.SharedSessionContractImplementor session)
                                                    throws org.hibernate.HibernateException
        Specified by:
        getProxy in interface org.hibernate.proxy.ProxyFactory
        Throws:
        org.hibernate.HibernateException