WorkProcessDetailBeanDao.java
9.32 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
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.WorkProcessBean;
import com.lijinji.scan.bean.convert.WorkProcessConvert;
import com.lijinji.scan.bean.WorkProcessDetailBean;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "WORK_PROCESS_DETAIL_BEAN".
*/
public class WorkProcessDetailBeanDao extends AbstractDao<WorkProcessDetailBean, Void> {
public static final String TABLENAME = "WORK_PROCESS_DETAIL_BEAN";
/**
* Properties of entity WorkProcessDetailBean.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public static class Properties {
public final static Property WorkProcessId = new Property(0, int.class, "workProcessId", false, "WORK_PROCESS_ID");
public final static Property Code = new Property(1, String.class, "code", false, "CODE");
public final static Property Name = new Property(2, String.class, "name", false, "NAME");
public final static Property Sequence = new Property(3, int.class, "sequence", false, "SEQUENCE");
public final static Property Remark = new Property(4, String.class, "remark", false, "REMARK");
public final static Property Disable = new Property(5, boolean.class, "disable", false, "DISABLE");
public final static Property WorkProcess = new Property(6, String.class, "workProcess", false, "WORK_PROCESS");
public final static Property Id = new Property(7, int.class, "id", false, "ID");
public final static Property Created = new Property(8, String.class, "created", false, "CREATED");
public final static Property CreatedBy = new Property(9, String.class, "createdBy", false, "CREATED_BY");
public final static Property Updated = new Property(10, String.class, "updated", false, "UPDATED");
public final static Property UpdatedBy = new Property(11, String.class, "updatedBy", false, "UPDATED_BY");
}
private final WorkProcessConvert workProcessConverter = new WorkProcessConvert();
public WorkProcessDetailBeanDao(DaoConfig config) {
super(config);
}
public WorkProcessDetailBeanDao(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 + "\"WORK_PROCESS_DETAIL_BEAN\" (" + //
"\"WORK_PROCESS_ID\" INTEGER NOT NULL ," + // 0: workProcessId
"\"CODE\" TEXT," + // 1: code
"\"NAME\" TEXT," + // 2: name
"\"SEQUENCE\" INTEGER NOT NULL ," + // 3: sequence
"\"REMARK\" TEXT," + // 4: remark
"\"DISABLE\" INTEGER NOT NULL ," + // 5: disable
"\"WORK_PROCESS\" TEXT," + // 6: workProcess
"\"ID\" INTEGER NOT NULL ," + // 7: id
"\"CREATED\" TEXT," + // 8: created
"\"CREATED_BY\" TEXT," + // 9: createdBy
"\"UPDATED\" TEXT," + // 10: updated
"\"UPDATED_BY\" TEXT);"); // 11: updatedBy
}
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"WORK_PROCESS_DETAIL_BEAN\"";
db.execSQL(sql);
}
@Override
protected final void bindValues(DatabaseStatement stmt, WorkProcessDetailBean entity) {
stmt.clearBindings();
stmt.bindLong(1, entity.getWorkProcessId());
String code = entity.getCode();
if (code != null) {
stmt.bindString(2, code);
}
String name = entity.getName();
if (name != null) {
stmt.bindString(3, name);
}
stmt.bindLong(4, entity.getSequence());
String remark = entity.getRemark();
if (remark != null) {
stmt.bindString(5, remark);
}
stmt.bindLong(6, entity.getDisable() ? 1L: 0L);
WorkProcessBean workProcess = entity.getWorkProcess();
if (workProcess != null) {
stmt.bindString(7, workProcessConverter.convertToDatabaseValue(workProcess));
}
stmt.bindLong(8, entity.getId());
String created = entity.getCreated();
if (created != null) {
stmt.bindString(9, created);
}
String createdBy = entity.getCreatedBy();
if (createdBy != null) {
stmt.bindString(10, createdBy);
}
String updated = entity.getUpdated();
if (updated != null) {
stmt.bindString(11, updated);
}
String updatedBy = entity.getUpdatedBy();
if (updatedBy != null) {
stmt.bindString(12, updatedBy);
}
}
@Override
protected final void bindValues(SQLiteStatement stmt, WorkProcessDetailBean entity) {
stmt.clearBindings();
stmt.bindLong(1, entity.getWorkProcessId());
String code = entity.getCode();
if (code != null) {
stmt.bindString(2, code);
}
String name = entity.getName();
if (name != null) {
stmt.bindString(3, name);
}
stmt.bindLong(4, entity.getSequence());
String remark = entity.getRemark();
if (remark != null) {
stmt.bindString(5, remark);
}
stmt.bindLong(6, entity.getDisable() ? 1L: 0L);
WorkProcessBean workProcess = entity.getWorkProcess();
if (workProcess != null) {
stmt.bindString(7, workProcessConverter.convertToDatabaseValue(workProcess));
}
stmt.bindLong(8, entity.getId());
String created = entity.getCreated();
if (created != null) {
stmt.bindString(9, created);
}
String createdBy = entity.getCreatedBy();
if (createdBy != null) {
stmt.bindString(10, createdBy);
}
String updated = entity.getUpdated();
if (updated != null) {
stmt.bindString(11, updated);
}
String updatedBy = entity.getUpdatedBy();
if (updatedBy != null) {
stmt.bindString(12, updatedBy);
}
}
@Override
public Void readKey(Cursor cursor, int offset) {
return null;
}
@Override
public WorkProcessDetailBean readEntity(Cursor cursor, int offset) {
WorkProcessDetailBean entity = new WorkProcessDetailBean( //
cursor.getInt(offset + 0), // workProcessId
cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // code
cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // name
cursor.getInt(offset + 3), // sequence
cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // remark
cursor.getShort(offset + 5) != 0, // disable
cursor.isNull(offset + 6) ? null : workProcessConverter.convertToEntityProperty(cursor.getString(offset + 6)), // workProcess
cursor.getInt(offset + 7), // id
cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // created
cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // createdBy
cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // updated
cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11) // updatedBy
);
return entity;
}
@Override
public void readEntity(Cursor cursor, WorkProcessDetailBean entity, int offset) {
entity.setWorkProcessId(cursor.getInt(offset + 0));
entity.setCode(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
entity.setName(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
entity.setSequence(cursor.getInt(offset + 3));
entity.setRemark(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
entity.setDisable(cursor.getShort(offset + 5) != 0);
entity.setWorkProcess(cursor.isNull(offset + 6) ? null : workProcessConverter.convertToEntityProperty(cursor.getString(offset + 6)));
entity.setId(cursor.getInt(offset + 7));
entity.setCreated(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
entity.setCreatedBy(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
entity.setUpdated(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
entity.setUpdatedBy(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
}
@Override
protected final Void updateKeyAfterInsert(WorkProcessDetailBean entity, long rowId) {
// Unsupported or missing PK type
return null;
}
@Override
public Void getKey(WorkProcessDetailBean entity) {
return null;
}
@Override
public boolean hasKey(WorkProcessDetailBean entity) {
// TODO
return false;
}
@Override
protected final boolean isEntityUpdateable() {
return true;
}
}