C# Класс Unipluss.TransactionService.DAL.SearchRepository

Наследование: ISearchRepository
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
EnsureTotalsIndex System.Threading.Tasks.Task
EnsureTransactionIndex System.Threading.Tasks.Task

Открытые методы

Метод Описание
AddOrUpdateTotalsItem ( ) : void
AddToIndex ( ) : void

Adds transaction items to search index or updates existing items. When transaction amount is > 1, adds multiple items to search index for facet queries. Converts all entities to batches of up to 1000 to efficiently update search index. Throws exception when search index operation fails.

AddToIndex ( Transaction t ) : void

Adds the transaction item to search index. Can also be used for updating existing items by specifying the Transaction.ID value. Throws exception when item is not valid, resolving customer external ID failed or if search index operation fails.

DeleteFromIndex ( int mvanumber, System.Guid id ) : void

Removes the transaction from search index that matches the mva number and ID. Can delete multiple index items when transaction amount was > 1.

DeleteOldTransactions ( ) : void
DeleteTotalsItemWithID ( ) : void
EnsureStorageCreated ( ) : System.Threading.Tasks.Task
GetTotalsItemsForCustomer ( System.Guid customerInternalID, string productID, int dateVal ) : IEnumerable
GetTransactionById ( int mvanumber, System.Guid id ) : List

Gets the transaction item(s) matching the mva number and ID from search index. Can return multiple items if transaction Amount > 1.

GetTransactionCountsForTopCustomers ( int mvanumber, string productID, int startDateVal, int endDateVal ) : List

Finds top 10 customers who have the highest amount of transactions for a specific product inside the time period. Also returns a 11th item that contains the amount of transactions for the rest of the customers that didn't make it into the top 10.

GetTransactionCountsPerMonthForProduct ( int mvanumber, string productID, int startDateVal, int endDateVal ) : List

Finds transaction counts for a specific product in every month.

GetTransactionCountsPerMonthPerProduct ( int mvanumber, string customerInternalID, int startDateVal, int endDateVal ) : List

Finds customer's transaction counts per product per month.

GetUniqueProductIDs ( int mvanumber ) : List

Gets the names of all the products for given mva number that have transactions added to the search index.

Приватные методы

Метод Описание
EnsureTotalsIndex ( ) : System.Threading.Tasks.Task
EnsureTransactionIndex ( ) : System.Threading.Tasks.Task

Описание методов

AddOrUpdateTotalsItem() публичный Метод

public AddOrUpdateTotalsItem ( ) : void
Результат void

AddToIndex() публичный Метод

Adds transaction items to search index or updates existing items. When transaction amount is > 1, adds multiple items to search index for facet queries. Converts all entities to batches of up to 1000 to efficiently update search index. Throws exception when search index operation fails.
public AddToIndex ( ) : void
Результат void

AddToIndex() публичный Метод

Adds the transaction item to search index. Can also be used for updating existing items by specifying the Transaction.ID value. Throws exception when item is not valid, resolving customer external ID failed or if search index operation fails.
public AddToIndex ( Transaction t ) : void
t Transaction
Результат void

DeleteFromIndex() публичный Метод

Removes the transaction from search index that matches the mva number and ID. Can delete multiple index items when transaction amount was > 1.
public DeleteFromIndex ( int mvanumber, System.Guid id ) : void
mvanumber int
id System.Guid
Результат void

DeleteOldTransactions() публичный Метод

public DeleteOldTransactions ( ) : void
Результат void

DeleteTotalsItemWithID() публичный Метод

public DeleteTotalsItemWithID ( ) : void
Результат void

EnsureStorageCreated() публичный Метод

public EnsureStorageCreated ( ) : System.Threading.Tasks.Task
Результат System.Threading.Tasks.Task

GetTotalsItemsForCustomer() публичный Метод

public GetTotalsItemsForCustomer ( System.Guid customerInternalID, string productID, int dateVal ) : IEnumerable
customerInternalID System.Guid
productID string
dateVal int
Результат IEnumerable

GetTransactionById() публичный Метод

Gets the transaction item(s) matching the mva number and ID from search index. Can return multiple items if transaction Amount > 1.
public GetTransactionById ( int mvanumber, System.Guid id ) : List
mvanumber int
id System.Guid
Результат List

GetTransactionCountsForTopCustomers() публичный Метод

Finds top 10 customers who have the highest amount of transactions for a specific product inside the time period. Also returns a 11th item that contains the amount of transactions for the rest of the customers that didn't make it into the top 10.
public GetTransactionCountsForTopCustomers ( int mvanumber, string productID, int startDateVal, int endDateVal ) : List
mvanumber int required
productID string required
startDateVal int required
endDateVal int required
Результат List

GetTransactionCountsPerMonthForProduct() публичный Метод

Finds transaction counts for a specific product in every month.
public GetTransactionCountsPerMonthForProduct ( int mvanumber, string productID, int startDateVal, int endDateVal ) : List
mvanumber int required
productID string required
startDateVal int required
endDateVal int required
Результат List

GetTransactionCountsPerMonthPerProduct() публичный Метод

Finds customer's transaction counts per product per month.
public GetTransactionCountsPerMonthPerProduct ( int mvanumber, string customerInternalID, int startDateVal, int endDateVal ) : List
mvanumber int required
customerInternalID string required
startDateVal int required
endDateVal int required
Результат List

GetUniqueProductIDs() публичный Метод

Gets the names of all the products for given mva number that have transactions added to the search index.
public GetUniqueProductIDs ( int mvanumber ) : List
mvanumber int required
Результат List