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.Site;
|
|
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
|
/**
|
* DAO for table "SITE".
|
*/
|
public class SiteDao extends AbstractDao<Site, String> {
|
|
public static final String TABLENAME = "SITE";
|
|
/**
|
* Properties of entity Site.<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 Sguid = new Property(2, String.class, "sguid", false, "SGUID");
|
public final static Property Provincecode = new Property(3, String.class, "provincecode", false, "PROVINCECODE");
|
public final static Property Provincename = new Property(4, String.class, "provincename", false, "PROVINCENAME");
|
public final static Property Citycode = new Property(5, String.class, "citycode", false, "CITYCODE");
|
public final static Property Cityname = new Property(6, String.class, "cityname", false, "CITYNAME");
|
public final static Property Districtcode = new Property(7, String.class, "districtcode", false, "DISTRICTCODE");
|
public final static Property Districtname = new Property(8, String.class, "districtname", false, "DISTRICTNAME");
|
public final static Property Towncode = new Property(9, String.class, "towncode", false, "TOWNCODE");
|
public final static Property Townname = new Property(10, String.class, "townname", false, "TOWNNAME");
|
public final static Property Siteaddress = new Property(11, String.class, "siteaddress", false, "SITEADDRESS");
|
public final static Property Sitelongitude = new Property(12, Double.class, "sitelongitude", false, "SITELONGITUDE");
|
public final static Property Sitelatitude = new Property(13, Double.class, "sitelatitude", false, "SITELATITUDE");
|
public final static Property Ownercompanyid = new Property(14, String.class, "ownercompanyid", false, "OWNERCOMPANYID");
|
public final static Property Ownercompanyname = new Property(15, String.class, "ownercompanyname", false, "OWNERCOMPANYNAME");
|
public final static Property Ownercompanyaddress = new Property(16, String.class, "ownercompanyaddress", false, "OWNERCOMPANYADDRESS");
|
public final static Property Buildcompanyid = new Property(17, String.class, "buildcompanyid", false, "BUILDCOMPANYID");
|
public final static Property Buildcompanyname = new Property(18, String.class, "buildcompanyname", false, "BUILDCOMPANYNAME");
|
public final static Property Buildtelephone = new Property(19, String.class, "buildtelephone", false, "BUILDTELEPHONE");
|
public final static Property Buildcontact1 = new Property(20, String.class, "buildcontact1", false, "BUILDCONTACT1");
|
public final static Property Buildcontact1tele = new Property(21, String.class, "buildcontact1tele", false, "BUILDCONTACT1TELE");
|
public final static Property Buildcontact2 = new Property(22, String.class, "buildcontact2", false, "BUILDCONTACT2");
|
public final static Property Buildcontact2tele = new Property(23, String.class, "buildcontact2tele", false, "BUILDCONTACT2TELE");
|
public final static Property Buildlicensenumber = new Property(24, String.class, "buildlicensenumber", false, "BUILDLICENSENUMBER");
|
public final static Property Status = new Property(25, String.class, "status", false, "STATUS");
|
public final static Property Buildstarttime = new Property(26, java.util.Date.class, "buildstarttime", false, "BUILDSTARTTIME");
|
public final static Property Buildendtime = new Property(27, java.util.Date.class, "buildendtime", false, "BUILDENDTIME");
|
public final static Property Extension1 = new Property(28, String.class, "extension1", false, "EXTENSION1");
|
public final static Property Extension2 = new Property(29, String.class, "extension2", false, "EXTENSION2");
|
public final static Property Extension3 = new Property(30, String.class, "extension3", false, "EXTENSION3");
|
public final static Property Remark = new Property(31, String.class, "remark", false, "REMARK");
|
}
|
|
|
public SiteDao(DaoConfig config) {
|
super(config);
|
}
|
|
public SiteDao(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 + "\"SITE\" (" + //
|
"\"GUID\" TEXT PRIMARY KEY NOT NULL ," + // 0: guid
|
"\"NAME\" TEXT," + // 1: name
|
"\"SGUID\" TEXT," + // 2: sguid
|
"\"PROVINCECODE\" TEXT," + // 3: provincecode
|
"\"PROVINCENAME\" TEXT," + // 4: provincename
|
"\"CITYCODE\" TEXT," + // 5: citycode
|
"\"CITYNAME\" TEXT," + // 6: cityname
|
"\"DISTRICTCODE\" TEXT," + // 7: districtcode
|
"\"DISTRICTNAME\" TEXT," + // 8: districtname
|
"\"TOWNCODE\" TEXT," + // 9: towncode
|
"\"TOWNNAME\" TEXT," + // 10: townname
|
"\"SITEADDRESS\" TEXT," + // 11: siteaddress
|
"\"SITELONGITUDE\" REAL," + // 12: sitelongitude
|
"\"SITELATITUDE\" REAL," + // 13: sitelatitude
|
"\"OWNERCOMPANYID\" TEXT," + // 14: ownercompanyid
|
"\"OWNERCOMPANYNAME\" TEXT," + // 15: ownercompanyname
|
"\"OWNERCOMPANYADDRESS\" TEXT," + // 16: ownercompanyaddress
|
"\"BUILDCOMPANYID\" TEXT," + // 17: buildcompanyid
|
"\"BUILDCOMPANYNAME\" TEXT," + // 18: buildcompanyname
|
"\"BUILDTELEPHONE\" TEXT," + // 19: buildtelephone
|
"\"BUILDCONTACT1\" TEXT," + // 20: buildcontact1
|
"\"BUILDCONTACT1TELE\" TEXT," + // 21: buildcontact1tele
|
"\"BUILDCONTACT2\" TEXT," + // 22: buildcontact2
|
"\"BUILDCONTACT2TELE\" TEXT," + // 23: buildcontact2tele
|
"\"BUILDLICENSENUMBER\" TEXT," + // 24: buildlicensenumber
|
"\"STATUS\" TEXT," + // 25: status
|
"\"BUILDSTARTTIME\" INTEGER," + // 26: buildstarttime
|
"\"BUILDENDTIME\" INTEGER," + // 27: buildendtime
|
"\"EXTENSION1\" TEXT," + // 28: extension1
|
"\"EXTENSION2\" TEXT," + // 29: extension2
|
"\"EXTENSION3\" TEXT," + // 30: extension3
|
"\"REMARK\" TEXT);"); // 31: remark
|
}
|
|
/** Drops the underlying database table. */
|
public static void dropTable(Database db, boolean ifExists) {
|
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"SITE\"";
|
db.execSQL(sql);
|
}
|
|
@Override
|
protected final void bindValues(DatabaseStatement stmt, Site 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);
|
}
|
|
String sguid = entity.getSguid();
|
if (sguid != null) {
|
stmt.bindString(3, sguid);
|
}
|
|
String provincecode = entity.getProvincecode();
|
if (provincecode != null) {
|
stmt.bindString(4, provincecode);
|
}
|
|
String provincename = entity.getProvincename();
|
if (provincename != null) {
|
stmt.bindString(5, provincename);
|
}
|
|
String citycode = entity.getCitycode();
|
if (citycode != null) {
|
stmt.bindString(6, citycode);
|
}
|
|
String cityname = entity.getCityname();
|
if (cityname != null) {
|
stmt.bindString(7, cityname);
|
}
|
|
String districtcode = entity.getDistrictcode();
|
if (districtcode != null) {
|
stmt.bindString(8, districtcode);
|
}
|
|
String districtname = entity.getDistrictname();
|
if (districtname != null) {
|
stmt.bindString(9, districtname);
|
}
|
|
String towncode = entity.getTowncode();
|
if (towncode != null) {
|
stmt.bindString(10, towncode);
|
}
|
|
String townname = entity.getTownname();
|
if (townname != null) {
|
stmt.bindString(11, townname);
|
}
|
|
String siteaddress = entity.getSiteaddress();
|
if (siteaddress != null) {
|
stmt.bindString(12, siteaddress);
|
}
|
|
Double sitelongitude = entity.getSitelongitude();
|
if (sitelongitude != null) {
|
stmt.bindDouble(13, sitelongitude);
|
}
|
|
Double sitelatitude = entity.getSitelatitude();
|
if (sitelatitude != null) {
|
stmt.bindDouble(14, sitelatitude);
|
}
|
|
String ownercompanyid = entity.getOwnercompanyid();
|
if (ownercompanyid != null) {
|
stmt.bindString(15, ownercompanyid);
|
}
|
|
String ownercompanyname = entity.getOwnercompanyname();
|
if (ownercompanyname != null) {
|
stmt.bindString(16, ownercompanyname);
|
}
|
|
String ownercompanyaddress = entity.getOwnercompanyaddress();
|
if (ownercompanyaddress != null) {
|
stmt.bindString(17, ownercompanyaddress);
|
}
|
|
String buildcompanyid = entity.getBuildcompanyid();
|
if (buildcompanyid != null) {
|
stmt.bindString(18, buildcompanyid);
|
}
|
|
String buildcompanyname = entity.getBuildcompanyname();
|
if (buildcompanyname != null) {
|
stmt.bindString(19, buildcompanyname);
|
}
|
|
String buildtelephone = entity.getBuildtelephone();
|
if (buildtelephone != null) {
|
stmt.bindString(20, buildtelephone);
|
}
|
|
String buildcontact1 = entity.getBuildcontact1();
|
if (buildcontact1 != null) {
|
stmt.bindString(21, buildcontact1);
|
}
|
|
String buildcontact1tele = entity.getBuildcontact1tele();
|
if (buildcontact1tele != null) {
|
stmt.bindString(22, buildcontact1tele);
|
}
|
|
String buildcontact2 = entity.getBuildcontact2();
|
if (buildcontact2 != null) {
|
stmt.bindString(23, buildcontact2);
|
}
|
|
String buildcontact2tele = entity.getBuildcontact2tele();
|
if (buildcontact2tele != null) {
|
stmt.bindString(24, buildcontact2tele);
|
}
|
|
String buildlicensenumber = entity.getBuildlicensenumber();
|
if (buildlicensenumber != null) {
|
stmt.bindString(25, buildlicensenumber);
|
}
|
|
String status = entity.getStatus();
|
if (status != null) {
|
stmt.bindString(26, status);
|
}
|
|
java.util.Date buildstarttime = entity.getBuildstarttime();
|
if (buildstarttime != null) {
|
stmt.bindLong(27, buildstarttime.getTime());
|
}
|
|
java.util.Date buildendtime = entity.getBuildendtime();
|
if (buildendtime != null) {
|
stmt.bindLong(28, buildendtime.getTime());
|
}
|
|
String extension1 = entity.getExtension1();
|
if (extension1 != null) {
|
stmt.bindString(29, extension1);
|
}
|
|
String extension2 = entity.getExtension2();
|
if (extension2 != null) {
|
stmt.bindString(30, extension2);
|
}
|
|
String extension3 = entity.getExtension3();
|
if (extension3 != null) {
|
stmt.bindString(31, extension3);
|
}
|
|
String remark = entity.getRemark();
|
if (remark != null) {
|
stmt.bindString(32, remark);
|
}
|
}
|
|
@Override
|
protected final void bindValues(SQLiteStatement stmt, Site 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);
|
}
|
|
String sguid = entity.getSguid();
|
if (sguid != null) {
|
stmt.bindString(3, sguid);
|
}
|
|
String provincecode = entity.getProvincecode();
|
if (provincecode != null) {
|
stmt.bindString(4, provincecode);
|
}
|
|
String provincename = entity.getProvincename();
|
if (provincename != null) {
|
stmt.bindString(5, provincename);
|
}
|
|
String citycode = entity.getCitycode();
|
if (citycode != null) {
|
stmt.bindString(6, citycode);
|
}
|
|
String cityname = entity.getCityname();
|
if (cityname != null) {
|
stmt.bindString(7, cityname);
|
}
|
|
String districtcode = entity.getDistrictcode();
|
if (districtcode != null) {
|
stmt.bindString(8, districtcode);
|
}
|
|
String districtname = entity.getDistrictname();
|
if (districtname != null) {
|
stmt.bindString(9, districtname);
|
}
|
|
String towncode = entity.getTowncode();
|
if (towncode != null) {
|
stmt.bindString(10, towncode);
|
}
|
|
String townname = entity.getTownname();
|
if (townname != null) {
|
stmt.bindString(11, townname);
|
}
|
|
String siteaddress = entity.getSiteaddress();
|
if (siteaddress != null) {
|
stmt.bindString(12, siteaddress);
|
}
|
|
Double sitelongitude = entity.getSitelongitude();
|
if (sitelongitude != null) {
|
stmt.bindDouble(13, sitelongitude);
|
}
|
|
Double sitelatitude = entity.getSitelatitude();
|
if (sitelatitude != null) {
|
stmt.bindDouble(14, sitelatitude);
|
}
|
|
String ownercompanyid = entity.getOwnercompanyid();
|
if (ownercompanyid != null) {
|
stmt.bindString(15, ownercompanyid);
|
}
|
|
String ownercompanyname = entity.getOwnercompanyname();
|
if (ownercompanyname != null) {
|
stmt.bindString(16, ownercompanyname);
|
}
|
|
String ownercompanyaddress = entity.getOwnercompanyaddress();
|
if (ownercompanyaddress != null) {
|
stmt.bindString(17, ownercompanyaddress);
|
}
|
|
String buildcompanyid = entity.getBuildcompanyid();
|
if (buildcompanyid != null) {
|
stmt.bindString(18, buildcompanyid);
|
}
|
|
String buildcompanyname = entity.getBuildcompanyname();
|
if (buildcompanyname != null) {
|
stmt.bindString(19, buildcompanyname);
|
}
|
|
String buildtelephone = entity.getBuildtelephone();
|
if (buildtelephone != null) {
|
stmt.bindString(20, buildtelephone);
|
}
|
|
String buildcontact1 = entity.getBuildcontact1();
|
if (buildcontact1 != null) {
|
stmt.bindString(21, buildcontact1);
|
}
|
|
String buildcontact1tele = entity.getBuildcontact1tele();
|
if (buildcontact1tele != null) {
|
stmt.bindString(22, buildcontact1tele);
|
}
|
|
String buildcontact2 = entity.getBuildcontact2();
|
if (buildcontact2 != null) {
|
stmt.bindString(23, buildcontact2);
|
}
|
|
String buildcontact2tele = entity.getBuildcontact2tele();
|
if (buildcontact2tele != null) {
|
stmt.bindString(24, buildcontact2tele);
|
}
|
|
String buildlicensenumber = entity.getBuildlicensenumber();
|
if (buildlicensenumber != null) {
|
stmt.bindString(25, buildlicensenumber);
|
}
|
|
String status = entity.getStatus();
|
if (status != null) {
|
stmt.bindString(26, status);
|
}
|
|
java.util.Date buildstarttime = entity.getBuildstarttime();
|
if (buildstarttime != null) {
|
stmt.bindLong(27, buildstarttime.getTime());
|
}
|
|
java.util.Date buildendtime = entity.getBuildendtime();
|
if (buildendtime != null) {
|
stmt.bindLong(28, buildendtime.getTime());
|
}
|
|
String extension1 = entity.getExtension1();
|
if (extension1 != null) {
|
stmt.bindString(29, extension1);
|
}
|
|
String extension2 = entity.getExtension2();
|
if (extension2 != null) {
|
stmt.bindString(30, extension2);
|
}
|
|
String extension3 = entity.getExtension3();
|
if (extension3 != null) {
|
stmt.bindString(31, extension3);
|
}
|
|
String remark = entity.getRemark();
|
if (remark != null) {
|
stmt.bindString(32, remark);
|
}
|
}
|
|
@Override
|
public String readKey(Cursor cursor, int offset) {
|
return cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0);
|
}
|
|
@Override
|
public Site readEntity(Cursor cursor, int offset) {
|
Site entity = new Site( //
|
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 : cursor.getString(offset + 2), // sguid
|
cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // provincecode
|
cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // provincename
|
cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // citycode
|
cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // cityname
|
cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // districtcode
|
cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // districtname
|
cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // towncode
|
cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // townname
|
cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // siteaddress
|
cursor.isNull(offset + 12) ? null : cursor.getDouble(offset + 12), // sitelongitude
|
cursor.isNull(offset + 13) ? null : cursor.getDouble(offset + 13), // sitelatitude
|
cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // ownercompanyid
|
cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // ownercompanyname
|
cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // ownercompanyaddress
|
cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // buildcompanyid
|
cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // buildcompanyname
|
cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // buildtelephone
|
cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // buildcontact1
|
cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // buildcontact1tele
|
cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // buildcontact2
|
cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // buildcontact2tele
|
cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // buildlicensenumber
|
cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // status
|
cursor.isNull(offset + 26) ? null : new java.util.Date(cursor.getLong(offset + 26)), // buildstarttime
|
cursor.isNull(offset + 27) ? null : new java.util.Date(cursor.getLong(offset + 27)), // buildendtime
|
cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28), // extension1
|
cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29), // extension2
|
cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30), // extension3
|
cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31) // remark
|
);
|
return entity;
|
}
|
|
@Override
|
public void readEntity(Cursor cursor, Site 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.setSguid(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
|
entity.setProvincecode(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
|
entity.setProvincename(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
|
entity.setCitycode(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
|
entity.setCityname(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
|
entity.setDistrictcode(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
|
entity.setDistrictname(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
|
entity.setTowncode(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
|
entity.setTownname(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
|
entity.setSiteaddress(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
|
entity.setSitelongitude(cursor.isNull(offset + 12) ? null : cursor.getDouble(offset + 12));
|
entity.setSitelatitude(cursor.isNull(offset + 13) ? null : cursor.getDouble(offset + 13));
|
entity.setOwnercompanyid(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
|
entity.setOwnercompanyname(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
|
entity.setOwnercompanyaddress(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
|
entity.setBuildcompanyid(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
|
entity.setBuildcompanyname(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
|
entity.setBuildtelephone(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
|
entity.setBuildcontact1(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
|
entity.setBuildcontact1tele(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
|
entity.setBuildcontact2(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
|
entity.setBuildcontact2tele(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
|
entity.setBuildlicensenumber(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
|
entity.setStatus(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
|
entity.setBuildstarttime(cursor.isNull(offset + 26) ? null : new java.util.Date(cursor.getLong(offset + 26)));
|
entity.setBuildendtime(cursor.isNull(offset + 27) ? null : new java.util.Date(cursor.getLong(offset + 27)));
|
entity.setExtension1(cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28));
|
entity.setExtension2(cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29));
|
entity.setExtension3(cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30));
|
entity.setRemark(cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31));
|
}
|
|
@Override
|
protected final String updateKeyAfterInsert(Site entity, long rowId) {
|
return entity.getGuid();
|
}
|
|
@Override
|
public String getKey(Site entity) {
|
if(entity != null) {
|
return entity.getGuid();
|
} else {
|
return null;
|
}
|
}
|
|
@Override
|
public boolean hasKey(Site entity) {
|
return entity.getGuid() != null;
|
}
|
|
@Override
|
protected final boolean isEntityUpdateable() {
|
return true;
|
}
|
|
}
|