Interface LazyProxyFactory

  • All Known Implementing Classes:
    CGLibLazyProxyFactory

    public interface LazyProxyFactory
    Author:
    uwe schaefer
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T extends java.util.Collection>
      T
      createListProxy​(Datastore datastore, T listToProxy, java.lang.Class referenceObjClass, boolean ignoreMissing)
      Creates a proxy for a List.
      <T extends java.util.Map>
      T
      createMapProxy​(Datastore datastore, T mapToProxy, java.lang.Class referenceObjClass, boolean ignoreMissing)
      Creates a proxy for a Map.
      <T> T createProxy​(Datastore datastore, java.lang.Class<T> targetClass, Key<T> key, boolean ignoreMissing)
      Creates a proxy for a Class.
    • Method Detail

      • createListProxy

        <T extends java.util.Collection> T createListProxy​(Datastore datastore,
                                                           T listToProxy,
                                                           java.lang.Class referenceObjClass,
                                                           boolean ignoreMissing)
        Creates a proxy for a List.
        Type Parameters:
        T - the type of the entities
        Parameters:
        datastore - the Datastore to use when fetching this reference
        listToProxy - the list to proxy
        referenceObjClass - the type of the referenced objects
        ignoreMissing - ignore references that don't exist in the database
        Returns:
        the proxy
      • createMapProxy

        <T extends java.util.Map> T createMapProxy​(Datastore datastore,
                                                   T mapToProxy,
                                                   java.lang.Class referenceObjClass,
                                                   boolean ignoreMissing)
        Creates a proxy for a Map.
        Type Parameters:
        T - the type of the entities
        Parameters:
        datastore - the Datastore to use when fetching this reference
        mapToProxy - the map to proxy
        referenceObjClass - the type of the referenced objects
        ignoreMissing - ignore references that don't exist in the database
        Returns:
        the proxy
      • createProxy

        <T> T createProxy​(Datastore datastore,
                          java.lang.Class<T> targetClass,
                          Key<T> key,
                          boolean ignoreMissing)
        Creates a proxy for a Class.
        Type Parameters:
        T - the type of the entity
        Parameters:
        datastore - the Datastore to use when fetching this reference
        targetClass - the referenced object's Class
        key - the Key of the reference
        ignoreMissing - ignore references that don't exist in the database
        Returns:
        the proxy