]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/java/net/ktnx/mobileledger/db/PatternHeader.java
add test text to pattern table and drop position
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / db / PatternHeader.java
1 package net.ktnx.mobileledger.db;
2
3 import androidx.annotation.NonNull;
4 import androidx.room.ColumnInfo;
5 import androidx.room.Entity;
6 import androidx.room.Index;
7 import androidx.room.PrimaryKey;
8
9 import org.jetbrains.annotations.NotNull;
10
11 @Entity(tableName = "patterns",
12         indices = {@Index(name = "un_patterns_id", value = "id", unique = true)})
13 public class PatternHeader extends PatternBase {
14     @PrimaryKey(autoGenerate = true)
15     @NonNull
16     private Long id;
17     @ColumnInfo(name = "name")
18     @NonNull
19     private String name;
20     @NonNull
21     @ColumnInfo(name = "regular_expression")
22     private String regularExpression;
23     @ColumnInfo(name = "test_text")
24     private String testText;
25     @ColumnInfo(name = "transaction_description")
26     private String transactionDescription;
27     @ColumnInfo(name = "transaction_description_match_group")
28     private Integer transactionDescriptionMatchGroup;
29     @ColumnInfo(name = "transaction_comment")
30     private String transactionComment;
31     @ColumnInfo(name = "transaction_comment_match_group")
32     private Integer transactionCommentMatchGroup;
33     @ColumnInfo(name = "date_year")
34     private Integer dateYear;
35     @ColumnInfo(name = "date_year_match_group")
36     private Integer dateYearMatchGroup;
37     @ColumnInfo(name = "date_month")
38     private Integer dateMonth;
39     @ColumnInfo(name = "date_month_match_group")
40     private Integer dateMonthMatchGroup;
41     @ColumnInfo(name = "date_day")
42     private Integer dateDay;
43     @ColumnInfo(name = "date_day_match_group")
44     private Integer dateDayMatchGroup;
45     public PatternHeader(@NotNull Long id, @NonNull String name,
46                          @NonNull String regularExpression) {
47         this.id = id;
48         this.name = name;
49         this.regularExpression = regularExpression;
50     }
51     public String getTestText() {
52         return testText;
53     }
54     public void setTestText(String testText) {
55         this.testText = testText;
56     }
57     public Integer getTransactionDescriptionMatchGroup() {
58         return transactionDescriptionMatchGroup;
59     }
60     public void setTransactionDescriptionMatchGroup(Integer transactionDescriptionMatchGroup) {
61         this.transactionDescriptionMatchGroup = transactionDescriptionMatchGroup;
62     }
63     public Integer getTransactionCommentMatchGroup() {
64         return transactionCommentMatchGroup;
65     }
66     public void setTransactionCommentMatchGroup(Integer transactionCommentMatchGroup) {
67         this.transactionCommentMatchGroup = transactionCommentMatchGroup;
68     }
69     public Integer getDateYear() {
70         return dateYear;
71     }
72     public void setDateYear(Integer dateYear) {
73         this.dateYear = dateYear;
74     }
75     public Integer getDateMonth() {
76         return dateMonth;
77     }
78     public void setDateMonth(Integer dateMonth) {
79         this.dateMonth = dateMonth;
80     }
81     public Integer getDateDay() {
82         return dateDay;
83     }
84     public void setDateDay(Integer dateDay) {
85         this.dateDay = dateDay;
86     }
87     @NonNull
88     public Long getId() {
89         return id;
90     }
91     public void setId(@NonNull Long id) {
92         this.id = id;
93     }
94     @NonNull
95     public String getName() {
96         return name;
97     }
98     public void setName(@NonNull String name) {
99         this.name = name;
100     }
101     @NonNull
102     public String getRegularExpression() {
103         return regularExpression;
104     }
105     public void setRegularExpression(@NonNull String regularExpression) {
106         this.regularExpression = regularExpression;
107     }
108     public String getTransactionDescription() {
109         return transactionDescription;
110     }
111     public void setTransactionDescription(String transactionDescription) {
112         this.transactionDescription = transactionDescription;
113     }
114     public String getTransactionComment() {
115         return transactionComment;
116     }
117     public void setTransactionComment(String transactionComment) {
118         this.transactionComment = transactionComment;
119     }
120     public Integer getDateYearMatchGroup() {
121         return dateYearMatchGroup;
122     }
123     public void setDateYearMatchGroup(Integer dateYearMatchGroup) {
124         this.dateYearMatchGroup = dateYearMatchGroup;
125     }
126     public Integer getDateMonthMatchGroup() {
127         return dateMonthMatchGroup;
128     }
129     public void setDateMonthMatchGroup(Integer dateMonthMatchGroup) {
130         this.dateMonthMatchGroup = dateMonthMatchGroup;
131     }
132     public Integer getDateDayMatchGroup() {
133         return dateDayMatchGroup;
134     }
135     public void setDateDayMatchGroup(Integer dateDayMatchGroup) {
136         this.dateDayMatchGroup = dateDayMatchGroup;
137     }
138 }