riku
2021-02-25 e102578ebfc95c27aeb13dce13fb82af53a2bead
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
package com.ping.greendao.gen;
 
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 cn.flightfeather.thirdapp.bean.entity.ChangeAdvice;
 
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/** 
 * DAO for table "CHANGE_ADVICE".
*/
public class ChangeAdviceDao extends AbstractDao<ChangeAdvice, String> {
 
    public static final String TABLENAME = "CHANGE_ADVICE";
 
    /**
     * Properties of entity ChangeAdvice.<br/>
     * Can be used for QueryBuilder and for referencing column names.
     */
    public static class Properties {
        public final static Property AdGuid = new Property(0, String.class, "adGuid", true, "AD_GUID");
        public final static Property AdName = new Property(1, String.class, "adName", false, "AD_NAME");
        public final static Property AdProblemtypeguid = new Property(2, String.class, "adProblemtypeguid", false, "AD_PROBLEMTYPEGUID");
        public final static Property AdProblemtypename = new Property(3, String.class, "adProblemtypename", false, "AD_PROBLEMTYPENAME");
        public final static Property AdUserguid = new Property(4, String.class, "adUserguid", false, "AD_USERGUID");
        public final static Property AdUsername = new Property(5, String.class, "adUsername", false, "AD_USERNAME");
        public final static Property AdRealname = new Property(6, String.class, "adRealname", false, "AD_REALNAME");
        public final static Property AdCreatedate = new Property(7, java.util.Date.class, "adCreatedate", false, "AD_CREATEDATE");
        public final static Property AdUpdatedate = new Property(8, java.util.Date.class, "adUpdatedate", false, "AD_UPDATEDATE");
        public final static Property AdExtension1 = new Property(9, String.class, "adExtension1", false, "AD_EXTENSION1");
        public final static Property AdExtension2 = new Property(10, String.class, "adExtension2", false, "AD_EXTENSION2");
        public final static Property AdExtension3 = new Property(11, String.class, "adExtension3", false, "AD_EXTENSION3");
        public final static Property AdRemark = new Property(12, String.class, "adRemark", false, "AD_REMARK");
    }
 
 
    public ChangeAdviceDao(DaoConfig config) {
        super(config);
    }
    
    public ChangeAdviceDao(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 + "\"CHANGE_ADVICE\" (" + //
                "\"AD_GUID\" TEXT PRIMARY KEY NOT NULL ," + // 0: adGuid
                "\"AD_NAME\" TEXT," + // 1: adName
                "\"AD_PROBLEMTYPEGUID\" TEXT," + // 2: adProblemtypeguid
                "\"AD_PROBLEMTYPENAME\" TEXT," + // 3: adProblemtypename
                "\"AD_USERGUID\" TEXT," + // 4: adUserguid
                "\"AD_USERNAME\" TEXT," + // 5: adUsername
                "\"AD_REALNAME\" TEXT," + // 6: adRealname
                "\"AD_CREATEDATE\" INTEGER," + // 7: adCreatedate
                "\"AD_UPDATEDATE\" INTEGER," + // 8: adUpdatedate
                "\"AD_EXTENSION1\" TEXT," + // 9: adExtension1
                "\"AD_EXTENSION2\" TEXT," + // 10: adExtension2
                "\"AD_EXTENSION3\" TEXT," + // 11: adExtension3
                "\"AD_REMARK\" TEXT);"); // 12: adRemark
    }
 
    /** Drops the underlying database table. */
    public static void dropTable(Database db, boolean ifExists) {
        String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"CHANGE_ADVICE\"";
        db.execSQL(sql);
    }
 
    @Override
    protected final void bindValues(DatabaseStatement stmt, ChangeAdvice entity) {
        stmt.clearBindings();
 
        String adGuid = entity.getAdGuid();
        if (adGuid != null) {
            stmt.bindString(1, adGuid);
        }
 
        String adName = entity.getAdName();
        if (adName != null) {
            stmt.bindString(2, adName);
        }
 
        String adProblemtypeguid = entity.getAdProblemtypeguid();
        if (adProblemtypeguid != null) {
            stmt.bindString(3, adProblemtypeguid);
        }
 
        String adProblemtypename = entity.getAdProblemtypename();
        if (adProblemtypename != null) {
            stmt.bindString(4, adProblemtypename);
        }
 
        String adUserguid = entity.getAdUserguid();
        if (adUserguid != null) {
            stmt.bindString(5, adUserguid);
        }
 
        String adUsername = entity.getAdUsername();
        if (adUsername != null) {
            stmt.bindString(6, adUsername);
        }
 
        String adRealname = entity.getAdRealname();
        if (adRealname != null) {
            stmt.bindString(7, adRealname);
        }
 
        java.util.Date adCreatedate = entity.getAdCreatedate();
        if (adCreatedate != null) {
            stmt.bindLong(8, adCreatedate.getTime());
        }
 
        java.util.Date adUpdatedate = entity.getAdUpdatedate();
        if (adUpdatedate != null) {
            stmt.bindLong(9, adUpdatedate.getTime());
        }
 
        String adExtension1 = entity.getAdExtension1();
        if (adExtension1 != null) {
            stmt.bindString(10, adExtension1);
        }
 
        String adExtension2 = entity.getAdExtension2();
        if (adExtension2 != null) {
            stmt.bindString(11, adExtension2);
        }
 
        String adExtension3 = entity.getAdExtension3();
        if (adExtension3 != null) {
            stmt.bindString(12, adExtension3);
        }
 
        String adRemark = entity.getAdRemark();
        if (adRemark != null) {
            stmt.bindString(13, adRemark);
        }
    }
 
    @Override
    protected final void bindValues(SQLiteStatement stmt, ChangeAdvice entity) {
        stmt.clearBindings();
 
        String adGuid = entity.getAdGuid();
        if (adGuid != null) {
            stmt.bindString(1, adGuid);
        }
 
        String adName = entity.getAdName();
        if (adName != null) {
            stmt.bindString(2, adName);
        }
 
        String adProblemtypeguid = entity.getAdProblemtypeguid();
        if (adProblemtypeguid != null) {
            stmt.bindString(3, adProblemtypeguid);
        }
 
        String adProblemtypename = entity.getAdProblemtypename();
        if (adProblemtypename != null) {
            stmt.bindString(4, adProblemtypename);
        }
 
        String adUserguid = entity.getAdUserguid();
        if (adUserguid != null) {
            stmt.bindString(5, adUserguid);
        }
 
        String adUsername = entity.getAdUsername();
        if (adUsername != null) {
            stmt.bindString(6, adUsername);
        }
 
        String adRealname = entity.getAdRealname();
        if (adRealname != null) {
            stmt.bindString(7, adRealname);
        }
 
        java.util.Date adCreatedate = entity.getAdCreatedate();
        if (adCreatedate != null) {
            stmt.bindLong(8, adCreatedate.getTime());
        }
 
        java.util.Date adUpdatedate = entity.getAdUpdatedate();
        if (adUpdatedate != null) {
            stmt.bindLong(9, adUpdatedate.getTime());
        }
 
        String adExtension1 = entity.getAdExtension1();
        if (adExtension1 != null) {
            stmt.bindString(10, adExtension1);
        }
 
        String adExtension2 = entity.getAdExtension2();
        if (adExtension2 != null) {
            stmt.bindString(11, adExtension2);
        }
 
        String adExtension3 = entity.getAdExtension3();
        if (adExtension3 != null) {
            stmt.bindString(12, adExtension3);
        }
 
        String adRemark = entity.getAdRemark();
        if (adRemark != null) {
            stmt.bindString(13, adRemark);
        }
    }
 
    @Override
    public String readKey(Cursor cursor, int offset) {
        return cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0);
    }    
 
    @Override
    public ChangeAdvice readEntity(Cursor cursor, int offset) {
        ChangeAdvice entity = new ChangeAdvice( //
            cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0), // adGuid
            cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // adName
            cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // adProblemtypeguid
            cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // adProblemtypename
            cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // adUserguid
            cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // adUsername
            cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // adRealname
            cursor.isNull(offset + 7) ? null : new java.util.Date(cursor.getLong(offset + 7)), // adCreatedate
            cursor.isNull(offset + 8) ? null : new java.util.Date(cursor.getLong(offset + 8)), // adUpdatedate
            cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // adExtension1
            cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // adExtension2
            cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // adExtension3
            cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12) // adRemark
        );
        return entity;
    }
     
    @Override
    public void readEntity(Cursor cursor, ChangeAdvice entity, int offset) {
        entity.setAdGuid(cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0));
        entity.setAdName(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
        entity.setAdProblemtypeguid(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
        entity.setAdProblemtypename(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
        entity.setAdUserguid(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
        entity.setAdUsername(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
        entity.setAdRealname(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
        entity.setAdCreatedate(cursor.isNull(offset + 7) ? null : new java.util.Date(cursor.getLong(offset + 7)));
        entity.setAdUpdatedate(cursor.isNull(offset + 8) ? null : new java.util.Date(cursor.getLong(offset + 8)));
        entity.setAdExtension1(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
        entity.setAdExtension2(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
        entity.setAdExtension3(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
        entity.setAdRemark(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
     }
    
    @Override
    protected final String updateKeyAfterInsert(ChangeAdvice entity, long rowId) {
        return entity.getAdGuid();
    }
    
    @Override
    public String getKey(ChangeAdvice entity) {
        if(entity != null) {
            return entity.getAdGuid();
        } else {
            return null;
        }
    }
 
    @Override
    public boolean hasKey(ChangeAdvice entity) {
        return entity.getAdGuid() != null;
    }
 
    @Override
    protected final boolean isEntityUpdateable() {
        return true;
    }
    
}