2 * Copyright © 2021 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.db;
20 import androidx.annotation.NonNull;
21 import androidx.room.ColumnInfo;
22 import androidx.room.Entity;
24 @Entity(tableName = "accounts", primaryKeys = {"profile", "name"})
25 public class Account {
30 private String profile;
35 @ColumnInfo(name = "name_upper")
36 private String nameUpper;
37 @ColumnInfo(name = "parent_name")
38 private String parentName;
39 @ColumnInfo(defaultValue = "1")
40 private boolean expanded = true;
41 @ColumnInfo(name = "amounts_expanded", defaultValue = "0")
42 private boolean amountsExpanded = false;
43 @ColumnInfo(defaultValue = "0")
44 private int generation;
46 public String getProfile() {
49 public void setProfile(@NonNull String profile) {
50 this.profile = profile;
53 public String getName() {
56 public void setName(@NonNull String name) {
60 public String getNameUpper() {
63 public void setNameUpper(@NonNull String nameUpper) {
64 this.nameUpper = nameUpper;
66 public int getLevel() {
69 public void setLevel(int level) {
72 public String getParentName() {
75 public void setParentName(String parentName) {
76 this.parentName = parentName;
78 public boolean isExpanded() {
81 public void setExpanded(boolean expanded) {
82 this.expanded = expanded;
84 public boolean isAmountsExpanded() {
85 return amountsExpanded;
87 public void setAmountsExpanded(boolean amountsExpanded) {
88 this.amountsExpanded = amountsExpanded;
90 public int getGeneration() {
93 public void setGeneration(int generation) {
94 this.generation = generation;
98 public String toString() {