Class StoreFacadeTypeRegistry


  • public class StoreFacadeTypeRegistry
    extends java.lang.Object
    Repository of store-specific facade classes. This is used by facade implementations to wrap store-specific components without knowing about all possible back-ends.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Class getImplementation​(java.lang.Class facadeType, java.lang.Class storeType)
      Return the implementation for the given facade and store.
      java.lang.Class getImplementation​(java.lang.Class facadeType, java.lang.Class storeType, java.lang.Class defaultType)
      Return the implementation for the given facade and store.
      void registerImplementation​(java.lang.Class facadeType, java.lang.Class storeType, java.lang.Class implType)
      Register a facade implementation.
      • Methods inherited from class java.lang.Object

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

      • StoreFacadeTypeRegistry

        public StoreFacadeTypeRegistry()
    • Method Detail

      • registerImplementation

        public void registerImplementation​(java.lang.Class facadeType,
                                           java.lang.Class storeType,
                                           java.lang.Class implType)
        Register a facade implementation.
        Parameters:
        facadeType - the facade interface
        storeType - the store's StoreManager type, or null for generic
        implType - the class implementing the facade
      • getImplementation

        public java.lang.Class getImplementation​(java.lang.Class facadeType,
                                                 java.lang.Class storeType)
        Return the implementation for the given facade and store.
        Parameters:
        facadeType - the facade interface
        storeType - the store's StoreManager type, or null for generic
        implType - the registered implementor
      • getImplementation

        public java.lang.Class getImplementation​(java.lang.Class facadeType,
                                                 java.lang.Class storeType,
                                                 java.lang.Class defaultType)
        Return the implementation for the given facade and store. If no registered implementation is found then returns the given default type provided it the facade type is assignable from the deafult type.
        Parameters:
        facadeType - the facade interface
        storeType - the store's StoreManager type, or null for generic
        implType - the registered implementor
        defaultType - class if no registered implementation is available.