1 package net.ktnx.mobileledger.db;
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;
9 import org.jetbrains.annotations.NotNull;
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)
17 @ColumnInfo(name = "name")
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) {
49 this.regularExpression = regularExpression;
51 public String getTestText() {
54 public void setTestText(String testText) {
55 this.testText = testText;
57 public Integer getTransactionDescriptionMatchGroup() {
58 return transactionDescriptionMatchGroup;
60 public void setTransactionDescriptionMatchGroup(Integer transactionDescriptionMatchGroup) {
61 this.transactionDescriptionMatchGroup = transactionDescriptionMatchGroup;
63 public Integer getTransactionCommentMatchGroup() {
64 return transactionCommentMatchGroup;
66 public void setTransactionCommentMatchGroup(Integer transactionCommentMatchGroup) {
67 this.transactionCommentMatchGroup = transactionCommentMatchGroup;
69 public Integer getDateYear() {
72 public void setDateYear(Integer dateYear) {
73 this.dateYear = dateYear;
75 public Integer getDateMonth() {
78 public void setDateMonth(Integer dateMonth) {
79 this.dateMonth = dateMonth;
81 public Integer getDateDay() {
84 public void setDateDay(Integer dateDay) {
85 this.dateDay = dateDay;
91 public void setId(@NonNull Long id) {
95 public String getName() {
98 public void setName(@NonNull String name) {
102 public String getRegularExpression() {
103 return regularExpression;
105 public void setRegularExpression(@NonNull String regularExpression) {
106 this.regularExpression = regularExpression;
108 public String getTransactionDescription() {
109 return transactionDescription;
111 public void setTransactionDescription(String transactionDescription) {
112 this.transactionDescription = transactionDescription;
114 public String getTransactionComment() {
115 return transactionComment;
117 public void setTransactionComment(String transactionComment) {
118 this.transactionComment = transactionComment;
120 public Integer getDateYearMatchGroup() {
121 return dateYearMatchGroup;
123 public void setDateYearMatchGroup(Integer dateYearMatchGroup) {
124 this.dateYearMatchGroup = dateYearMatchGroup;
126 public Integer getDateMonthMatchGroup() {
127 return dateMonthMatchGroup;
129 public void setDateMonthMatchGroup(Integer dateMonthMatchGroup) {
130 this.dateMonthMatchGroup = dateMonthMatchGroup;
132 public Integer getDateDayMatchGroup() {
133 return dateDayMatchGroup;
135 public void setDateDayMatchGroup(Integer dateDayMatchGroup) {
136 this.dateDayMatchGroup = dateDayMatchGroup;