C# Class Unipluss.TransactionService.DAL.SearchRepository

Inheritance: ISearchRepository
Afficher le fichier Open project: unipluss/invoicetransactions Class Usage Examples

Private Properties

Свойство Type Description
EnsureTotalsIndex System.Threading.Tasks.Task
EnsureTransactionIndex System.Threading.Tasks.Task

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
EnsureTotalsIndex ( ) : System.Threading.Tasks.Task
EnsureTransactionIndex ( ) : System.Threading.Tasks.Task

Method Details

AddOrUpdateTotalsItem() public méthode

public AddOrUpdateTotalsItem ( ) : void
Résultat void

AddToIndex() public méthode

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
Résultat void

AddToIndex() public méthode

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
Résultat void

DeleteFromIndex() public méthode

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
Résultat void

DeleteOldTransactions() public méthode

public DeleteOldTransactions ( ) : void
Résultat void

DeleteTotalsItemWithID() public méthode

public DeleteTotalsItemWithID ( ) : void
Résultat void

EnsureStorageCreated() public méthode

public EnsureStorageCreated ( ) : System.Threading.Tasks.Task
Résultat System.Threading.Tasks.Task

GetTotalsItemsForCustomer() public méthode

public GetTotalsItemsForCustomer ( System.Guid customerInternalID, string productID, int dateVal ) : IEnumerable
customerInternalID System.Guid
productID string
dateVal int
Résultat IEnumerable

GetTransactionById() public méthode

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
Résultat List

GetTransactionCountsForTopCustomers() public méthode

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
Résultat List

GetTransactionCountsPerMonthForProduct() public méthode

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
Résultat List

GetTransactionCountsPerMonthPerProduct() public méthode

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
Résultat List

GetUniqueProductIDs() public méthode

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
Résultat List