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.Gittype;
|
|
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
|
/**
|
* DAO for table "GITTYPE".
|
*/
|
public class GittypeDao extends AbstractDao<Gittype, String> {
|
|
public static final String TABLENAME = "GITTYPE";
|
|
/**
|
* Properties of entity Gittype.<br/>
|
* 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 Typeid = new Property(2, Byte.class, "typeid", false, "TYPEID");
|
public final static Property Type = new Property(3, String.class, "type", false, "TYPE");
|
public final static Property Desc = new Property(4, String.class, "desc", false, "DESC");
|
public final static Property Tasktypeid = new Property(5, Byte.class, "tasktypeid", false, "TASKTYPEID");
|
public final static Property Tasktype = new Property(6, String.class, "tasktype", false, "TASKTYPE");
|
public final static Property Scensetypeid = new Property(7, Byte.class, "scensetypeid", false, "SCENSETYPEID");
|
public final static Property Scensetype = new Property(8, String.class, "scensetype", false, "SCENSETYPE");
|
public final static Property Scensesubtypeid = new Property(9, Byte.class, "scensesubtypeid", false, "SCENSESUBTYPEID");
|
public final static Property Scensesubtype = new Property(10, String.class, "scensesubtype", false, "SCENSESUBTYPE");
|
public final static Property Provincecode = new Property(11, String.class, "provincecode", false, "PROVINCECODE");
|
public final static Property Provincename = new Property(12, String.class, "provincename", false, "PROVINCENAME");
|
public final static Property Citycode = new Property(13, String.class, "citycode", false, "CITYCODE");
|
public final static Property Cityname = new Property(14, String.class, "cityname", false, "CITYNAME");
|
public final static Property Districtcode = new Property(15, String.class, "districtcode", false, "DISTRICTCODE");
|
public final static Property Districtname = new Property(16, String.class, "districtname", false, "DISTRICTNAME");
|
public final static Property Towncode = new Property(17, String.class, "towncode", false, "TOWNCODE");
|
public final static Property Townname = new Property(18, String.class, "townname", false, "TOWNNAME");
|
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 GittypeDao(DaoConfig config) {
|
super(config);
|
}
|
|
public GittypeDao(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 + "\"GITTYPE\" (" + //
|
"\"GUID\" TEXT PRIMARY KEY NOT NULL ," + // 0: guid
|
"\"NAME\" TEXT," + // 1: name
|
"\"TYPEID\" INTEGER," + // 2: typeid
|
"\"TYPE\" TEXT," + // 3: type
|
"\"DESC\" TEXT," + // 4: desc
|
"\"TASKTYPEID\" INTEGER," + // 5: tasktypeid
|
"\"TASKTYPE\" TEXT," + // 6: tasktype
|
"\"SCENSETYPEID\" INTEGER," + // 7: scensetypeid
|
"\"SCENSETYPE\" TEXT," + // 8: scensetype
|
"\"SCENSESUBTYPEID\" INTEGER," + // 9: scensesubtypeid
|
"\"SCENSESUBTYPE\" TEXT," + // 10: scensesubtype
|
"\"PROVINCECODE\" TEXT," + // 11: provincecode
|
"\"PROVINCENAME\" TEXT," + // 12: provincename
|
"\"CITYCODE\" TEXT," + // 13: citycode
|
"\"CITYNAME\" TEXT," + // 14: cityname
|
"\"DISTRICTCODE\" TEXT," + // 15: districtcode
|
"\"DISTRICTNAME\" TEXT," + // 16: districtname
|
"\"TOWNCODE\" TEXT," + // 17: towncode
|
"\"TOWNNAME\" TEXT," + // 18: townname
|
"\"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 " : "") + "\"GITTYPE\"";
|
db.execSQL(sql);
|
}
|
|
@Override
|
protected final void bindValues(DatabaseStatement stmt, Gittype 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 typeid = entity.getTypeid();
|
if (typeid != null) {
|
stmt.bindLong(3, typeid);
|
}
|
|
String type = entity.getType();
|
if (type != null) {
|
stmt.bindString(4, type);
|
}
|
|
String desc = entity.getDesc();
|
if (desc != null) {
|
stmt.bindString(5, desc);
|
}
|
|
Byte tasktypeid = entity.getTasktypeid();
|
if (tasktypeid != null) {
|
stmt.bindLong(6, tasktypeid);
|
}
|
|
String tasktype = entity.getTasktype();
|
if (tasktype != null) {
|
stmt.bindString(7, tasktype);
|
}
|
|
Byte scensetypeid = entity.getScensetypeid();
|
if (scensetypeid != null) {
|
stmt.bindLong(8, scensetypeid);
|
}
|
|
String scensetype = entity.getScensetype();
|
if (scensetype != null) {
|
stmt.bindString(9, scensetype);
|
}
|
|
Byte scensesubtypeid = entity.getScensesubtypeid();
|
if (scensesubtypeid != null) {
|
stmt.bindLong(10, scensesubtypeid);
|
}
|
|
String scensesubtype = entity.getScensesubtype();
|
if (scensesubtype != null) {
|
stmt.bindString(11, scensesubtype);
|
}
|
|
String provincecode = entity.getProvincecode();
|
if (provincecode != null) {
|
stmt.bindString(12, provincecode);
|
}
|
|
String provincename = entity.getProvincename();
|
if (provincename != null) {
|
stmt.bindString(13, provincename);
|
}
|
|
String citycode = entity.getCitycode();
|
if (citycode != null) {
|
stmt.bindString(14, citycode);
|
}
|
|
String cityname = entity.getCityname();
|
if (cityname != null) {
|
stmt.bindString(15, cityname);
|
}
|
|
String districtcode = entity.getDistrictcode();
|
if (districtcode != null) {
|
stmt.bindString(16, districtcode);
|
}
|
|
String districtname = entity.getDistrictname();
|
if (districtname != null) {
|
stmt.bindString(17, districtname);
|
}
|
|
String towncode = entity.getTowncode();
|
if (towncode != null) {
|
stmt.bindString(18, towncode);
|
}
|
|
String townname = entity.getTownname();
|
if (townname != null) {
|
stmt.bindString(19, townname);
|
}
|
|
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, Gittype 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 typeid = entity.getTypeid();
|
if (typeid != null) {
|
stmt.bindLong(3, typeid);
|
}
|
|
String type = entity.getType();
|
if (type != null) {
|
stmt.bindString(4, type);
|
}
|
|
String desc = entity.getDesc();
|
if (desc != null) {
|
stmt.bindString(5, desc);
|
}
|
|
Byte tasktypeid = entity.getTasktypeid();
|
if (tasktypeid != null) {
|
stmt.bindLong(6, tasktypeid);
|
}
|
|
String tasktype = entity.getTasktype();
|
if (tasktype != null) {
|
stmt.bindString(7, tasktype);
|
}
|
|
Byte scensetypeid = entity.getScensetypeid();
|
if (scensetypeid != null) {
|
stmt.bindLong(8, scensetypeid);
|
}
|
|
String scensetype = entity.getScensetype();
|
if (scensetype != null) {
|
stmt.bindString(9, scensetype);
|
}
|
|
Byte scensesubtypeid = entity.getScensesubtypeid();
|
if (scensesubtypeid != null) {
|
stmt.bindLong(10, scensesubtypeid);
|
}
|
|
String scensesubtype = entity.getScensesubtype();
|
if (scensesubtype != null) {
|
stmt.bindString(11, scensesubtype);
|
}
|
|
String provincecode = entity.getProvincecode();
|
if (provincecode != null) {
|
stmt.bindString(12, provincecode);
|
}
|
|
String provincename = entity.getProvincename();
|
if (provincename != null) {
|
stmt.bindString(13, provincename);
|
}
|
|
String citycode = entity.getCitycode();
|
if (citycode != null) {
|
stmt.bindString(14, citycode);
|
}
|
|
String cityname = entity.getCityname();
|
if (cityname != null) {
|
stmt.bindString(15, cityname);
|
}
|
|
String districtcode = entity.getDistrictcode();
|
if (districtcode != null) {
|
stmt.bindString(16, districtcode);
|
}
|
|
String districtname = entity.getDistrictname();
|
if (districtname != null) {
|
stmt.bindString(17, districtname);
|
}
|
|
String towncode = entity.getTowncode();
|
if (towncode != null) {
|
stmt.bindString(18, towncode);
|
}
|
|
String townname = entity.getTownname();
|
if (townname != null) {
|
stmt.bindString(19, townname);
|
}
|
|
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 Gittype readEntity(Cursor cursor, int offset) {
|
Gittype entity = new Gittype( //
|
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), // typeid
|
cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // type
|
cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // desc
|
cursor.isNull(offset + 5) ? null : (byte) cursor.getShort(offset + 5), // tasktypeid
|
cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // tasktype
|
cursor.isNull(offset + 7) ? null : (byte) cursor.getShort(offset + 7), // scensetypeid
|
cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // scensetype
|
cursor.isNull(offset + 9) ? null : (byte) cursor.getShort(offset + 9), // scensesubtypeid
|
cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // scensesubtype
|
cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // provincecode
|
cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // provincename
|
cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // citycode
|
cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // cityname
|
cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // districtcode
|
cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // districtname
|
cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // towncode
|
cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // townname
|
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, Gittype 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.setTypeid(cursor.isNull(offset + 2) ? null : (byte) cursor.getShort(offset + 2));
|
entity.setType(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
|
entity.setDesc(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
|
entity.setTasktypeid(cursor.isNull(offset + 5) ? null : (byte) cursor.getShort(offset + 5));
|
entity.setTasktype(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
|
entity.setScensetypeid(cursor.isNull(offset + 7) ? null : (byte) cursor.getShort(offset + 7));
|
entity.setScensetype(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
|
entity.setScensesubtypeid(cursor.isNull(offset + 9) ? null : (byte) cursor.getShort(offset + 9));
|
entity.setScensesubtype(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
|
entity.setProvincecode(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
|
entity.setProvincename(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
|
entity.setCitycode(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
|
entity.setCityname(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
|
entity.setDistrictcode(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
|
entity.setDistrictname(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
|
entity.setTowncode(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
|
entity.setTownname(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(Gittype entity, long rowId) {
|
return entity.getGuid();
|
}
|
|
@Override
|
public String getKey(Gittype entity) {
|
if(entity != null) {
|
return entity.getGuid();
|
} else {
|
return null;
|
}
|
}
|
|
@Override
|
public boolean hasKey(Gittype entity) {
|
return entity.getGuid() != null;
|
}
|
|
@Override
|
protected final boolean isEntityUpdateable() {
|
return true;
|
}
|
|
}
|