Class JpaManagedObjectSource.JpaManagedObject

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.persistence.EntityManager getEntityManager()
      Obtains the EntityManager.
      java.lang.Object getObject()
      Obtains the object being managed.
      java.lang.Object invoke​(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)  
      protected void loadEntityManager​(java.util.function.Function<java.lang.Integer,​java.lang.Object> dependencyRetriever)
      Loads the EntityManager.
      void loadObjects​(ObjectRegistry<Indexed> registry)
      Loads the Objects of the ManagedObject instances to be referenced by this CoordinatingManagedObject.
      • Methods inherited from class java.lang.Object

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

      • JpaManagedObject

        public JpaManagedObject()
    • Method Detail

      • getEntityManager

        public javax.persistence.EntityManager getEntityManager()
        Obtains the EntityManager.
        Returns:
        EntityManager.
      • loadEntityManager

        protected void loadEntityManager​(java.util.function.Function<java.lang.Integer,​java.lang.Object> dependencyRetriever)
                                  throws java.lang.Exception
        Loads the EntityManager.
        Parameters:
        dependencyRetriever - Retrieves the dependency.
        Throws:
        java.lang.Exception - If fails to load the EntityManager.
      • getObject

        public java.lang.Object getObject()
                                   throws java.lang.Throwable
        Description copied from interface: ManagedObject
        Obtains the object being managed.
        Specified by:
        getObject in interface ManagedObject
        Returns:
        Object being managed.
        Throws:
        java.lang.Throwable - Indicating failed to obtain the object for use.
      • invoke

        public java.lang.Object invoke​(java.lang.Object proxy,
                                       java.lang.reflect.Method method,
                                       java.lang.Object[] args)
                                throws java.lang.Throwable
        Specified by:
        invoke in interface java.lang.reflect.InvocationHandler
        Throws:
        java.lang.Throwable