Class GetPaths
A helper class for executing the system default GetPaths query
See https://web.lemonedge.com/help/getpaths/ for more information.
Inheritance
Inherited Members
Namespace: LemonEdge.API.Entities.Helpers.Queries
Assembly: API.dll
Syntax
public class GetPaths : SQLWrapperExecuter<IAllocationMapping>
Constructors
GetPaths(IEntityRetriever, IReadOnlyCache)
Creates a new SQLWrapperExecuter for the GetPaths standard SQL Wrapper query
Declaration
public GetPaths(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_ENTITYSET
Declaration
public const string PARAM_ENTITYSET = "@entitySetID"
Field Value
Type | Description |
---|---|
System.String |
PARAM_INSTRUMENT
Declaration
public const string PARAM_INSTRUMENT = "@instrumentID"
Field Value
Type | Description |
---|---|
System.String |
PARAM_PATH
Declaration
public const string PARAM_PATH = "@pathID"
Field Value
Type | Description |
---|---|
System.String |
QUERYNAME
Global name of the SQLWrapper query
Declaration
public const string QUERYNAME = "GetPaths"
Field Value
Type | Description |
---|---|
System.String |
Methods
AddEntitySetID(Nullable<Guid>)
The Entity set within which the instruments/paths belong
Declaration
public GetPaths AddEntitySetID(Guid? entitySetID)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Guid> | entitySetID | The entity set id to run the GetPaths query with |
Returns
Type | Description |
---|---|
GetPaths | This GetPaths instance for chaining commands |
AddInstrumentID(Nullable<Guid>)
The instrument ID to return its mapped paths for. If this is null it will return all paths within an entity set and their associated instruments that are mapped to those paths
Declaration
public GetPaths AddInstrumentID(Guid? instrumentID)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Guid> | instrumentID | The instrument id to run the GetPaths query with |
Returns
Type | Description |
---|---|
GetPaths | This GetPaths instance for chaining commands |
AddPathID(Nullable<Guid>)
The path to return
Declaration
public GetPaths AddPathID(Guid? pathID)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Guid> | pathID | The path to run the GetPaths query with |
Returns
Type | Description |
---|---|
GetPaths | This GetPaths instance for chaining commands |
Execute(IEntityRetriever, IReadOnlyCache, Nullable<Guid>, Nullable<Guid>, QueryableExecuter<IAllocationMapping>)
Executes the GetPaths system SQLWrapper using the specified parameters, and returns the results of the results of that query
Declaration
public static Task<IEnumerable<IAllocationMapping>> Execute(IEntityRetriever retriever, IReadOnlyCache cache, Guid? entitySetID, Guid? instrumentID, QueryableExecuter<IAllocationMapping> filter = null)
Parameters
Type | Name | Description |
---|---|---|
IEntityRetriever | retriever | A IEntityRetriever context for querying the LemonEdge platform |
IReadOnlyCache | cache | A local cache |
System.Nullable<System.Guid> | entitySetID | The Entity set within which the instruments/paths belong |
System.Nullable<System.Guid> | instrumentID | The instrument ID to return its mapped paths for. If this is null it will return all paths within an entity set and their associated instruments that are mapped to those paths |
QueryableExecuter<IAllocationMapping> | filter | An optional QueryableExecuter<T> that holds any filtering to apply to the query |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<IAllocationMapping>> | A task holding the results of executing the GetPaths query with the specified parameters |
Execute(IEntityRetriever, IReadOnlyCache, Nullable<Guid>, Nullable<Guid>, Nullable<Guid>, QueryableExecuter<IAllocationMapping>)
Executes the GetPaths system SQLWrapper using the specified parameters, and returns the results of the results of that query
Declaration
public static Task<IEnumerable<IAllocationMapping>> Execute(IEntityRetriever retriever, IReadOnlyCache cache, Guid? entitySetID, Guid? pathID, Guid? instrumentID, QueryableExecuter<IAllocationMapping> filter = null)
Parameters
Type | Name | Description |
---|---|---|
IEntityRetriever | retriever | A IEntityRetriever context for querying the LemonEdge platform |
IReadOnlyCache | cache | A local cache |
System.Nullable<System.Guid> | entitySetID | The Entity set within which the instruments/paths belong |
System.Nullable<System.Guid> | pathID | The path to return |
System.Nullable<System.Guid> | instrumentID | The instrument ID to return its mapped paths for. If this is null it will return all paths within an entity set and their associated instruments that are mapped to those paths |
QueryableExecuter<IAllocationMapping> | filter | An optional QueryableExecuter<T> that holds any filtering to apply to the query |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<IAllocationMapping>> | A task holding the results of executing the GetPaths query with the specified parameters |
Execute(Nullable<Guid>, Nullable<Guid>, Nullable<Guid>, QueryableExecuter<IAllocationMapping>)
Executes the GetPaths system SQLWrapper using the specified parameters, and returns the results of the results of that query
Declaration
public Task<IEnumerable<IAllocationMapping>> Execute(Guid? entitySetID, Guid? pathID, Guid? instrumentID, QueryableExecuter<IAllocationMapping> filter = null)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Guid> | entitySetID | The Entity set within which the instruments/paths belong |
System.Nullable<System.Guid> | pathID | The path to return |
System.Nullable<System.Guid> | instrumentID | The instrument ID to return its mapped paths for. If this is null it will return all paths within an entity set and their associated instruments that are mapped to those paths |
QueryableExecuter<IAllocationMapping> | filter | An optional QueryableExecuter<T> that holds any filtering to apply to the query |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<IAllocationMapping>> | A task holding the results of executing the GetPaths query with the specified parameters |
ParametersAreValid()
Indicates if the parameters are valid for executing the query
Declaration
protected override bool ParametersAreValid()
Returns
Type | Description |
---|---|
System.Boolean | True |