Class BackendVariantsConfig

java.lang.Object
com.kingsrook.qqq.backend.core.model.metadata.variants.BackendVariantsConfig

public class BackendVariantsConfig extends Object
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 Details

    • BackendVariantsConfig

      public BackendVariantsConfig()
  • Method Details

    • getOptionsTableName

      public String getOptionsTableName()
      Getter for tableName
    • setOptionsTableName

      public void setOptionsTableName(String optionsTableName)
      Setter for tableName
    • getOptionsFilter

      public QQueryFilter getOptionsFilter()
      Getter for filter
    • setOptionsFilter

      public void setOptionsFilter(QQueryFilter optionsFilter)
      Setter for filter
    • getBackendSettingSourceFieldNameMap

      public Map<BackendVariantSetting,String> 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

      public String getVariantTypeKey()
      Getter for variantTypeKey
    • setVariantTypeKey

      public void setVariantTypeKey(String variantTypeKey)
      Setter for variantTypeKey
    • withVariantTypeKey

      public BackendVariantsConfig withVariantTypeKey(String variantTypeKey)
      Fluent setter for variantTypeKey
    • withOptionsTableName

      public BackendVariantsConfig withOptionsTableName(String optionsTableName)
      Fluent setter for optionsTableName
    • withOptionsFilter

      public BackendVariantsConfig withOptionsFilter(QQueryFilter optionsFilter)
      Fluent setter for optionsFilter
    • getVariantRecordLookupFunction

      public QCodeReference getVariantRecordLookupFunction()
      Getter for variantRecordLookupFunction
    • setVariantRecordLookupFunction

      public void setVariantRecordLookupFunction(QCodeReference variantRecordLookupFunction)
      Setter for variantRecordLookupFunction
    • withVariantRecordLookupFunction

      public BackendVariantsConfig withVariantRecordLookupFunction(QCodeReference variantRecordLookupFunction)
      Fluent setter for variantRecordLookupFunction