Class CodeScanStatisticsService
java.lang.Object
com.persequor.saga.modules.dpp.service.CodeScanStatisticsService
- All Implemented Interfaces:
ICodeScanStatisticsService
@Singleton
public class CodeScanStatisticsService
extends Object
implements ICodeScanStatisticsService
-
Constructor Summary
ConstructorsConstructorDescriptionCodeScanStatisticsService
(CodeScanStatisticsRepository codeScanStatisticsRepository, IDppDataService dppDataService) -
Method Summary
Modifier and TypeMethodDescriptionGet statistics for a specific code.Get statistics for all scanned codes without any filtering.void
incrementByCode
(String code) Increment the scan count for the given code.
-
Constructor Details
-
CodeScanStatisticsService
@Inject public CodeScanStatisticsService(CodeScanStatisticsRepository codeScanStatisticsRepository, IDppDataService dppDataService)
-
-
Method Details
-
incrementByCode
Description copied from interface:ICodeScanStatisticsService
Increment the scan count for the given code.If the code does not exist in the statistics, it will be added.
- Specified by:
incrementByCode
in interfaceICodeScanStatisticsService
- Parameters:
code
- The code to increment the scan count for
-
getByCode
Description copied from interface:ICodeScanStatisticsService
Get statistics for a specific code.If the code has item data, the item data will be included in the result, and the
knownCode
flag set to true.- Specified by:
getByCode
in interfaceICodeScanStatisticsService
- Parameters:
code
- The code to get statistics for- Returns:
- Statistics for the given code, if it exists,
Optional.empty()
otherwise
-
getStatistics
Description copied from interface:ICodeScanStatisticsService
Get statistics for all scanned codes without any filtering.Any item code which has item data will have the item data included in the result, and the
knownCode
flag set to true.- Specified by:
getStatistics
in interfaceICodeScanStatisticsService
- Returns:
- List of statistics for all scanned codes
-