Class BackendFieldFunctionAdapterRegistry
java.lang.Object
com.kingsrook.qqq.backend.core.model.metadata.fields.functions.BackendFieldFunctionAdapterRegistry
Registry of
BackendFieldFunctionAdapterInterface implementations, keyed
by function type identifier name. These objects are, by design, stored as
properties of QBackendMetaData subclasses (which is why the keys inside
the registry are just function identifiers - each backend has 1 adapter
implementation per function type).
Backend modules (e.g., RDBMS) register adapters here so that when a query is executed, the appropriate backend-specific adapter can be retrieved by function type identifier to generate the correct SQL or other backend syntax.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFieldFunctionAdapter(FieldFunctionTypeIdentifier identifier) Returns an instantiated BackendFieldFunctionAdapterInterface for the given identifier, or null if no adapter is registered.voidregister(FieldFunctionTypeIdentifier identifier, String backendTypeName, QCodeReference adapterCodeReference) Registers an adapter code reference for the given function type identifier and backend type.
-
Constructor Details
-
BackendFieldFunctionAdapterRegistry
public BackendFieldFunctionAdapterRegistry()Constructor
-
-
Method Details
-
register
public void register(FieldFunctionTypeIdentifier identifier, String backendTypeName, QCodeReference adapterCodeReference) Registers an adapter code reference for the given function type identifier and backend type. Validates that the code reference can be instantiated before registering. -
getFieldFunctionAdapter
public BackendFieldFunctionAdapterInterface getFieldFunctionAdapter(FieldFunctionTypeIdentifier identifier) Returns an instantiated BackendFieldFunctionAdapterInterface for the given identifier, or null if no adapter is registered.
-