LineBeanDao.java
11.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
package com.lijinji.scan.wmsgreendao;
import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.Property;
import org.greenrobot.greendao.internal.DaoConfig;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.database.DatabaseStatement;
import com.lijinji.scan.bean.LineBean;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "LINE_BEAN".
*/
public class LineBeanDao extends AbstractDao<LineBean, Void> {
public static final String TABLENAME = "LINE_BEAN";
/**
* Properties of entity LineBean.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public static class Properties {
public final static Property Code = new Property(0, String.class, "code", false, "CODE");
public final static Property Name = new Property(1, String.class, "name", false, "NAME");
public final static Property Type = new Property(2, int.class, "type", false, "TYPE");
public final static Property Priority = new Property(3, int.class, "priority", false, "PRIORITY");
public final static Property Ip = new Property(4, String.class, "ip", false, "IP");
public final static Property Pcip = new Property(5, String.class, "pcip", false, "PCIP");
public final static Property Remark = new Property(6, String.class, "remark", false, "REMARK");
public final static Property Model = new Property(7, int.class, "model", false, "MODEL");
public final static Property FirstLayerQty = new Property(8, int.class, "firstLayerQty", false, "FIRST_LAYER_QTY");
public final static Property SecondLayerQty = new Property(9, int.class, "secondLayerQty", false, "SECOND_LAYER_QTY");
public final static Property Address = new Property(10, String.class, "address", false, "ADDRESS");
public final static Property LowWater = new Property(11, int.class, "lowWater", false, "LOW_WATER");
public final static Property HighWater = new Property(12, int.class, "highWater", false, "HIGH_WATER");
public final static Property JoinLine = new Property(13, String.class, "joinLine", false, "JOIN_LINE");
public final static Property Id = new Property(14, int.class, "id", false, "ID");
public final static Property Created = new Property(15, String.class, "created", false, "CREATED");
public final static Property CreatedBy = new Property(16, String.class, "createdBy", false, "CREATED_BY");
public final static Property Updated = new Property(17, String.class, "updated", false, "UPDATED");
public final static Property UpdatedBy = new Property(18, String.class, "updatedBy", false, "UPDATED_BY");
}
public LineBeanDao(DaoConfig config) {
super(config);
}
public LineBeanDao(DaoConfig config, DaoSession daoSession) {
super(config, daoSession);
}
/** Creates the underlying database table. */
public static void createTable(Database db, boolean ifNotExists) {
String constraint = ifNotExists? "IF NOT EXISTS ": "";
db.execSQL("CREATE TABLE " + constraint + "\"LINE_BEAN\" (" + //
"\"CODE\" TEXT," + // 0: code
"\"NAME\" TEXT," + // 1: name
"\"TYPE\" INTEGER NOT NULL ," + // 2: type
"\"PRIORITY\" INTEGER NOT NULL ," + // 3: priority
"\"IP\" TEXT," + // 4: ip
"\"PCIP\" TEXT," + // 5: pcip
"\"REMARK\" TEXT," + // 6: remark
"\"MODEL\" INTEGER NOT NULL ," + // 7: model
"\"FIRST_LAYER_QTY\" INTEGER NOT NULL ," + // 8: firstLayerQty
"\"SECOND_LAYER_QTY\" INTEGER NOT NULL ," + // 9: secondLayerQty
"\"ADDRESS\" TEXT," + // 10: address
"\"LOW_WATER\" INTEGER NOT NULL ," + // 11: lowWater
"\"HIGH_WATER\" INTEGER NOT NULL ," + // 12: highWater
"\"JOIN_LINE\" TEXT," + // 13: joinLine
"\"ID\" INTEGER NOT NULL ," + // 14: id
"\"CREATED\" TEXT," + // 15: created
"\"CREATED_BY\" TEXT," + // 16: createdBy
"\"UPDATED\" TEXT," + // 17: updated
"\"UPDATED_BY\" TEXT);"); // 18: updatedBy
}
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"LINE_BEAN\"";
db.execSQL(sql);
}
@Override
protected final void bindValues(DatabaseStatement stmt, LineBean entity) {
stmt.clearBindings();
String code = entity.getCode();
if (code != null) {
stmt.bindString(1, code);
}
String name = entity.getName();
if (name != null) {
stmt.bindString(2, name);
}
stmt.bindLong(3, entity.getType());
stmt.bindLong(4, entity.getPriority());
String ip = entity.getIp();
if (ip != null) {
stmt.bindString(5, ip);
}
String pcip = entity.getPcip();
if (pcip != null) {
stmt.bindString(6, pcip);
}
String remark = entity.getRemark();
if (remark != null) {
stmt.bindString(7, remark);
}
stmt.bindLong(8, entity.getModel());
stmt.bindLong(9, entity.getFirstLayerQty());
stmt.bindLong(10, entity.getSecondLayerQty());
String address = entity.getAddress();
if (address != null) {
stmt.bindString(11, address);
}
stmt.bindLong(12, entity.getLowWater());
stmt.bindLong(13, entity.getHighWater());
String joinLine = entity.getJoinLine();
if (joinLine != null) {
stmt.bindString(14, joinLine);
}
stmt.bindLong(15, entity.getId());
String created = entity.getCreated();
if (created != null) {
stmt.bindString(16, created);
}
String createdBy = entity.getCreatedBy();
if (createdBy != null) {
stmt.bindString(17, createdBy);
}
String updated = entity.getUpdated();
if (updated != null) {
stmt.bindString(18, updated);
}
String updatedBy = entity.getUpdatedBy();
if (updatedBy != null) {
stmt.bindString(19, updatedBy);
}
}
@Override
protected final void bindValues(SQLiteStatement stmt, LineBean entity) {
stmt.clearBindings();
String code = entity.getCode();
if (code != null) {
stmt.bindString(1, code);
}
String name = entity.getName();
if (name != null) {
stmt.bindString(2, name);
}
stmt.bindLong(3, entity.getType());
stmt.bindLong(4, entity.getPriority());
String ip = entity.getIp();
if (ip != null) {
stmt.bindString(5, ip);
}
String pcip = entity.getPcip();
if (pcip != null) {
stmt.bindString(6, pcip);
}
String remark = entity.getRemark();
if (remark != null) {
stmt.bindString(7, remark);
}
stmt.bindLong(8, entity.getModel());
stmt.bindLong(9, entity.getFirstLayerQty());
stmt.bindLong(10, entity.getSecondLayerQty());
String address = entity.getAddress();
if (address != null) {
stmt.bindString(11, address);
}
stmt.bindLong(12, entity.getLowWater());
stmt.bindLong(13, entity.getHighWater());
String joinLine = entity.getJoinLine();
if (joinLine != null) {
stmt.bindString(14, joinLine);
}
stmt.bindLong(15, entity.getId());
String created = entity.getCreated();
if (created != null) {
stmt.bindString(16, created);
}
String createdBy = entity.getCreatedBy();
if (createdBy != null) {
stmt.bindString(17, createdBy);
}
String updated = entity.getUpdated();
if (updated != null) {
stmt.bindString(18, updated);
}
String updatedBy = entity.getUpdatedBy();
if (updatedBy != null) {
stmt.bindString(19, updatedBy);
}
}
@Override
public Void readKey(Cursor cursor, int offset) {
return null;
}
@Override
public LineBean readEntity(Cursor cursor, int offset) {
LineBean entity = new LineBean( //
cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0), // code
cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // name
cursor.getInt(offset + 2), // type
cursor.getInt(offset + 3), // priority
cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // ip
cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // pcip
cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // remark
cursor.getInt(offset + 7), // model
cursor.getInt(offset + 8), // firstLayerQty
cursor.getInt(offset + 9), // secondLayerQty
cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // address
cursor.getInt(offset + 11), // lowWater
cursor.getInt(offset + 12), // highWater
cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // joinLine
cursor.getInt(offset + 14), // id
cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // created
cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // createdBy
cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // updated
cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18) // updatedBy
);
return entity;
}
@Override
public void readEntity(Cursor cursor, LineBean entity, int offset) {
entity.setCode(cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0));
entity.setName(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
entity.setType(cursor.getInt(offset + 2));
entity.setPriority(cursor.getInt(offset + 3));
entity.setIp(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
entity.setPcip(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
entity.setRemark(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
entity.setModel(cursor.getInt(offset + 7));
entity.setFirstLayerQty(cursor.getInt(offset + 8));
entity.setSecondLayerQty(cursor.getInt(offset + 9));
entity.setAddress(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
entity.setLowWater(cursor.getInt(offset + 11));
entity.setHighWater(cursor.getInt(offset + 12));
entity.setJoinLine(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
entity.setId(cursor.getInt(offset + 14));
entity.setCreated(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
entity.setCreatedBy(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
entity.setUpdated(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
entity.setUpdatedBy(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
}
@Override
protected final Void updateKeyAfterInsert(LineBean entity, long rowId) {
// Unsupported or missing PK type
return null;
}
@Override
public Void getKey(LineBean entity) {
return null;
}
@Override
public boolean hasKey(LineBean entity) {
// TODO
return false;
}
@Override
protected final boolean isEntityUpdateable() {
return true;
}
}