Uses of Class
ntnu.idatt2016.v233.SmartMat.entity.group.Waste
Packages that use Waste
Package
Description
-
Uses of Waste in ntnu.idatt2016.v233.SmartMat.controller.group
Methods in ntnu.idatt2016.v233.SmartMat.controller.group that return types with arguments of type WasteModifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Waste>
WasteController.createWaste
(WasteRequest waste, org.springframework.security.core.Authentication authentication) Saves a new wasteWasteController.getWasteByGroupId
(long groupId, org.springframework.security.core.Authentication authentication) Gets a waste by its group idorg.springframework.http.ResponseEntity<Waste>
WasteController.getWasteById
(long wasteId, org.springframework.security.core.Authentication authentication) Gets a waste by its idWasteController.getWasteOfCategoryByGroupId
(long groupId, int categoryNumber, org.springframework.security.core.Authentication authentication) Retrieves a list of Waste objects of a specific category from a group -
Uses of Waste in ntnu.idatt2016.v233.SmartMat.repository.group
Methods in ntnu.idatt2016.v233.SmartMat.repository.group that return types with arguments of type WasteModifier and TypeMethodDescriptionWasteRepository.findAllWasteOfOneCategoryFromGroup
(long groupId, String categoryName) Returns a list of all waste items of a given category from a specific group.WasteRepository.findByGroupId
(Group groupId) -
Uses of Waste in ntnu.idatt2016.v233.SmartMat.service.group
Methods in ntnu.idatt2016.v233.SmartMat.service.group that return types with arguments of type WasteModifier and TypeMethodDescriptionWasteService.createWaste
(WasteRequest wasteRequest) Creates a new wasteWasteService.getWasteByGroupId
(long groupId) Gets a waste by its group idWasteService.getWasteById
(long id) Gets a waste by its idWasteService.getWasteOfCategoryByGroupId
(long groupId, String categoryName) Returns an Optional containing a List of Waste objects for a specific category and group id, or an empty Optional if there are no wastes for that category and group id.FridgeService.wasteProductFromFridge
(long fridgeProductId) Deletes a product from the fridge and saves a waste object representing the discarded product. -
Uses of Waste in ntnu.idatt2016.v233.SmartMat.util
Method parameters in ntnu.idatt2016.v233.SmartMat.util with type arguments of type WasteModifier and TypeMethodDescriptionstatic double
StatisticUtil.getAnnualAverage
(List<Waste> wastes, int number) Calculates the annual average amount of CO2 emissions per person based on a list of waste objects and a number of persons.static double
StatisticUtil.getLostMoneyInLastMonth
(List<Waste> wastes) Calculates the total amount of money lost due to expired or discarded items in the last 30 days, based on the list of wastes passed as a parameter.static double[]
StatisticUtil.getNumberOfWasteByCategoryName
(List<Waste> wastes) Get the number of waste items for each category name in a list of waste items.static double[]
StatisticUtil.getNumberOfWasteByLastMonth
(List<Waste> wastes) Calculates the sum of waste for each of the four previous months.