Class SingletonRepositoryFactory

  • All Implemented Interfaces:
    RepositoryFactory

    public class SingletonRepositoryFactory
    extends java.lang.Object
    implements RepositoryFactory
    Repository factory that always returns the same configured repository.
    • Constructor Summary

      Constructors 
      Constructor Description
      SingletonRepositoryFactory​(Repository repository)
      Creates a repository factory that always returns the given repository.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Repository getRepository()
      Returns the configured repository instance.
      • Methods inherited from class java.lang.Object

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

      • SingletonRepositoryFactory

        public SingletonRepositoryFactory​(Repository repository)
        Creates a repository factory that always returns the given repository.
        Parameters:
        repository - singleton repository instance.