Class GetAllGroupingItems
A helper class for getting all grouping items recursively for a given grouping
Inheritance
Inherited Members
Namespace: LemonEdge.API.Entities.Helpers.Queries
Assembly: LemonEdge.API.dll
Syntax
public class GetAllGroupingItems : SQLWrapperExecuter<IGroupingItem>
Constructors
GetAllGroupingItems(IEntityRetriever, IReadOnlyCache)
Creates a new SQLWrapperExecuter for the GetAllGroupingItems standard SQL Wrapper query
Declaration
public GetAllGroupingItems(IEntityRetriever retriever, IReadOnlyCache cache)
Parameters
| Type | Name | Description |
|---|---|---|
| IEntityRetriever | retriever | A IEntityRetriever context for querying the LemonEdge platform |
| IReadOnlyCache | cache | A local cache |
Fields
PARAM_AUTOROLLUP
The parameter for auto rolling up groupings
Declaration
public static readonly string PARAM_AUTOROLLUP
Field Value
| Type | Description |
|---|---|
| string |
PARAM_GROUPINGID
The parameter for the grouping to run this query against
Declaration
public static readonly string PARAM_GROUPINGID
Field Value
| Type | Description |
|---|---|
| string |
QUERYNAME
Global name of the SQLWrapper query that returns all grouping items recursively for a given grouping
Declaration
public const string QUERYNAME = "GetAllGroupingItems"
Field Value
| Type | Description |
|---|---|
| string |
Methods
AddAutoRollup(bool)
Adds the specified auto rollup flag
Declaration
public GetAllGroupingItems AddAutoRollup(bool autorollup)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | autorollup | Indicates if grouping amounts should be auto rolled up to each level |
Returns
| Type | Description |
|---|---|
| GetAllGroupingItems | This GetAllGroupingItems instance for chaining commands |
AddRootGroupingID(Guid)
Adds the specified grouping id to the parameters for executing this query
Declaration
public GetAllGroupingItems AddRootGroupingID(Guid rootGroupingID)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | rootGroupingID | The grouping id to run the GetAllGroupingItems query with |
Returns
| Type | Description |
|---|---|
| GetAllGroupingItems | This GetAllGroupingItems instance for chaining commands |
Execute(IEntityRetriever, IReadOnlyCache, Guid, bool, QueryableExecuter<IGroupingItem>)
Executes the GetCanvasItems system SQLWrapper using the specified parameters, and returns the results of the results of that query
Declaration
public static Task<IEnumerable<IGroupingItem>> Execute(IEntityRetriever retriever, IReadOnlyCache cache, Guid rootGroupingID, bool autoRollup, QueryableExecuter<IGroupingItem> filter = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IEntityRetriever | retriever | A IEntityRetriever context for querying the LemonEdge platform |
| IReadOnlyCache | cache | A local cache |
| Guid | rootGroupingID | The grouping id to run the GetAllGroupingItems query with |
| bool | autoRollup | |
| QueryableExecuter<IGroupingItem> | filter | An optional QueryableExecuter<T> that holds any filtering to apply to the query |
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<IGroupingItem>> | A task holding the results of executing the GetCanvasItems query with the specified parameters |
Execute(Guid, bool, QueryableExecuter<IGroupingItem>)
Executes the GetAllGroupingItems system SQLWrapper using the specified parameters, and returns the results of the results of that query
Declaration
public Task<IEnumerable<IGroupingItem>> Execute(Guid rootGroupingID, bool autoRollup, QueryableExecuter<IGroupingItem> filter = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | rootGroupingID | The grouping id to run the GetAllGroupingItems query with |
| bool | autoRollup | |
| QueryableExecuter<IGroupingItem> | filter | An optional QueryableExecuter<T> that holds any filtering to apply to the query |
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<IGroupingItem>> | A task holding the results of executing the GetAllGroupingItems query with the specified parameters |
ExecuteCount(IEntityRetriever, IReadOnlyCache, Guid, bool, QueryableExecuter<IGroupingItem>)
Executes the GetAllGroupingItems system SQLWrapper using the specified parameters, and returns the count of the results of that query
Declaration
public static Task<int> ExecuteCount(IEntityRetriever retriever, IReadOnlyCache cache, Guid rootGroupingID, bool autoRollup, QueryableExecuter<IGroupingItem> filter = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IEntityRetriever | retriever | A IEntityRetriever context for querying the LemonEdge platform |
| IReadOnlyCache | cache | A local cache |
| Guid | rootGroupingID | The grouping id to run the GetAllGroupingItems query with |
| bool | autoRollup | |
| QueryableExecuter<IGroupingItem> | filter | An optional QueryableExecuter<T> that holds any filtering to apply to the query |
Returns
| Type | Description |
|---|---|
| Task<int> | A task holding the count of executing the GetAllGroupingItems query with the specified parameters |
ExecuteCount(Guid, bool, QueryableExecuter<IGroupingItem>)
Executes the GetAllGroupingItems system SQLWrapper using the specified parameters, and returns the count of the results of that query
Declaration
public Task<int> ExecuteCount(Guid rootGroupingID, bool autoRollup, QueryableExecuter<IGroupingItem> filter = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | rootGroupingID | The grouping id to run the GetAllGroupingItems query with |
| bool | autoRollup | |
| QueryableExecuter<IGroupingItem> | filter | An optional QueryableExecuter<T> that holds any filtering to apply to the query |
Returns
| Type | Description |
|---|---|
| Task<int> | A task holding the count of executing the GetAllGroupingItems query with the specified parameters |
ParametersAreValid()
Indicates if the parameters are valid for executing the query
Declaration
protected override bool ParametersAreValid()
Returns
| Type | Description |
|---|---|
| bool | True if the parameters contain a value for @canvasID |