Interface ProxyHandler

  • All Known Subinterfaces:
    EntityProxyHandler
    All Known Implementing Classes:
    DefaultProxyHandler

    public interface ProxyHandler
    Interface that defines logic for handling proxied instances
    Since:
    1.2.2
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void initialize​(java.lang.Object o)
      Initializes an existing uninitialized proxy instance.
      boolean isInitialized​(java.lang.Object o)
      Returns whether a lazy proxied instance has been initialized.
      boolean isInitialized​(java.lang.Object obj, java.lang.String associationName)
      Tests whether an association of the given object has been initialized.
      boolean isProxy​(java.lang.Object o)
      Returns true if the specified object is a proxy.
      java.lang.Object unwrapIfProxy​(java.lang.Object instance)
      Returns the unwrapped proxy instance or the original object if not proxied.
    • Method Detail

      • isProxy

        boolean isProxy​(java.lang.Object o)
        Returns true if the specified object is a proxy.
        Parameters:
        o - The object in question
        Returns:
        true if it is a proxy
      • unwrapIfProxy

        java.lang.Object unwrapIfProxy​(java.lang.Object instance)
        Returns the unwrapped proxy instance or the original object if not proxied.
        Parameters:
        instance - The instance to unwrap
        Returns:
        The unwrapped instance
      • isInitialized

        boolean isInitialized​(java.lang.Object o)
        Returns whether a lazy proxied instance has been initialized.
        Parameters:
        o - The instance to test
        Returns:
        true if it has been initialized false otherwise
      • initialize

        void initialize​(java.lang.Object o)
        Initializes an existing uninitialized proxy instance.
        Parameters:
        o - The proxy instance
      • isInitialized

        boolean isInitialized​(java.lang.Object obj,
                              java.lang.String associationName)
        Tests whether an association of the given object has been initialized.
        Parameters:
        obj - The object to check
        associationName - The association
        Returns:
        true if has been init