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 Summary
ConstructorsConstructorDescriptionCreates a backend factory.
Collects all Backend services. -
Method Summary
Modifier and TypeMethodDescriptionCreates a collection of all backends.
Skips backends marked as deprecated.getBackendByName(String name) Creates a backend by name.getBackendByUrl(String url) Creates a backend by jdbc url.getBackends(String backendNames) 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.
-
Constructor Details
-
DefaultBackendFactory
public DefaultBackendFactory()Creates a backend factory.
Collects all Backend services.
-
-
Method Details
-
getBackendByUrl
Description copied from interface:BackendFactoryCreates a backend by jdbc url.- Specified by:
getBackendByUrlin interfaceBackendFactory- Parameters:
url- the connection url- Returns:
- the backend, never null
-
getBackendByName
Description copied from interface:BackendFactoryCreates a backend by name.- Specified by:
getBackendByNamein interfaceBackendFactory- Parameters:
name- the backend name- Returns:
- the backend, never null
-
getAllBackends
Description copied from interface:BackendFactoryCreates a collection of all backends.
Skips backends marked as deprecated.- Specified by:
getAllBackendsin interfaceBackendFactory- Returns:
- the collection of all backends
- See Also:
-
getBackends
Description copied from interface:BackendFactoryCreates 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
- Specified by:
getBackendsin interfaceBackendFactory- Parameters:
backendNames- the backend names, null or empty if none- Returns:
- the backends found, empty if none
-