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.Scense;
|
|
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
|
/**
|
* DAO for table "SCENSE".
|
*/
|
public class ScenseDao extends AbstractDao<Scense, String> {
|
|
public static final String TABLENAME = "SCENSE";
|
|
/**
|
* Properties of entity Scense.<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 Scensesubtypeid = new Property(4, Byte.class, "scensesubtypeid", false, "SCENSESUBTYPEID");
|
public final static Property Scensesubtype = new Property(5, String.class, "scensesubtype", false, "SCENSESUBTYPE");
|
public final static Property Location = new Property(6, String.class, "location", false, "LOCATION");
|
public final static Property Longitude = new Property(7, Double.class, "longitude", false, "LONGITUDE");
|
public final static Property Latitude = new Property(8, Double.class, "latitude", false, "LATITUDE");
|
public final static Property Provincecode = new Property(9, String.class, "provincecode", false, "PROVINCECODE");
|
public final static Property Provincename = new Property(10, String.class, "provincename", false, "PROVINCENAME");
|
public final static Property Citycode = new Property(11, String.class, "citycode", false, "CITYCODE");
|
public final static Property Cityname = new Property(12, String.class, "cityname", false, "CITYNAME");
|
public final static Property Districtcode = new Property(13, String.class, "districtcode", false, "DISTRICTCODE");
|
public final static Property Districtname = new Property(14, String.class, "districtname", false, "DISTRICTNAME");
|
public final static Property Towncode = new Property(15, String.class, "towncode", false, "TOWNCODE");
|
public final static Property Townname = new Property(16, String.class, "townname", false, "TOWNNAME");
|
public final static Property Contactst = new Property(17, String.class, "contactst", false, "CONTACTST");
|
public final static Property Contactswx = new Property(18, String.class, "contactswx", false, "CONTACTSWX");
|
public final static Property Contacts = new Property(19, String.class, "contacts", false, "CONTACTS");
|
public final static Property Createdate = new Property(20, java.util.Date.class, "createdate", false, "CREATEDATE");
|
public final static Property Updatedate = new Property(21, java.util.Date.class, "updatedate", false, "UPDATEDATE");
|
public final static Property Extension1 = new Property(22, String.class, "extension1", false, "EXTENSION1");
|
public final static Property Extension2 = new Property(23, String.class, "extension2", false, "EXTENSION2");
|
public final static Property Index = new Property(24, int.class, "index", false, "INDEX");
|
public final static Property Remark = new Property(25, String.class, "remark", false, "REMARK");
|
}
|
|
|
public ScenseDao(DaoConfig config) {
|
super(config);
|
}
|
|
public ScenseDao(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 + "\"SCENSE\" (" + //
|
"\"GUID\" TEXT PRIMARY KEY NOT NULL ," + // 0: guid
|
"\"NAME\" TEXT," + // 1: name
|
"\"TYPEID\" INTEGER," + // 2: typeid
|
"\"TYPE\" TEXT," + // 3: type
|
"\"SCENSESUBTYPEID\" INTEGER," + // 4: scensesubtypeid
|
"\"SCENSESUBTYPE\" TEXT," + // 5: scensesubtype
|
"\"LOCATION\" TEXT," + // 6: location
|
"\"LONGITUDE\" REAL," + // 7: longitude
|
"\"LATITUDE\" REAL," + // 8: latitude
|
"\"PROVINCECODE\" TEXT," + // 9: provincecode
|
"\"PROVINCENAME\" TEXT," + // 10: provincename
|
"\"CITYCODE\" TEXT," + // 11: citycode
|
"\"CITYNAME\" TEXT," + // 12: cityname
|
"\"DISTRICTCODE\" TEXT," + // 13: districtcode
|
"\"DISTRICTNAME\" TEXT," + // 14: districtname
|
"\"TOWNCODE\" TEXT," + // 15: towncode
|
"\"TOWNNAME\" TEXT," + // 16: townname
|
"\"CONTACTST\" TEXT," + // 17: contactst
|
"\"CONTACTSWX\" TEXT," + // 18: contactswx
|
"\"CONTACTS\" TEXT," + // 19: contacts
|
"\"CREATEDATE\" INTEGER," + // 20: createdate
|
"\"UPDATEDATE\" INTEGER," + // 21: updatedate
|
"\"EXTENSION1\" TEXT," + // 22: extension1
|
"\"EXTENSION2\" TEXT," + // 23: extension2
|
"\"INDEX\" INTEGER NOT NULL ," + // 24: index
|
"\"REMARK\" TEXT);"); // 25: remark
|
}
|
|
/** Drops the underlying database table. */
|
public static void dropTable(Database db, boolean ifExists) {
|
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"SCENSE\"";
|
db.execSQL(sql);
|
}
|
|
@Override
|
protected final void bindValues(DatabaseStatement stmt, Scense 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);
|
}
|
|
Byte scensesubtypeid = entity.getScensesubtypeid();
|
if (scensesubtypeid != null) {
|
stmt.bindLong(5, scensesubtypeid);
|
}
|
|
String scensesubtype = entity.getScensesubtype();
|
if (scensesubtype != null) {
|
stmt.bindString(6, scensesubtype);
|
}
|
|
String location = entity.getLocation();
|
if (location != null) {
|
stmt.bindString(7, location);
|
}
|
|
Double longitude = entity.getLongitude();
|
if (longitude != null) {
|
stmt.bindDouble(8, longitude);
|
}
|
|
Double latitude = entity.getLatitude();
|
if (latitude != null) {
|
stmt.bindDouble(9, latitude);
|
}
|
|
String provincecode = entity.getProvincecode();
|
if (provincecode != null) {
|
stmt.bindString(10, provincecode);
|
}
|
|
String provincename = entity.getProvincename();
|
if (provincename != null) {
|
stmt.bindString(11, provincename);
|
}
|
|
String citycode = entity.getCitycode();
|
if (citycode != null) {
|
stmt.bindString(12, citycode);
|
}
|
|
String cityname = entity.getCityname();
|
if (cityname != null) {
|
stmt.bindString(13, cityname);
|
}
|
|
String districtcode = entity.getDistrictcode();
|
if (districtcode != null) {
|
stmt.bindString(14, districtcode);
|
}
|
|
String districtname = entity.getDistrictname();
|
if (districtname != null) {
|
stmt.bindString(15, districtname);
|
}
|
|
String towncode = entity.getTowncode();
|
if (towncode != null) {
|
stmt.bindString(16, towncode);
|
}
|
|
String townname = entity.getTownname();
|
if (townname != null) {
|
stmt.bindString(17, townname);
|
}
|
|
String contactst = entity.getContactst();
|
if (contactst != null) {
|
stmt.bindString(18, contactst);
|
}
|
|
String contactswx = entity.getContactswx();
|
if (contactswx != null) {
|
stmt.bindString(19, contactswx);
|
}
|
|
String contacts = entity.getContacts();
|
if (contacts != null) {
|
stmt.bindString(20, contacts);
|
}
|
|
java.util.Date createdate = entity.getCreatedate();
|
if (createdate != null) {
|
stmt.bindLong(21, createdate.getTime());
|
}
|
|
java.util.Date updatedate = entity.getUpdatedate();
|
if (updatedate != null) {
|
stmt.bindLong(22, updatedate.getTime());
|
}
|
|
String extension1 = entity.getExtension1();
|
if (extension1 != null) {
|
stmt.bindString(23, extension1);
|
}
|
|
String extension2 = entity.getExtension2();
|
if (extension2 != null) {
|
stmt.bindString(24, extension2);
|
}
|
stmt.bindLong(25, entity.getIndex());
|
|
String remark = entity.getRemark();
|
if (remark != null) {
|
stmt.bindString(26, remark);
|
}
|
}
|
|
@Override
|
protected final void bindValues(SQLiteStatement stmt, Scense 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);
|
}
|
|
Byte scensesubtypeid = entity.getScensesubtypeid();
|
if (scensesubtypeid != null) {
|
stmt.bindLong(5, scensesubtypeid);
|
}
|
|
String scensesubtype = entity.getScensesubtype();
|
if (scensesubtype != null) {
|
stmt.bindString(6, scensesubtype);
|
}
|
|
String location = entity.getLocation();
|
if (location != null) {
|
stmt.bindString(7, location);
|
}
|
|
Double longitude = entity.getLongitude();
|
if (longitude != null) {
|
stmt.bindDouble(8, longitude);
|
}
|
|
Double latitude = entity.getLatitude();
|
if (latitude != null) {
|
stmt.bindDouble(9, latitude);
|
}
|
|
String provincecode = entity.getProvincecode();
|
if (provincecode != null) {
|
stmt.bindString(10, provincecode);
|
}
|
|
String provincename = entity.getProvincename();
|
if (provincename != null) {
|
stmt.bindString(11, provincename);
|
}
|
|
String citycode = entity.getCitycode();
|
if (citycode != null) {
|
stmt.bindString(12, citycode);
|
}
|
|
String cityname = entity.getCityname();
|
if (cityname != null) {
|
stmt.bindString(13, cityname);
|
}
|
|
String districtcode = entity.getDistrictcode();
|
if (districtcode != null) {
|
stmt.bindString(14, districtcode);
|
}
|
|
String districtname = entity.getDistrictname();
|
if (districtname != null) {
|
stmt.bindString(15, districtname);
|
}
|
|
String towncode = entity.getTowncode();
|
if (towncode != null) {
|
stmt.bindString(16, towncode);
|
}
|
|
String townname = entity.getTownname();
|
if (townname != null) {
|
stmt.bindString(17, townname);
|
}
|
|
String contactst = entity.getContactst();
|
if (contactst != null) {
|
stmt.bindString(18, contactst);
|
}
|
|
String contactswx = entity.getContactswx();
|
if (contactswx != null) {
|
stmt.bindString(19, contactswx);
|
}
|
|
String contacts = entity.getContacts();
|
if (contacts != null) {
|
stmt.bindString(20, contacts);
|
}
|
|
java.util.Date createdate = entity.getCreatedate();
|
if (createdate != null) {
|
stmt.bindLong(21, createdate.getTime());
|
}
|
|
java.util.Date updatedate = entity.getUpdatedate();
|
if (updatedate != null) {
|
stmt.bindLong(22, updatedate.getTime());
|
}
|
|
String extension1 = entity.getExtension1();
|
if (extension1 != null) {
|
stmt.bindString(23, extension1);
|
}
|
|
String extension2 = entity.getExtension2();
|
if (extension2 != null) {
|
stmt.bindString(24, extension2);
|
}
|
stmt.bindLong(25, entity.getIndex());
|
|
String remark = entity.getRemark();
|
if (remark != null) {
|
stmt.bindString(26, remark);
|
}
|
}
|
|
@Override
|
public String readKey(Cursor cursor, int offset) {
|
return cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0);
|
}
|
|
@Override
|
public Scense readEntity(Cursor cursor, int offset) {
|
Scense entity = new Scense( //
|
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 : (byte) cursor.getShort(offset + 4), // scensesubtypeid
|
cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // scensesubtype
|
cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // location
|
cursor.isNull(offset + 7) ? null : cursor.getDouble(offset + 7), // longitude
|
cursor.isNull(offset + 8) ? null : cursor.getDouble(offset + 8), // latitude
|
cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // provincecode
|
cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // provincename
|
cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // citycode
|
cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // cityname
|
cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // districtcode
|
cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // districtname
|
cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // towncode
|
cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // townname
|
cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // contactst
|
cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // contactswx
|
cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // contacts
|
cursor.isNull(offset + 20) ? null : new java.util.Date(cursor.getLong(offset + 20)), // createdate
|
cursor.isNull(offset + 21) ? null : new java.util.Date(cursor.getLong(offset + 21)), // updatedate
|
cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // extension1
|
cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // extension2
|
cursor.getInt(offset + 24), // index
|
cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25) // remark
|
);
|
return entity;
|
}
|
|
@Override
|
public void readEntity(Cursor cursor, Scense 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.setScensesubtypeid(cursor.isNull(offset + 4) ? null : (byte) cursor.getShort(offset + 4));
|
entity.setScensesubtype(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
|
entity.setLocation(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
|
entity.setLongitude(cursor.isNull(offset + 7) ? null : cursor.getDouble(offset + 7));
|
entity.setLatitude(cursor.isNull(offset + 8) ? null : cursor.getDouble(offset + 8));
|
entity.setProvincecode(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
|
entity.setProvincename(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
|
entity.setCitycode(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
|
entity.setCityname(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
|
entity.setDistrictcode(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
|
entity.setDistrictname(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
|
entity.setTowncode(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
|
entity.setTownname(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
|
entity.setContactst(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
|
entity.setContactswx(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
|
entity.setContacts(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
|
entity.setCreatedate(cursor.isNull(offset + 20) ? null : new java.util.Date(cursor.getLong(offset + 20)));
|
entity.setUpdatedate(cursor.isNull(offset + 21) ? null : new java.util.Date(cursor.getLong(offset + 21)));
|
entity.setExtension1(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
|
entity.setExtension2(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
|
entity.setIndex(cursor.getInt(offset + 24));
|
entity.setRemark(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
|
}
|
|
@Override
|
protected final String updateKeyAfterInsert(Scense entity, long rowId) {
|
return entity.getGuid();
|
}
|
|
@Override
|
public String getKey(Scense entity) {
|
if(entity != null) {
|
return entity.getGuid();
|
} else {
|
return null;
|
}
|
}
|
|
@Override
|
public boolean hasKey(Scense entity) {
|
return entity.getGuid() != null;
|
}
|
|
@Override
|
protected final boolean isEntityUpdateable() {
|
return true;
|
}
|
|
}
|