Class ExpenseService
java.lang.Object
com.truebubo.maniflow.expense.ExpenseService
- All Implemented Interfaces:
MoneyExchangeService<Expense>
Handles business logic behind expenses
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ExpenseService
Service for expenses- Parameters:
expenseRepository
- Repository for data about expenses
-
-
Method Details
-
get
Gets the list of all the expenses saved by the user- Specified by:
get
in interfaceMoneyExchangeService<Expense>
- Returns:
- All the expenses saved
-
add
Saves the expense- Specified by:
add
in interfaceMoneyExchangeService<Expense>
- Parameters:
expense
- Information about the expense to be added
-
change
Change the value on the expense with given id- Specified by:
change
in interfaceMoneyExchangeService<Expense>
- 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 value will be removed
-