Interface ExpenseRepository
- All Known Implementing Classes:
MongoExpenseRepository
public interface ExpenseRepository
Interface used for dealing with storage and retrieval of expense
-
Method Summary
Modifier and TypeMethodDescriptionchangeExpense
(int id, BigDecimal newAmount) Changes the expense with given IDgetExpense
(int id) Finds the expense with given idFinds all the expenses savedsaveExpense
(Expense expense) Saves the expense to storage
-
Method Details
-
saveExpense
-
getExpense
-
getExpenses
-
changeExpense
Changes the expense with given ID- Parameters:
id
- ID identifying the expense. It is the left value displayed when calling showExpensesnewAmount
- Will update the value to this value. If set to zero. The expanse will be removed- Returns:
- Changed expense or empty if did not change
-