Class DefaultBackendFactory

java.lang.Object
org.tentackle.sql.DefaultBackendFactory
All Implemented Interfaces:
BackendFactory

@Service(BackendFactory.class) public class DefaultBackendFactory extends Object implements BackendFactory
Default implementation of a backend factory.
Author:
harald
  • Constructor Details

    • DefaultBackendFactory

      public DefaultBackendFactory()
      Creates a backend factory.
      Collects all Backend services.
  • Method Details

    • getBackendByUrl

      public Backend getBackendByUrl(String url)
      Description copied from interface: BackendFactory
      Creates a backend by jdbc url.
      Specified by:
      getBackendByUrl in interface BackendFactory
      Parameters:
      url - the connection url
      Returns:
      the backend, never null
    • getBackendByName

      public Backend getBackendByName(String name)
      Description copied from interface: BackendFactory
      Creates a backend by name.
      Specified by:
      getBackendByName in interface BackendFactory
      Parameters:
      name - the backend name
      Returns:
      the backend, never null
    • getAllBackends

      public Collection<Backend> getAllBackends()
      Description copied from interface: BackendFactory
      Creates a collection of all backends.
      Skips backends marked as deprecated.
      Specified by:
      getAllBackends in interface BackendFactory
      Returns:
      the collection of all backends
      See Also:
    • getBackends

      public Collection<Backend> getBackends(String backendNames)
      Description copied from interface: BackendFactory
      Creates a collection of backends via a comma-separated list of backend names.
      There are some special names as well:
      • all: all non-deprecated backends
      • none: does not match any backend
      • deprecated: all deprecated backends
      The returned list contains each backend only once.
      Specified by:
      getBackends in interface BackendFactory
      Parameters:
      backendNames - the backend names, null or empty if none
      Returns:
      the backends found, empty if none