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.thirdappmodule.bean.entity.Problemtype; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. /** * DAO for table "PROBLEMTYPE". */ public class ProblemtypeDao extends AbstractDao { public static final String TABLENAME = "PROBLEMTYPE"; /** * Properties of entity Problemtype.
* Can be used for QueryBuilder and for referencing column names. */ public static class Properties { public final static Property Guid = new Property(0, String.class, "guid", true, "GUID"); public final static Property Name = new Property(1, String.class, "name", false, "NAME"); public final static Property Tasktypeid = new Property(2, Byte.class, "tasktypeid", false, "TASKTYPEID"); public final static Property Tasktype = new Property(3, String.class, "tasktype", false, "TASKTYPE"); public final static Property Scensetypeid = new Property(4, Byte.class, "scensetypeid", false, "SCENSETYPEID"); public final static Property Scensetype = new Property(5, String.class, "scensetype", false, "SCENSETYPE"); public final static Property Scensesubtypeid = new Property(6, Byte.class, "scensesubtypeid", false, "SCENSESUBTYPEID"); public final static Property Scensesubtype = new Property(7, String.class, "scensesubtype", false, "SCENSESUBTYPE"); public final static Property Provincecode = new Property(8, String.class, "provincecode", false, "PROVINCECODE"); public final static Property Provincename = new Property(9, String.class, "provincename", false, "PROVINCENAME"); public final static Property Citycode = new Property(10, String.class, "citycode", false, "CITYCODE"); public final static Property Cityname = new Property(11, String.class, "cityname", false, "CITYNAME"); public final static Property Districtcode = new Property(12, String.class, "districtcode", false, "DISTRICTCODE"); public final static Property Districtname = new Property(13, String.class, "districtname", false, "DISTRICTNAME"); public final static Property Towncode = new Property(14, String.class, "towncode", false, "TOWNCODE"); public final static Property Townname = new Property(15, String.class, "townname", false, "TOWNNAME"); public final static Property Typeid = new Property(16, Byte.class, "typeid", false, "TYPEID"); public final static Property Typename = new Property(17, String.class, "typename", false, "TYPENAME"); public final static Property Description = new Property(18, String.class, "description", false, "DESCRIPTION"); public final static Property Userguid = new Property(19, String.class, "userguid", false, "USERGUID"); public final static Property Username = new Property(20, String.class, "username", false, "USERNAME"); public final static Property Realname = new Property(21, String.class, "realname", false, "REALNAME"); public final static Property Createdate = new Property(22, java.util.Date.class, "createdate", false, "CREATEDATE"); public final static Property Updatedate = new Property(23, java.util.Date.class, "updatedate", false, "UPDATEDATE"); public final static Property Extension1 = new Property(24, String.class, "extension1", false, "EXTENSION1"); public final static Property Extension2 = new Property(25, String.class, "extension2", false, "EXTENSION2"); public final static Property Extension3 = new Property(26, String.class, "extension3", false, "EXTENSION3"); public final static Property Remark = new Property(27, String.class, "remark", false, "REMARK"); } public ProblemtypeDao(DaoConfig config) { super(config); } public ProblemtypeDao(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 + "\"PROBLEMTYPE\" (" + // "\"GUID\" TEXT PRIMARY KEY NOT NULL ," + // 0: guid "\"NAME\" TEXT," + // 1: name "\"TASKTYPEID\" INTEGER," + // 2: tasktypeid "\"TASKTYPE\" TEXT," + // 3: tasktype "\"SCENSETYPEID\" INTEGER," + // 4: scensetypeid "\"SCENSETYPE\" TEXT," + // 5: scensetype "\"SCENSESUBTYPEID\" INTEGER," + // 6: scensesubtypeid "\"SCENSESUBTYPE\" TEXT," + // 7: scensesubtype "\"PROVINCECODE\" TEXT," + // 8: provincecode "\"PROVINCENAME\" TEXT," + // 9: provincename "\"CITYCODE\" TEXT," + // 10: citycode "\"CITYNAME\" TEXT," + // 11: cityname "\"DISTRICTCODE\" TEXT," + // 12: districtcode "\"DISTRICTNAME\" TEXT," + // 13: districtname "\"TOWNCODE\" TEXT," + // 14: towncode "\"TOWNNAME\" TEXT," + // 15: townname "\"TYPEID\" INTEGER," + // 16: typeid "\"TYPENAME\" TEXT," + // 17: typename "\"DESCRIPTION\" TEXT," + // 18: description "\"USERGUID\" TEXT," + // 19: userguid "\"USERNAME\" TEXT," + // 20: username "\"REALNAME\" TEXT," + // 21: realname "\"CREATEDATE\" INTEGER," + // 22: createdate "\"UPDATEDATE\" INTEGER," + // 23: updatedate "\"EXTENSION1\" TEXT," + // 24: extension1 "\"EXTENSION2\" TEXT," + // 25: extension2 "\"EXTENSION3\" TEXT," + // 26: extension3 "\"REMARK\" TEXT);"); // 27: remark } /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"PROBLEMTYPE\""; db.execSQL(sql); } @Override protected final void bindValues(DatabaseStatement stmt, Problemtype entity) { stmt.clearBindings(); String guid = entity.getGuid(); if (guid != null) { stmt.bindString(1, guid); } String name = entity.getName(); if (name != null) { stmt.bindString(2, name); } Byte tasktypeid = entity.getTasktypeid(); if (tasktypeid != null) { stmt.bindLong(3, tasktypeid); } String tasktype = entity.getTasktype(); if (tasktype != null) { stmt.bindString(4, tasktype); } Byte scensetypeid = entity.getScensetypeid(); if (scensetypeid != null) { stmt.bindLong(5, scensetypeid); } String scensetype = entity.getScensetype(); if (scensetype != null) { stmt.bindString(6, scensetype); } Byte scensesubtypeid = entity.getScensesubtypeid(); if (scensesubtypeid != null) { stmt.bindLong(7, scensesubtypeid); } String scensesubtype = entity.getScensesubtype(); if (scensesubtype != null) { stmt.bindString(8, scensesubtype); } String provincecode = entity.getProvincecode(); if (provincecode != null) { stmt.bindString(9, provincecode); } String provincename = entity.getProvincename(); if (provincename != null) { stmt.bindString(10, provincename); } String citycode = entity.getCitycode(); if (citycode != null) { stmt.bindString(11, citycode); } String cityname = entity.getCityname(); if (cityname != null) { stmt.bindString(12, cityname); } String districtcode = entity.getDistrictcode(); if (districtcode != null) { stmt.bindString(13, districtcode); } String districtname = entity.getDistrictname(); if (districtname != null) { stmt.bindString(14, districtname); } String towncode = entity.getTowncode(); if (towncode != null) { stmt.bindString(15, towncode); } String townname = entity.getTownname(); if (townname != null) { stmt.bindString(16, townname); } Byte typeid = entity.getTypeid(); if (typeid != null) { stmt.bindLong(17, typeid); } String typename = entity.getTypename(); if (typename != null) { stmt.bindString(18, typename); } String description = entity.getDescription(); if (description != null) { stmt.bindString(19, description); } String userguid = entity.getUserguid(); if (userguid != null) { stmt.bindString(20, userguid); } String username = entity.getUsername(); if (username != null) { stmt.bindString(21, username); } String realname = entity.getRealname(); if (realname != null) { stmt.bindString(22, realname); } java.util.Date createdate = entity.getCreatedate(); if (createdate != null) { stmt.bindLong(23, createdate.getTime()); } java.util.Date updatedate = entity.getUpdatedate(); if (updatedate != null) { stmt.bindLong(24, updatedate.getTime()); } String extension1 = entity.getExtension1(); if (extension1 != null) { stmt.bindString(25, extension1); } String extension2 = entity.getExtension2(); if (extension2 != null) { stmt.bindString(26, extension2); } String extension3 = entity.getExtension3(); if (extension3 != null) { stmt.bindString(27, extension3); } String remark = entity.getRemark(); if (remark != null) { stmt.bindString(28, remark); } } @Override protected final void bindValues(SQLiteStatement stmt, Problemtype entity) { stmt.clearBindings(); String guid = entity.getGuid(); if (guid != null) { stmt.bindString(1, guid); } String name = entity.getName(); if (name != null) { stmt.bindString(2, name); } Byte tasktypeid = entity.getTasktypeid(); if (tasktypeid != null) { stmt.bindLong(3, tasktypeid); } String tasktype = entity.getTasktype(); if (tasktype != null) { stmt.bindString(4, tasktype); } Byte scensetypeid = entity.getScensetypeid(); if (scensetypeid != null) { stmt.bindLong(5, scensetypeid); } String scensetype = entity.getScensetype(); if (scensetype != null) { stmt.bindString(6, scensetype); } Byte scensesubtypeid = entity.getScensesubtypeid(); if (scensesubtypeid != null) { stmt.bindLong(7, scensesubtypeid); } String scensesubtype = entity.getScensesubtype(); if (scensesubtype != null) { stmt.bindString(8, scensesubtype); } String provincecode = entity.getProvincecode(); if (provincecode != null) { stmt.bindString(9, provincecode); } String provincename = entity.getProvincename(); if (provincename != null) { stmt.bindString(10, provincename); } String citycode = entity.getCitycode(); if (citycode != null) { stmt.bindString(11, citycode); } String cityname = entity.getCityname(); if (cityname != null) { stmt.bindString(12, cityname); } String districtcode = entity.getDistrictcode(); if (districtcode != null) { stmt.bindString(13, districtcode); } String districtname = entity.getDistrictname(); if (districtname != null) { stmt.bindString(14, districtname); } String towncode = entity.getTowncode(); if (towncode != null) { stmt.bindString(15, towncode); } String townname = entity.getTownname(); if (townname != null) { stmt.bindString(16, townname); } Byte typeid = entity.getTypeid(); if (typeid != null) { stmt.bindLong(17, typeid); } String typename = entity.getTypename(); if (typename != null) { stmt.bindString(18, typename); } String description = entity.getDescription(); if (description != null) { stmt.bindString(19, description); } String userguid = entity.getUserguid(); if (userguid != null) { stmt.bindString(20, userguid); } String username = entity.getUsername(); if (username != null) { stmt.bindString(21, username); } String realname = entity.getRealname(); if (realname != null) { stmt.bindString(22, realname); } java.util.Date createdate = entity.getCreatedate(); if (createdate != null) { stmt.bindLong(23, createdate.getTime()); } java.util.Date updatedate = entity.getUpdatedate(); if (updatedate != null) { stmt.bindLong(24, updatedate.getTime()); } String extension1 = entity.getExtension1(); if (extension1 != null) { stmt.bindString(25, extension1); } String extension2 = entity.getExtension2(); if (extension2 != null) { stmt.bindString(26, extension2); } String extension3 = entity.getExtension3(); if (extension3 != null) { stmt.bindString(27, extension3); } String remark = entity.getRemark(); if (remark != null) { stmt.bindString(28, remark); } } @Override public String readKey(Cursor cursor, int offset) { return cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0); } @Override public Problemtype readEntity(Cursor cursor, int offset) { Problemtype entity = new Problemtype( // cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0), // guid cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // name cursor.isNull(offset + 2) ? null : (byte) cursor.getShort(offset + 2), // tasktypeid cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // tasktype cursor.isNull(offset + 4) ? null : (byte) cursor.getShort(offset + 4), // scensetypeid cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // scensetype cursor.isNull(offset + 6) ? null : (byte) cursor.getShort(offset + 6), // scensesubtypeid cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // scensesubtype cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // provincecode cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // provincename cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // citycode cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // cityname cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // districtcode cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // districtname cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // towncode cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // townname cursor.isNull(offset + 16) ? null : (byte) cursor.getShort(offset + 16), // typeid cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // typename cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // description cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // userguid cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // username cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // realname cursor.isNull(offset + 22) ? null : new java.util.Date(cursor.getLong(offset + 22)), // createdate cursor.isNull(offset + 23) ? null : new java.util.Date(cursor.getLong(offset + 23)), // updatedate cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // extension1 cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // extension2 cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26), // extension3 cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27) // remark ); return entity; } @Override public void readEntity(Cursor cursor, Problemtype entity, int offset) { entity.setGuid(cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0)); entity.setName(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1)); entity.setTasktypeid(cursor.isNull(offset + 2) ? null : (byte) cursor.getShort(offset + 2)); entity.setTasktype(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3)); entity.setScensetypeid(cursor.isNull(offset + 4) ? null : (byte) cursor.getShort(offset + 4)); entity.setScensetype(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5)); entity.setScensesubtypeid(cursor.isNull(offset + 6) ? null : (byte) cursor.getShort(offset + 6)); entity.setScensesubtype(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7)); entity.setProvincecode(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8)); entity.setProvincename(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9)); entity.setCitycode(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10)); entity.setCityname(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11)); entity.setDistrictcode(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12)); entity.setDistrictname(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13)); entity.setTowncode(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14)); entity.setTownname(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15)); entity.setTypeid(cursor.isNull(offset + 16) ? null : (byte) cursor.getShort(offset + 16)); entity.setTypename(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17)); entity.setDescription(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18)); entity.setUserguid(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19)); entity.setUsername(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20)); entity.setRealname(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21)); entity.setCreatedate(cursor.isNull(offset + 22) ? null : new java.util.Date(cursor.getLong(offset + 22))); entity.setUpdatedate(cursor.isNull(offset + 23) ? null : new java.util.Date(cursor.getLong(offset + 23))); entity.setExtension1(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24)); entity.setExtension2(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25)); entity.setExtension3(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26)); entity.setRemark(cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27)); } @Override protected final String updateKeyAfterInsert(Problemtype entity, long rowId) { return entity.getGuid(); } @Override public String getKey(Problemtype entity) { if(entity != null) { return entity.getGuid(); } else { return null; } } @Override public boolean hasKey(Problemtype entity) { return entity.getGuid() != null; } @Override protected final boolean isEntityUpdateable() { return true; } }