|
@@ -29,14 +29,15 @@ public class CategoryDBDao extends AbstractDao<CategoryDB, Long> {
|
29
|
29
|
public final static Property Demo = new Property(2, String.class, "demo", false, "DEMO");
|
30
|
30
|
public final static Property Name = new Property(3, String.class, "name", false, "NAME");
|
31
|
31
|
public final static Property Type = new Property(4, int.class, "type", false, "TYPE");
|
32
|
|
- public final static Property Account = new Property(5, long.class, "account", false, "ACCOUNT");
|
33
|
|
- public final static Property Category_id = new Property(6, int.class, "category_id", false, "CATEGORY_ID");
|
34
|
|
- public final static Property Year = new Property(7, int.class, "year", false, "YEAR");
|
35
|
|
- public final static Property Month = new Property(8, int.class, "month", false, "MONTH");
|
36
|
|
- public final static Property Day = new Property(9, int.class, "day", false, "DAY");
|
37
|
|
- public final static Property CreateTime = new Property(10, long.class, "createTime", false, "CREATE_TIME");
|
38
|
|
- public final static Property UpdateTime = new Property(11, long.class, "updateTime", false, "UPDATE_TIME");
|
39
|
|
- public final static Property User_id = new Property(12, int.class, "user_id", false, "USER_ID");
|
|
32
|
+ public final static Property Image_path = new Property(5, String.class, "image_path", false, "IMAGE_PATH");
|
|
33
|
+ public final static Property Account = new Property(6, long.class, "account", false, "ACCOUNT");
|
|
34
|
+ public final static Property Category_id = new Property(7, int.class, "category_id", false, "CATEGORY_ID");
|
|
35
|
+ public final static Property Year = new Property(8, int.class, "year", false, "YEAR");
|
|
36
|
+ public final static Property Month = new Property(9, int.class, "month", false, "MONTH");
|
|
37
|
+ public final static Property Day = new Property(10, int.class, "day", false, "DAY");
|
|
38
|
+ public final static Property CreateTime = new Property(11, long.class, "createTime", false, "CREATE_TIME");
|
|
39
|
+ public final static Property UpdateTime = new Property(12, long.class, "updateTime", false, "UPDATE_TIME");
|
|
40
|
+ public final static Property User_id = new Property(13, int.class, "user_id", false, "USER_ID");
|
40
|
41
|
}
|
41
|
42
|
|
42
|
43
|
|
|
@@ -57,14 +58,15 @@ public class CategoryDBDao extends AbstractDao<CategoryDB, Long> {
|
57
|
58
|
"\"DEMO\" TEXT," + // 2: demo
|
58
|
59
|
"\"NAME\" TEXT," + // 3: name
|
59
|
60
|
"\"TYPE\" INTEGER NOT NULL ," + // 4: type
|
60
|
|
- "\"ACCOUNT\" INTEGER NOT NULL ," + // 5: account
|
61
|
|
- "\"CATEGORY_ID\" INTEGER NOT NULL ," + // 6: category_id
|
62
|
|
- "\"YEAR\" INTEGER NOT NULL ," + // 7: year
|
63
|
|
- "\"MONTH\" INTEGER NOT NULL ," + // 8: month
|
64
|
|
- "\"DAY\" INTEGER NOT NULL ," + // 9: day
|
65
|
|
- "\"CREATE_TIME\" INTEGER NOT NULL ," + // 10: createTime
|
66
|
|
- "\"UPDATE_TIME\" INTEGER NOT NULL ," + // 11: updateTime
|
67
|
|
- "\"USER_ID\" INTEGER NOT NULL );"); // 12: user_id
|
|
61
|
+ "\"IMAGE_PATH\" TEXT," + // 5: image_path
|
|
62
|
+ "\"ACCOUNT\" INTEGER NOT NULL ," + // 6: account
|
|
63
|
+ "\"CATEGORY_ID\" INTEGER NOT NULL ," + // 7: category_id
|
|
64
|
+ "\"YEAR\" INTEGER NOT NULL ," + // 8: year
|
|
65
|
+ "\"MONTH\" INTEGER NOT NULL ," + // 9: month
|
|
66
|
+ "\"DAY\" INTEGER NOT NULL ," + // 10: day
|
|
67
|
+ "\"CREATE_TIME\" INTEGER NOT NULL ," + // 11: createTime
|
|
68
|
+ "\"UPDATE_TIME\" INTEGER NOT NULL ," + // 12: updateTime
|
|
69
|
+ "\"USER_ID\" INTEGER NOT NULL );"); // 13: user_id
|
68
|
70
|
}
|
69
|
71
|
|
70
|
72
|
/** Drops the underlying database table. */
|
|
@@ -97,14 +99,19 @@ public class CategoryDBDao extends AbstractDao<CategoryDB, Long> {
|
97
|
99
|
stmt.bindString(4, name);
|
98
|
100
|
}
|
99
|
101
|
stmt.bindLong(5, entity.getType());
|
100
|
|
- stmt.bindLong(6, entity.getAccount());
|
101
|
|
- stmt.bindLong(7, entity.getCategory_id());
|
102
|
|
- stmt.bindLong(8, entity.getYear());
|
103
|
|
- stmt.bindLong(9, entity.getMonth());
|
104
|
|
- stmt.bindLong(10, entity.getDay());
|
105
|
|
- stmt.bindLong(11, entity.getCreateTime());
|
106
|
|
- stmt.bindLong(12, entity.getUpdateTime());
|
107
|
|
- stmt.bindLong(13, entity.getUser_id());
|
|
102
|
+
|
|
103
|
+ String image_path = entity.getImage_path();
|
|
104
|
+ if (image_path != null) {
|
|
105
|
+ stmt.bindString(6, image_path);
|
|
106
|
+ }
|
|
107
|
+ stmt.bindLong(7, entity.getAccount());
|
|
108
|
+ stmt.bindLong(8, entity.getCategory_id());
|
|
109
|
+ stmt.bindLong(9, entity.getYear());
|
|
110
|
+ stmt.bindLong(10, entity.getMonth());
|
|
111
|
+ stmt.bindLong(11, entity.getDay());
|
|
112
|
+ stmt.bindLong(12, entity.getCreateTime());
|
|
113
|
+ stmt.bindLong(13, entity.getUpdateTime());
|
|
114
|
+ stmt.bindLong(14, entity.getUser_id());
|
108
|
115
|
}
|
109
|
116
|
|
110
|
117
|
@Override
|
|
@@ -131,14 +138,19 @@ public class CategoryDBDao extends AbstractDao<CategoryDB, Long> {
|
131
|
138
|
stmt.bindString(4, name);
|
132
|
139
|
}
|
133
|
140
|
stmt.bindLong(5, entity.getType());
|
134
|
|
- stmt.bindLong(6, entity.getAccount());
|
135
|
|
- stmt.bindLong(7, entity.getCategory_id());
|
136
|
|
- stmt.bindLong(8, entity.getYear());
|
137
|
|
- stmt.bindLong(9, entity.getMonth());
|
138
|
|
- stmt.bindLong(10, entity.getDay());
|
139
|
|
- stmt.bindLong(11, entity.getCreateTime());
|
140
|
|
- stmt.bindLong(12, entity.getUpdateTime());
|
141
|
|
- stmt.bindLong(13, entity.getUser_id());
|
|
141
|
+
|
|
142
|
+ String image_path = entity.getImage_path();
|
|
143
|
+ if (image_path != null) {
|
|
144
|
+ stmt.bindString(6, image_path);
|
|
145
|
+ }
|
|
146
|
+ stmt.bindLong(7, entity.getAccount());
|
|
147
|
+ stmt.bindLong(8, entity.getCategory_id());
|
|
148
|
+ stmt.bindLong(9, entity.getYear());
|
|
149
|
+ stmt.bindLong(10, entity.getMonth());
|
|
150
|
+ stmt.bindLong(11, entity.getDay());
|
|
151
|
+ stmt.bindLong(12, entity.getCreateTime());
|
|
152
|
+ stmt.bindLong(13, entity.getUpdateTime());
|
|
153
|
+ stmt.bindLong(14, entity.getUser_id());
|
142
|
154
|
}
|
143
|
155
|
|
144
|
156
|
@Override
|
|
@@ -154,14 +166,15 @@ public class CategoryDBDao extends AbstractDao<CategoryDB, Long> {
|
154
|
166
|
cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // demo
|
155
|
167
|
cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // name
|
156
|
168
|
cursor.getInt(offset + 4), // type
|
157
|
|
- cursor.getLong(offset + 5), // account
|
158
|
|
- cursor.getInt(offset + 6), // category_id
|
159
|
|
- cursor.getInt(offset + 7), // year
|
160
|
|
- cursor.getInt(offset + 8), // month
|
161
|
|
- cursor.getInt(offset + 9), // day
|
162
|
|
- cursor.getLong(offset + 10), // createTime
|
163
|
|
- cursor.getLong(offset + 11), // updateTime
|
164
|
|
- cursor.getInt(offset + 12) // user_id
|
|
169
|
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // image_path
|
|
170
|
+ cursor.getLong(offset + 6), // account
|
|
171
|
+ cursor.getInt(offset + 7), // category_id
|
|
172
|
+ cursor.getInt(offset + 8), // year
|
|
173
|
+ cursor.getInt(offset + 9), // month
|
|
174
|
+ cursor.getInt(offset + 10), // day
|
|
175
|
+ cursor.getLong(offset + 11), // createTime
|
|
176
|
+ cursor.getLong(offset + 12), // updateTime
|
|
177
|
+ cursor.getInt(offset + 13) // user_id
|
165
|
178
|
);
|
166
|
179
|
return entity;
|
167
|
180
|
}
|
|
@@ -173,14 +186,15 @@ public class CategoryDBDao extends AbstractDao<CategoryDB, Long> {
|
173
|
186
|
entity.setDemo(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
|
174
|
187
|
entity.setName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
|
175
|
188
|
entity.setType(cursor.getInt(offset + 4));
|
176
|
|
- entity.setAccount(cursor.getLong(offset + 5));
|
177
|
|
- entity.setCategory_id(cursor.getInt(offset + 6));
|
178
|
|
- entity.setYear(cursor.getInt(offset + 7));
|
179
|
|
- entity.setMonth(cursor.getInt(offset + 8));
|
180
|
|
- entity.setDay(cursor.getInt(offset + 9));
|
181
|
|
- entity.setCreateTime(cursor.getLong(offset + 10));
|
182
|
|
- entity.setUpdateTime(cursor.getLong(offset + 11));
|
183
|
|
- entity.setUser_id(cursor.getInt(offset + 12));
|
|
189
|
+ entity.setImage_path(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
|
|
190
|
+ entity.setAccount(cursor.getLong(offset + 6));
|
|
191
|
+ entity.setCategory_id(cursor.getInt(offset + 7));
|
|
192
|
+ entity.setYear(cursor.getInt(offset + 8));
|
|
193
|
+ entity.setMonth(cursor.getInt(offset + 9));
|
|
194
|
+ entity.setDay(cursor.getInt(offset + 10));
|
|
195
|
+ entity.setCreateTime(cursor.getLong(offset + 11));
|
|
196
|
+ entity.setUpdateTime(cursor.getLong(offset + 12));
|
|
197
|
+ entity.setUser_id(cursor.getInt(offset + 13));
|
184
|
198
|
}
|
185
|
199
|
|
186
|
200
|
@Override
|