Interface PersistenceManagerFactory


  • public interface PersistenceManagerFactory
    Factory interface for instantiating typed PersistenceManager objects.
    Author:
    bramk, nikolam
    • Method Detail

      • getPersistenceManager

        <T> PersistenceManager<T> getPersistenceManager​(Class<T> entityClass)
        Get a persistence manager for the given domain type.
        Type Parameters:
        T - an identifiable type for which the persitence manager is to be returned.
        Parameters:
        entityClass - type for which a persistence manager should be returned.
        Returns:
        persistence manager for the given type or null.
      • register

        <T> void register​(Class<T> entityClass,
                          PersistenceManager<T> manager)
                   throws DomainException
        Register a persistence manager for a particular type.
        Type Parameters:
        T - type of the domain object for PM, subtype of Identifiable.
        Parameters:
        entityClass - class of the type handled by the given PM.
        manager - persistence manage handling the given type.
        Throws:
        DomainException - in case there is already a PM registered for that type.
      • deregister

        <T> void deregister​(Class<T> entityClass)
        Deregister a persistent manager for the given type.
        Type Parameters:
        T - type of the domain object for PM, subtype of Identifiable.
        Parameters:
        entityClass - class of the type for which the PM will be deregistered.