Class BackendVariantsConfig
java.lang.Object
com.kingsrook.qqq.backend.core.model.metadata.variants.BackendVariantsConfig
Configs for how a backend that uses variants works. Specifically:
- the variant "type key" - e.g., key for variants map in session.
- what table supplies the variant options (optionsTableName
- an optional filter to apply to that options table
- a map of the settings that a backend gets from its variant table to the
field names in that table that they come from. e.g., a backend may have a
username attribute, whose value comes from a field named "theUser" in the
variant options table.
- an optional code reference to a variantRecordLookupFunction - to customize
how the variant record is looked up (such as, adding joined or other custom
fields).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGetter for backendSettingSourceFieldNameMapGetter for filterGetter for tableNameGetter for variantRecordLookupFunctionGetter for variantTypeKeyvoidsetBackendSettingSourceFieldNameMap(Map<BackendVariantSetting, String> backendSettingSourceFieldNameMap) Setter for backendSettingSourceFieldNameMapvoidsetOptionsFilter(QQueryFilter optionsFilter) Setter for filtervoidsetOptionsTableName(String optionsTableName) Setter for tableNamevoidsetVariantRecordLookupFunction(QCodeReference variantRecordLookupFunction) Setter for variantRecordLookupFunctionvoidsetVariantTypeKey(String variantTypeKey) Setter for variantTypeKeywithBackendSettingSourceFieldName(BackendVariantSetting backendVariantSetting, String sourceFieldName) Fluent setter for backendSettingSourceFieldNameMapwithBackendSettingSourceFieldNameMap(Map<BackendVariantSetting, String> backendSettingSourceFieldNameMap) Fluent setter for backendSettingSourceFieldNameMapwithOptionsFilter(QQueryFilter optionsFilter) Fluent setter for optionsFilterwithOptionsTableName(String optionsTableName) Fluent setter for optionsTableNamewithVariantRecordLookupFunction(QCodeReference variantRecordLookupFunction) Fluent setter for variantRecordLookupFunctionwithVariantTypeKey(String variantTypeKey) Fluent setter for variantTypeKey
-
Constructor Details
-
BackendVariantsConfig
public BackendVariantsConfig()
-
-
Method Details
-
getOptionsTableName
Getter for tableName -
setOptionsTableName
Setter for tableName -
getOptionsFilter
Getter for filter -
setOptionsFilter
Setter for filter -
getBackendSettingSourceFieldNameMap
Getter for backendSettingSourceFieldNameMap -
setBackendSettingSourceFieldNameMap
public void setBackendSettingSourceFieldNameMap(Map<BackendVariantSetting, String> backendSettingSourceFieldNameMap) Setter for backendSettingSourceFieldNameMap -
withBackendSettingSourceFieldName
public BackendVariantsConfig withBackendSettingSourceFieldName(BackendVariantSetting backendVariantSetting, String sourceFieldName) Fluent setter for backendSettingSourceFieldNameMap -
withBackendSettingSourceFieldNameMap
public BackendVariantsConfig withBackendSettingSourceFieldNameMap(Map<BackendVariantSetting, String> backendSettingSourceFieldNameMap) Fluent setter for backendSettingSourceFieldNameMap -
getVariantTypeKey
Getter for variantTypeKey -
setVariantTypeKey
Setter for variantTypeKey -
withVariantTypeKey
Fluent setter for variantTypeKey -
withOptionsTableName
Fluent setter for optionsTableName -
withOptionsFilter
Fluent setter for optionsFilter -
getVariantRecordLookupFunction
Getter for variantRecordLookupFunction -
setVariantRecordLookupFunction
Setter for variantRecordLookupFunction -
withVariantRecordLookupFunction
public BackendVariantsConfig withVariantRecordLookupFunction(QCodeReference variantRecordLookupFunction) Fluent setter for variantRecordLookupFunction
-