2 * Copyright © 2020 Damyan Ivanov.
3 * This file is part of MoLe.
4 * MoLe is free software: you can distribute it and/or modify it
5 * under the term of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your opinion), any later version.
9 * MoLe is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License terms for details.
14 * You should have received a copy of the GNU General Public License
15 * along with MoLe. If not, see <https://www.gnu.org/licenses/>.
18 package net.ktnx.mobileledger.ui.transaction_list;
20 import net.ktnx.mobileledger.model.LedgerTransaction;
21 import net.ktnx.mobileledger.model.LedgerTransactionAccount;
23 class TransactionLoaderStep {
24 private final TransactionListAdapter.LoaderStep step;
25 private final TransactionRowHolder holder;
27 private int accountCount;
28 private LedgerTransaction transaction;
29 private LedgerTransactionAccount account;
30 private int accountPosition;
31 private String boldAccountName;
32 public TransactionLoaderStep(TransactionRowHolder holder, int position,
33 LedgerTransaction transaction) {
34 this.step = TransactionListAdapter.LoaderStep.HEAD;
36 this.transaction = transaction;
37 this.position = position;
39 public TransactionLoaderStep(TransactionRowHolder holder, LedgerTransactionAccount account,
40 int accountPosition, String boldAccountName) {
41 this.step = TransactionListAdapter.LoaderStep.ACCOUNTS;
43 this.account = account;
44 this.accountPosition = accountPosition;
45 this.boldAccountName = boldAccountName;
47 public TransactionLoaderStep(TransactionRowHolder holder, int position, int accountCount) {
48 this.step = TransactionListAdapter.LoaderStep.DONE;
50 this.position = position;
51 this.accountCount = accountCount;
53 public int getAccountCount() {
56 public int getPosition() {
59 public String getBoldAccountName() {
60 return boldAccountName;
62 public int getAccountPosition() {
63 return accountPosition;
65 public TransactionRowHolder getHolder() {
68 public TransactionListAdapter.LoaderStep getStep() {
71 public LedgerTransaction getTransaction() {
74 public LedgerTransactionAccount getAccount() {