QRY_Builder.DataCategoryBuilder
Class
global inherited sharing class QRY_Builder.DataCategoryBuilderFluent builder for WITH DATA CATEGORY filters.
Since: 1.0
Example:
List<SObject> articles = QRY_Builder.selectFrom(KnowledgeArticleVersion.SObjectType)
.fields(new List<String>{'Id', 'Title'})
.condition('PublishStatus').equals('Online')
.withDataCategory('Geography__c').at('USA__c')
.withDataCategory('Product__c').below('Electronics__c')
.toList();Methods
| Method | Description |
|---|---|
| global QRY_Builder.Builder above(List<String> categoryNames) | Filters to categories above any of the specified categories in the hierarchy. |
| global QRY_Builder.Builder above(String categoryName) | Filters to categories above the specified category in the hierarchy. |
| global QRY_Builder.Builder aboveOrBelow(List<String> categoryNames) | Filters to categories above or below any of the specified categories in the hierarchy. |
| global QRY_Builder.Builder aboveOrBelow(String categoryName) | Filters to categories above or below the specified category in the hierarchy. |
| global QRY_Builder.Builder at(List<String> categoryNames) | Filters to any of the specified categories. |
| global QRY_Builder.Builder at(String categoryName) | Filters to the exact specified category. |
| global QRY_Builder.Builder below(List<String> categoryNames) | Filters to categories below any of the specified categories in the hierarchy. |
| global QRY_Builder.Builder below(String categoryName) | Filters to categories below the specified category in the hierarchy. |
Method Details
above
global QRY_Builder.Builder above(List<String> categoryNames)Filters to categories above any of the specified categories in the hierarchy.
Parameters:
categoryNames(List) - The category API names
Returns: QRY_Builder.Builder - Builder for chaining
Throws:
- IllegalArgumentException - if categoryNames is null or empty
Since: 1.0
Example:
.withDataCategory('Geography__c').above(new List<String>{'USA__c', 'Canada__c'})above
global QRY_Builder.Builder above(String categoryName)Filters to categories above the specified category in the hierarchy.
Parameters:
categoryName(String) - The category API name
Returns: QRY_Builder.Builder - Builder for chaining
Throws:
- IllegalArgumentException - if categoryName is blank
Since: 1.0
Example:
.withDataCategory('Geography__c').above('USA__c')aboveOrBelow
global QRY_Builder.Builder aboveOrBelow(List<String> categoryNames)Filters to categories above or below any of the specified categories in the hierarchy.
Parameters:
categoryNames(List) - The category API names
Returns: QRY_Builder.Builder - Builder for chaining
Throws:
- IllegalArgumentException - if categoryNames is null or empty
Since: 1.0
Example:
.withDataCategory('Audience__c').aboveOrBelow(new List<String>{'External', 'Internal'})aboveOrBelow
global QRY_Builder.Builder aboveOrBelow(String categoryName)Filters to categories above or below the specified category in the hierarchy.
Parameters:
categoryName(String) - The category API name
Returns: QRY_Builder.Builder - Builder for chaining
Throws:
- IllegalArgumentException - if categoryName is blank
Since: 1.0
Example:
.withDataCategory('Audience__c').aboveOrBelow('External')at
global QRY_Builder.Builder at(List<String> categoryNames)Filters to any of the specified categories.
Parameters:
categoryNames(List) - The category API names
Returns: QRY_Builder.Builder - Builder for chaining
Throws:
- IllegalArgumentException - if categoryNames is null or empty
Since: 1.0
Example:
.withDataCategory('Geography__c').at(new List<String>{'USA__c', 'Canada__c'})at
global QRY_Builder.Builder at(String categoryName)Filters to the exact specified category.
Parameters:
categoryName(String) - The category API name
Returns: QRY_Builder.Builder - Builder for chaining
Throws:
- IllegalArgumentException - if categoryName is blank
Since: 1.0
Example:
.withDataCategory('Geography__c').at('USA__c')below
global QRY_Builder.Builder below(List<String> categoryNames)Filters to categories below any of the specified categories in the hierarchy.
Parameters:
categoryNames(List) - The category API names
Returns: QRY_Builder.Builder - Builder for chaining
Throws:
- IllegalArgumentException - if categoryNames is null or empty
Since: 1.0
Example:
.withDataCategory('Product__c').below(new List<String>{'Electronics__c', 'Clothing__c'})below
global QRY_Builder.Builder below(String categoryName)Filters to categories below the specified category in the hierarchy.
Parameters:
categoryName(String) - The category API name
Returns: QRY_Builder.Builder - Builder for chaining
Throws:
- IllegalArgumentException - if categoryName is blank
Since: 1.0
Example:
.withDataCategory('Product__c').below('Electronics__c')