Repository navigation
API documentation
The classes used to store logical entities are located in the models/ folder. The most important are:
-
Item- a single entry in a check (i.e. name, price, quantity) -
Check- info about a check (i.e. items, time, store) -
Store- store properties (i.e. address, name of chain)
Others are supplementary and mostly speak for themselves. However, some of them need a brief extra description:
-
Rating- abstraction for calculating average rating -
Review- abstraction for a single rating of a user -
ItemInStore- a convenience class for return type of some methods -
Filter- a wrapper for multiple predicates to filter the items
The main UCheck class provides an interface for interacting with the prices' database:
-
void addCheck(Check, Review)updates the database according to theCheckinformation (i.e. lower the price for anItemin aStore, increase the price after a discount has expired and so on), and also adds aReviewto the correspondingStore -
void removeOldChecks(DateTime)removes all information added by checks that are as old or older than the specified date and time -
Rating getStoreRating(Store)simply retrieves theRatingof the specifiedStore -
List<ItemInStore> getFilteredItemInStores(int, Filter, SortRule)returns the list ofItemInStoreobjects corresponding to theItemspecified by its int code, filtered using aFilterand sorted using aSortRule -
List<ItemInStore> getFilteredItemInStores(int, Filter, SortRule, Coordinates)does the same thing, but enables sorting and filtering by customerCoordinates