+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 167cf0c..93ec3d6 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -1,21 +1,21 @@
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
diff --git a/app/src/main/java/com/casic/electric/detector/extensions/Long.kt b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
new file mode 100644
index 0000000..e721898
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
@@ -0,0 +1,10 @@
+package com.casic.electric.detector.extensions
+
+import java.text.SimpleDateFormat
+import java.util.Date
+import java.util.Locale
+
+fun Long.createTaskCode(): String {
+ val dateFormat = SimpleDateFormat("yyyyMMddHHmmss", Locale.CHINA)
+ return dateFormat.format(Date(this))
+}
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 167cf0c..93ec3d6 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -1,21 +1,21 @@
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
diff --git a/app/src/main/java/com/casic/electric/detector/extensions/Long.kt b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
new file mode 100644
index 0000000..e721898
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
@@ -0,0 +1,10 @@
+package com.casic.electric.detector.extensions
+
+import java.text.SimpleDateFormat
+import java.util.Date
+import java.util.Locale
+
+fun Long.createTaskCode(): String {
+ val dateFormat = SimpleDateFormat("yyyyMMddHHmmss", Locale.CHINA)
+ return dateFormat.format(Date(this))
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
index 71db201..a74f8c9 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
@@ -21,16 +21,18 @@
/** Creates underlying database table using DAOs. */
public static void createAllTables(Database db, boolean ifNotExists) {
- LabelBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ MarkerLocalBeanDao.createTable(db, ifNotExists);
+ SmallMarkerLocalBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/** Drops underlying database table using DAOs. */
public static void dropAllTables(Database db, boolean ifExists) {
- LabelBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ MarkerLocalBeanDao.dropTable(db, ifExists);
+ SmallMarkerLocalBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -49,9 +51,10 @@
public DaoMaster(Database db) {
super(db, SCHEMA_VERSION);
- registerDaoClass(LabelBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(MarkerLocalBeanDao.class);
+ registerDaoClass(SmallMarkerLocalBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 167cf0c..93ec3d6 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -1,21 +1,21 @@
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
diff --git a/app/src/main/java/com/casic/electric/detector/extensions/Long.kt b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
new file mode 100644
index 0000000..e721898
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
@@ -0,0 +1,10 @@
+package com.casic.electric.detector.extensions
+
+import java.text.SimpleDateFormat
+import java.util.Date
+import java.util.Locale
+
+fun Long.createTaskCode(): String {
+ val dateFormat = SimpleDateFormat("yyyyMMddHHmmss", Locale.CHINA)
+ return dateFormat.format(Date(this))
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
index 71db201..a74f8c9 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
@@ -21,16 +21,18 @@
/** Creates underlying database table using DAOs. */
public static void createAllTables(Database db, boolean ifNotExists) {
- LabelBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ MarkerLocalBeanDao.createTable(db, ifNotExists);
+ SmallMarkerLocalBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/** Drops underlying database table using DAOs. */
public static void dropAllTables(Database db, boolean ifExists) {
- LabelBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ MarkerLocalBeanDao.dropTable(db, ifExists);
+ SmallMarkerLocalBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -49,9 +51,10 @@
public DaoMaster(Database db) {
super(db, SCHEMA_VERSION);
- registerDaoClass(LabelBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(MarkerLocalBeanDao.class);
+ registerDaoClass(SmallMarkerLocalBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
index 564a552..6868224 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
@@ -1,8 +1,9 @@
package com.casic.electric.detector.greendao;
-import com.casic.electric.detector.bean.LabelBean;
-import com.casic.electric.detector.bean.SmallLabelBean;
-import com.casic.electric.detector.bean.TaskBean;
+import com.casic.electric.detector.bean.MarkerLocalBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
+import com.casic.electric.detector.bean.TaskLocalBean;
+import com.casic.electric.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -21,52 +22,64 @@
*/
public class DaoSession extends AbstractDaoSession {
- private final DaoConfig labelBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig markerLocalBeanDaoConfig;
+ private final DaoConfig smallMarkerLocalBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
- private final LabelBeanDao labelBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final MarkerLocalBeanDao markerLocalBeanDao;
+ private final SmallMarkerLocalBeanDao smallMarkerLocalBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
diff --git a/app/src/main/java/com/casic/electric/detector/extensions/Long.kt b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
new file mode 100644
index 0000000..e721898
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
@@ -0,0 +1,10 @@
+package com.casic.electric.detector.extensions
+
+import java.text.SimpleDateFormat
+import java.util.Date
+import java.util.Locale
+
+fun Long.createTaskCode(): String {
+ val dateFormat = SimpleDateFormat("yyyyMMddHHmmss", Locale.CHINA)
+ return dateFormat.format(Date(this))
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
index 71db201..a74f8c9 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
@@ -21,16 +21,18 @@
/** Creates underlying database table using DAOs. */
public static void createAllTables(Database db, boolean ifNotExists) {
- LabelBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ MarkerLocalBeanDao.createTable(db, ifNotExists);
+ SmallMarkerLocalBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/** Drops underlying database table using DAOs. */
public static void dropAllTables(Database db, boolean ifExists) {
- LabelBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ MarkerLocalBeanDao.dropTable(db, ifExists);
+ SmallMarkerLocalBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -49,9 +51,10 @@
public DaoMaster(Database db) {
super(db, SCHEMA_VERSION);
- registerDaoClass(LabelBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(MarkerLocalBeanDao.class);
+ registerDaoClass(SmallMarkerLocalBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
index 564a552..6868224 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
@@ -1,8 +1,9 @@
package com.casic.electric.detector.greendao;
-import com.casic.electric.detector.bean.LabelBean;
-import com.casic.electric.detector.bean.SmallLabelBean;
-import com.casic.electric.detector.bean.TaskBean;
+import com.casic.electric.detector.bean.MarkerLocalBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
+import com.casic.electric.detector.bean.TaskLocalBean;
+import com.casic.electric.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -21,52 +22,64 @@
*/
public class DaoSession extends AbstractDaoSession {
- private final DaoConfig labelBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig markerLocalBeanDaoConfig;
+ private final DaoConfig smallMarkerLocalBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
- private final LabelBeanDao labelBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final MarkerLocalBeanDao markerLocalBeanDao;
+ private final SmallMarkerLocalBeanDao smallMarkerLocalBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
diff --git a/app/src/main/java/com/casic/electric/detector/extensions/Long.kt b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
new file mode 100644
index 0000000..e721898
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
@@ -0,0 +1,10 @@
+package com.casic.electric.detector.extensions
+
+import java.text.SimpleDateFormat
+import java.util.Date
+import java.util.Locale
+
+fun Long.createTaskCode(): String {
+ val dateFormat = SimpleDateFormat("yyyyMMddHHmmss", Locale.CHINA)
+ return dateFormat.format(Date(this))
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
index 71db201..a74f8c9 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
@@ -21,16 +21,18 @@
/** Creates underlying database table using DAOs. */
public static void createAllTables(Database db, boolean ifNotExists) {
- LabelBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ MarkerLocalBeanDao.createTable(db, ifNotExists);
+ SmallMarkerLocalBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/** Drops underlying database table using DAOs. */
public static void dropAllTables(Database db, boolean ifExists) {
- LabelBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ MarkerLocalBeanDao.dropTable(db, ifExists);
+ SmallMarkerLocalBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -49,9 +51,10 @@
public DaoMaster(Database db) {
super(db, SCHEMA_VERSION);
- registerDaoClass(LabelBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(MarkerLocalBeanDao.class);
+ registerDaoClass(SmallMarkerLocalBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
index 564a552..6868224 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
@@ -1,8 +1,9 @@
package com.casic.electric.detector.greendao;
-import com.casic.electric.detector.bean.LabelBean;
-import com.casic.electric.detector.bean.SmallLabelBean;
-import com.casic.electric.detector.bean.TaskBean;
+import com.casic.electric.detector.bean.MarkerLocalBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
+import com.casic.electric.detector.bean.TaskLocalBean;
+import com.casic.electric.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -21,52 +22,64 @@
*/
public class DaoSession extends AbstractDaoSession {
- private final DaoConfig labelBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig markerLocalBeanDaoConfig;
+ private final DaoConfig smallMarkerLocalBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
- private final LabelBeanDao labelBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final MarkerLocalBeanDao markerLocalBeanDao;
+ private final SmallMarkerLocalBeanDao smallMarkerLocalBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
diff --git a/app/src/main/java/com/casic/electric/detector/extensions/Long.kt b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
new file mode 100644
index 0000000..e721898
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
@@ -0,0 +1,10 @@
+package com.casic.electric.detector.extensions
+
+import java.text.SimpleDateFormat
+import java.util.Date
+import java.util.Locale
+
+fun Long.createTaskCode(): String {
+ val dateFormat = SimpleDateFormat("yyyyMMddHHmmss", Locale.CHINA)
+ return dateFormat.format(Date(this))
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
index 71db201..a74f8c9 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
@@ -21,16 +21,18 @@
/** Creates underlying database table using DAOs. */
public static void createAllTables(Database db, boolean ifNotExists) {
- LabelBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ MarkerLocalBeanDao.createTable(db, ifNotExists);
+ SmallMarkerLocalBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/** Drops underlying database table using DAOs. */
public static void dropAllTables(Database db, boolean ifExists) {
- LabelBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ MarkerLocalBeanDao.dropTable(db, ifExists);
+ SmallMarkerLocalBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -49,9 +51,10 @@
public DaoMaster(Database db) {
super(db, SCHEMA_VERSION);
- registerDaoClass(LabelBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(MarkerLocalBeanDao.class);
+ registerDaoClass(SmallMarkerLocalBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
index 564a552..6868224 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
@@ -1,8 +1,9 @@
package com.casic.electric.detector.greendao;
-import com.casic.electric.detector.bean.LabelBean;
-import com.casic.electric.detector.bean.SmallLabelBean;
-import com.casic.electric.detector.bean.TaskBean;
+import com.casic.electric.detector.bean.MarkerLocalBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
+import com.casic.electric.detector.bean.TaskLocalBean;
+import com.casic.electric.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -21,52 +22,64 @@
*/
public class DaoSession extends AbstractDaoSession {
- private final DaoConfig labelBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig markerLocalBeanDaoConfig;
+ private final DaoConfig smallMarkerLocalBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
- private final LabelBeanDao labelBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final MarkerLocalBeanDao markerLocalBeanDao;
+ private final SmallMarkerLocalBeanDao smallMarkerLocalBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
diff --git a/app/src/main/java/com/casic/electric/detector/extensions/Long.kt b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
new file mode 100644
index 0000000..e721898
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
@@ -0,0 +1,10 @@
+package com.casic.electric.detector.extensions
+
+import java.text.SimpleDateFormat
+import java.util.Date
+import java.util.Locale
+
+fun Long.createTaskCode(): String {
+ val dateFormat = SimpleDateFormat("yyyyMMddHHmmss", Locale.CHINA)
+ return dateFormat.format(Date(this))
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
index 71db201..a74f8c9 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
@@ -21,16 +21,18 @@
/** Creates underlying database table using DAOs. */
public static void createAllTables(Database db, boolean ifNotExists) {
- LabelBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ MarkerLocalBeanDao.createTable(db, ifNotExists);
+ SmallMarkerLocalBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/** Drops underlying database table using DAOs. */
public static void dropAllTables(Database db, boolean ifExists) {
- LabelBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ MarkerLocalBeanDao.dropTable(db, ifExists);
+ SmallMarkerLocalBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -49,9 +51,10 @@
public DaoMaster(Database db) {
super(db, SCHEMA_VERSION);
- registerDaoClass(LabelBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(MarkerLocalBeanDao.class);
+ registerDaoClass(SmallMarkerLocalBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
index 564a552..6868224 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
@@ -1,8 +1,9 @@
package com.casic.electric.detector.greendao;
-import com.casic.electric.detector.bean.LabelBean;
-import com.casic.electric.detector.bean.SmallLabelBean;
-import com.casic.electric.detector.bean.TaskBean;
+import com.casic.electric.detector.bean.MarkerLocalBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
+import com.casic.electric.detector.bean.TaskLocalBean;
+import com.casic.electric.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -21,52 +22,64 @@
*/
public class DaoSession extends AbstractDaoSession {
- private final DaoConfig labelBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig markerLocalBeanDaoConfig;
+ private final DaoConfig smallMarkerLocalBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
- private final LabelBeanDao labelBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final MarkerLocalBeanDao markerLocalBeanDao;
+ private final SmallMarkerLocalBeanDao smallMarkerLocalBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
diff --git a/app/src/main/java/com/casic/electric/detector/extensions/Long.kt b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
new file mode 100644
index 0000000..e721898
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
@@ -0,0 +1,10 @@
+package com.casic.electric.detector.extensions
+
+import java.text.SimpleDateFormat
+import java.util.Date
+import java.util.Locale
+
+fun Long.createTaskCode(): String {
+ val dateFormat = SimpleDateFormat("yyyyMMddHHmmss", Locale.CHINA)
+ return dateFormat.format(Date(this))
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
index 71db201..a74f8c9 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
@@ -21,16 +21,18 @@
/** Creates underlying database table using DAOs. */
public static void createAllTables(Database db, boolean ifNotExists) {
- LabelBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ MarkerLocalBeanDao.createTable(db, ifNotExists);
+ SmallMarkerLocalBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/** Drops underlying database table using DAOs. */
public static void dropAllTables(Database db, boolean ifExists) {
- LabelBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ MarkerLocalBeanDao.dropTable(db, ifExists);
+ SmallMarkerLocalBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -49,9 +51,10 @@
public DaoMaster(Database db) {
super(db, SCHEMA_VERSION);
- registerDaoClass(LabelBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(MarkerLocalBeanDao.class);
+ registerDaoClass(SmallMarkerLocalBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
index 564a552..6868224 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
@@ -1,8 +1,9 @@
package com.casic.electric.detector.greendao;
-import com.casic.electric.detector.bean.LabelBean;
-import com.casic.electric.detector.bean.SmallLabelBean;
-import com.casic.electric.detector.bean.TaskBean;
+import com.casic.electric.detector.bean.MarkerLocalBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
+import com.casic.electric.detector.bean.TaskLocalBean;
+import com.casic.electric.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -21,52 +22,64 @@
*/
public class DaoSession extends AbstractDaoSession {
- private final DaoConfig labelBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig markerLocalBeanDaoConfig;
+ private final DaoConfig smallMarkerLocalBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
- private final LabelBeanDao labelBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final MarkerLocalBeanDao markerLocalBeanDao;
+ private final SmallMarkerLocalBeanDao smallMarkerLocalBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
diff --git a/app/src/main/java/com/casic/electric/detector/extensions/Long.kt b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
new file mode 100644
index 0000000..e721898
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
@@ -0,0 +1,10 @@
+package com.casic.electric.detector.extensions
+
+import java.text.SimpleDateFormat
+import java.util.Date
+import java.util.Locale
+
+fun Long.createTaskCode(): String {
+ val dateFormat = SimpleDateFormat("yyyyMMddHHmmss", Locale.CHINA)
+ return dateFormat.format(Date(this))
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
index 71db201..a74f8c9 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
@@ -21,16 +21,18 @@
/** Creates underlying database table using DAOs. */
public static void createAllTables(Database db, boolean ifNotExists) {
- LabelBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ MarkerLocalBeanDao.createTable(db, ifNotExists);
+ SmallMarkerLocalBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/** Drops underlying database table using DAOs. */
public static void dropAllTables(Database db, boolean ifExists) {
- LabelBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ MarkerLocalBeanDao.dropTable(db, ifExists);
+ SmallMarkerLocalBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -49,9 +51,10 @@
public DaoMaster(Database db) {
super(db, SCHEMA_VERSION);
- registerDaoClass(LabelBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(MarkerLocalBeanDao.class);
+ registerDaoClass(SmallMarkerLocalBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
index 564a552..6868224 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
@@ -1,8 +1,9 @@
package com.casic.electric.detector.greendao;
-import com.casic.electric.detector.bean.LabelBean;
-import com.casic.electric.detector.bean.SmallLabelBean;
-import com.casic.electric.detector.bean.TaskBean;
+import com.casic.electric.detector.bean.MarkerLocalBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
+import com.casic.electric.detector.bean.TaskLocalBean;
+import com.casic.electric.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -21,52 +22,64 @@
*/
public class DaoSession extends AbstractDaoSession {
- private final DaoConfig labelBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig markerLocalBeanDaoConfig;
+ private final DaoConfig smallMarkerLocalBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
- private final LabelBeanDao labelBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final MarkerLocalBeanDao markerLocalBeanDao;
+ private final SmallMarkerLocalBeanDao smallMarkerLocalBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
diff --git a/app/src/main/java/com/casic/electric/detector/extensions/Long.kt b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
new file mode 100644
index 0000000..e721898
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
@@ -0,0 +1,10 @@
+package com.casic.electric.detector.extensions
+
+import java.text.SimpleDateFormat
+import java.util.Date
+import java.util.Locale
+
+fun Long.createTaskCode(): String {
+ val dateFormat = SimpleDateFormat("yyyyMMddHHmmss", Locale.CHINA)
+ return dateFormat.format(Date(this))
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
index 71db201..a74f8c9 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
@@ -21,16 +21,18 @@
/** Creates underlying database table using DAOs. */
public static void createAllTables(Database db, boolean ifNotExists) {
- LabelBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ MarkerLocalBeanDao.createTable(db, ifNotExists);
+ SmallMarkerLocalBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/** Drops underlying database table using DAOs. */
public static void dropAllTables(Database db, boolean ifExists) {
- LabelBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ MarkerLocalBeanDao.dropTable(db, ifExists);
+ SmallMarkerLocalBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -49,9 +51,10 @@
public DaoMaster(Database db) {
super(db, SCHEMA_VERSION);
- registerDaoClass(LabelBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(MarkerLocalBeanDao.class);
+ registerDaoClass(SmallMarkerLocalBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
index 564a552..6868224 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
@@ -1,8 +1,9 @@
package com.casic.electric.detector.greendao;
-import com.casic.electric.detector.bean.LabelBean;
-import com.casic.electric.detector.bean.SmallLabelBean;
-import com.casic.electric.detector.bean.TaskBean;
+import com.casic.electric.detector.bean.MarkerLocalBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
+import com.casic.electric.detector.bean.TaskLocalBean;
+import com.casic.electric.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -21,52 +22,64 @@
*/
public class DaoSession extends AbstractDaoSession {
- private final DaoConfig labelBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig markerLocalBeanDaoConfig;
+ private final DaoConfig smallMarkerLocalBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
- private final LabelBeanDao labelBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final MarkerLocalBeanDao markerLocalBeanDao;
+ private final SmallMarkerLocalBeanDao smallMarkerLocalBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
diff --git a/app/src/main/java/com/casic/electric/detector/extensions/Long.kt b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
new file mode 100644
index 0000000..e721898
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
@@ -0,0 +1,10 @@
+package com.casic.electric.detector.extensions
+
+import java.text.SimpleDateFormat
+import java.util.Date
+import java.util.Locale
+
+fun Long.createTaskCode(): String {
+ val dateFormat = SimpleDateFormat("yyyyMMddHHmmss", Locale.CHINA)
+ return dateFormat.format(Date(this))
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
index 71db201..a74f8c9 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
@@ -21,16 +21,18 @@
/** Creates underlying database table using DAOs. */
public static void createAllTables(Database db, boolean ifNotExists) {
- LabelBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ MarkerLocalBeanDao.createTable(db, ifNotExists);
+ SmallMarkerLocalBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/** Drops underlying database table using DAOs. */
public static void dropAllTables(Database db, boolean ifExists) {
- LabelBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ MarkerLocalBeanDao.dropTable(db, ifExists);
+ SmallMarkerLocalBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -49,9 +51,10 @@
public DaoMaster(Database db) {
super(db, SCHEMA_VERSION);
- registerDaoClass(LabelBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(MarkerLocalBeanDao.class);
+ registerDaoClass(SmallMarkerLocalBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
index 564a552..6868224 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
@@ -1,8 +1,9 @@
package com.casic.electric.detector.greendao;
-import com.casic.electric.detector.bean.LabelBean;
-import com.casic.electric.detector.bean.SmallLabelBean;
-import com.casic.electric.detector.bean.TaskBean;
+import com.casic.electric.detector.bean.MarkerLocalBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
+import com.casic.electric.detector.bean.TaskLocalBean;
+import com.casic.electric.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -21,52 +22,64 @@
*/
public class DaoSession extends AbstractDaoSession {
- private final DaoConfig labelBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig markerLocalBeanDaoConfig;
+ private final DaoConfig smallMarkerLocalBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
- private final LabelBeanDao labelBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final MarkerLocalBeanDao markerLocalBeanDao;
+ private final SmallMarkerLocalBeanDao smallMarkerLocalBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
diff --git a/app/src/main/java/com/casic/electric/detector/extensions/Long.kt b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
new file mode 100644
index 0000000..e721898
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
@@ -0,0 +1,10 @@
+package com.casic.electric.detector.extensions
+
+import java.text.SimpleDateFormat
+import java.util.Date
+import java.util.Locale
+
+fun Long.createTaskCode(): String {
+ val dateFormat = SimpleDateFormat("yyyyMMddHHmmss", Locale.CHINA)
+ return dateFormat.format(Date(this))
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
index 71db201..a74f8c9 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
@@ -21,16 +21,18 @@
/** Creates underlying database table using DAOs. */
public static void createAllTables(Database db, boolean ifNotExists) {
- LabelBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ MarkerLocalBeanDao.createTable(db, ifNotExists);
+ SmallMarkerLocalBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/** Drops underlying database table using DAOs. */
public static void dropAllTables(Database db, boolean ifExists) {
- LabelBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ MarkerLocalBeanDao.dropTable(db, ifExists);
+ SmallMarkerLocalBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -49,9 +51,10 @@
public DaoMaster(Database db) {
super(db, SCHEMA_VERSION);
- registerDaoClass(LabelBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(MarkerLocalBeanDao.class);
+ registerDaoClass(SmallMarkerLocalBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
index 564a552..6868224 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
@@ -1,8 +1,9 @@
package com.casic.electric.detector.greendao;
-import com.casic.electric.detector.bean.LabelBean;
-import com.casic.electric.detector.bean.SmallLabelBean;
-import com.casic.electric.detector.bean.TaskBean;
+import com.casic.electric.detector.bean.MarkerLocalBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
+import com.casic.electric.detector.bean.TaskLocalBean;
+import com.casic.electric.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -21,52 +22,64 @@
*/
public class DaoSession extends AbstractDaoSession {
- private final DaoConfig labelBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig markerLocalBeanDaoConfig;
+ private final DaoConfig smallMarkerLocalBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
- private final LabelBeanDao labelBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final MarkerLocalBeanDao markerLocalBeanDao;
+ private final SmallMarkerLocalBeanDao smallMarkerLocalBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
diff --git a/app/src/main/java/com/casic/electric/detector/extensions/Long.kt b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
new file mode 100644
index 0000000..e721898
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
@@ -0,0 +1,10 @@
+package com.casic.electric.detector.extensions
+
+import java.text.SimpleDateFormat
+import java.util.Date
+import java.util.Locale
+
+fun Long.createTaskCode(): String {
+ val dateFormat = SimpleDateFormat("yyyyMMddHHmmss", Locale.CHINA)
+ return dateFormat.format(Date(this))
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
index 71db201..a74f8c9 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
@@ -21,16 +21,18 @@
/** Creates underlying database table using DAOs. */
public static void createAllTables(Database db, boolean ifNotExists) {
- LabelBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ MarkerLocalBeanDao.createTable(db, ifNotExists);
+ SmallMarkerLocalBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/** Drops underlying database table using DAOs. */
public static void dropAllTables(Database db, boolean ifExists) {
- LabelBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ MarkerLocalBeanDao.dropTable(db, ifExists);
+ SmallMarkerLocalBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -49,9 +51,10 @@
public DaoMaster(Database db) {
super(db, SCHEMA_VERSION);
- registerDaoClass(LabelBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(MarkerLocalBeanDao.class);
+ registerDaoClass(SmallMarkerLocalBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
index 564a552..6868224 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
@@ -1,8 +1,9 @@
package com.casic.electric.detector.greendao;
-import com.casic.electric.detector.bean.LabelBean;
-import com.casic.electric.detector.bean.SmallLabelBean;
-import com.casic.electric.detector.bean.TaskBean;
+import com.casic.electric.detector.bean.MarkerLocalBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
+import com.casic.electric.detector.bean.TaskLocalBean;
+import com.casic.electric.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -21,52 +22,64 @@
*/
public class DaoSession extends AbstractDaoSession {
- private final DaoConfig labelBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig markerLocalBeanDaoConfig;
+ private final DaoConfig smallMarkerLocalBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
- private final LabelBeanDao labelBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final MarkerLocalBeanDao markerLocalBeanDao;
+ private final SmallMarkerLocalBeanDao smallMarkerLocalBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
diff --git a/app/src/main/java/com/casic/electric/detector/extensions/Long.kt b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
new file mode 100644
index 0000000..e721898
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
@@ -0,0 +1,10 @@
+package com.casic.electric.detector.extensions
+
+import java.text.SimpleDateFormat
+import java.util.Date
+import java.util.Locale
+
+fun Long.createTaskCode(): String {
+ val dateFormat = SimpleDateFormat("yyyyMMddHHmmss", Locale.CHINA)
+ return dateFormat.format(Date(this))
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
index 71db201..a74f8c9 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
@@ -21,16 +21,18 @@
/** Creates underlying database table using DAOs. */
public static void createAllTables(Database db, boolean ifNotExists) {
- LabelBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ MarkerLocalBeanDao.createTable(db, ifNotExists);
+ SmallMarkerLocalBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/** Drops underlying database table using DAOs. */
public static void dropAllTables(Database db, boolean ifExists) {
- LabelBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ MarkerLocalBeanDao.dropTable(db, ifExists);
+ SmallMarkerLocalBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -49,9 +51,10 @@
public DaoMaster(Database db) {
super(db, SCHEMA_VERSION);
- registerDaoClass(LabelBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(MarkerLocalBeanDao.class);
+ registerDaoClass(SmallMarkerLocalBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
index 564a552..6868224 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
@@ -1,8 +1,9 @@
package com.casic.electric.detector.greendao;
-import com.casic.electric.detector.bean.LabelBean;
-import com.casic.electric.detector.bean.SmallLabelBean;
-import com.casic.electric.detector.bean.TaskBean;
+import com.casic.electric.detector.bean.MarkerLocalBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
+import com.casic.electric.detector.bean.TaskLocalBean;
+import com.casic.electric.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -21,52 +22,64 @@
*/
public class DaoSession extends AbstractDaoSession {
- private final DaoConfig labelBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig markerLocalBeanDaoConfig;
+ private final DaoConfig smallMarkerLocalBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
- private final LabelBeanDao labelBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final MarkerLocalBeanDao markerLocalBeanDao;
+ private final SmallMarkerLocalBeanDao smallMarkerLocalBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
diff --git a/app/src/main/java/com/casic/electric/detector/extensions/Long.kt b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
new file mode 100644
index 0000000..e721898
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
@@ -0,0 +1,10 @@
+package com.casic.electric.detector.extensions
+
+import java.text.SimpleDateFormat
+import java.util.Date
+import java.util.Locale
+
+fun Long.createTaskCode(): String {
+ val dateFormat = SimpleDateFormat("yyyyMMddHHmmss", Locale.CHINA)
+ return dateFormat.format(Date(this))
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
index 71db201..a74f8c9 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
@@ -21,16 +21,18 @@
/** Creates underlying database table using DAOs. */
public static void createAllTables(Database db, boolean ifNotExists) {
- LabelBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ MarkerLocalBeanDao.createTable(db, ifNotExists);
+ SmallMarkerLocalBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/** Drops underlying database table using DAOs. */
public static void dropAllTables(Database db, boolean ifExists) {
- LabelBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ MarkerLocalBeanDao.dropTable(db, ifExists);
+ SmallMarkerLocalBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -49,9 +51,10 @@
public DaoMaster(Database db) {
super(db, SCHEMA_VERSION);
- registerDaoClass(LabelBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(MarkerLocalBeanDao.class);
+ registerDaoClass(SmallMarkerLocalBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
index 564a552..6868224 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
@@ -1,8 +1,9 @@
package com.casic.electric.detector.greendao;
-import com.casic.electric.detector.bean.LabelBean;
-import com.casic.electric.detector.bean.SmallLabelBean;
-import com.casic.electric.detector.bean.TaskBean;
+import com.casic.electric.detector.bean.MarkerLocalBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
+import com.casic.electric.detector.bean.TaskLocalBean;
+import com.casic.electric.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -21,52 +22,64 @@
*/
public class DaoSession extends AbstractDaoSession {
- private final DaoConfig labelBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig markerLocalBeanDaoConfig;
+ private final DaoConfig smallMarkerLocalBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
- private final LabelBeanDao labelBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final MarkerLocalBeanDao markerLocalBeanDao;
+ private final SmallMarkerLocalBeanDao smallMarkerLocalBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
diff --git a/app/src/main/java/com/casic/electric/detector/extensions/Long.kt b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
new file mode 100644
index 0000000..e721898
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
@@ -0,0 +1,10 @@
+package com.casic.electric.detector.extensions
+
+import java.text.SimpleDateFormat
+import java.util.Date
+import java.util.Locale
+
+fun Long.createTaskCode(): String {
+ val dateFormat = SimpleDateFormat("yyyyMMddHHmmss", Locale.CHINA)
+ return dateFormat.format(Date(this))
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
index 71db201..a74f8c9 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
@@ -21,16 +21,18 @@
/** Creates underlying database table using DAOs. */
public static void createAllTables(Database db, boolean ifNotExists) {
- LabelBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ MarkerLocalBeanDao.createTable(db, ifNotExists);
+ SmallMarkerLocalBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/** Drops underlying database table using DAOs. */
public static void dropAllTables(Database db, boolean ifExists) {
- LabelBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ MarkerLocalBeanDao.dropTable(db, ifExists);
+ SmallMarkerLocalBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -49,9 +51,10 @@
public DaoMaster(Database db) {
super(db, SCHEMA_VERSION);
- registerDaoClass(LabelBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(MarkerLocalBeanDao.class);
+ registerDaoClass(SmallMarkerLocalBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
index 564a552..6868224 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
@@ -1,8 +1,9 @@
package com.casic.electric.detector.greendao;
-import com.casic.electric.detector.bean.LabelBean;
-import com.casic.electric.detector.bean.SmallLabelBean;
-import com.casic.electric.detector.bean.TaskBean;
+import com.casic.electric.detector.bean.MarkerLocalBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
+import com.casic.electric.detector.bean.TaskLocalBean;
+import com.casic.electric.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -21,52 +22,64 @@
*/
public class DaoSession extends AbstractDaoSession {
- private final DaoConfig labelBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig markerLocalBeanDaoConfig;
+ private final DaoConfig smallMarkerLocalBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
- private final LabelBeanDao labelBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final MarkerLocalBeanDao markerLocalBeanDao;
+ private final SmallMarkerLocalBeanDao smallMarkerLocalBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
diff --git a/app/src/main/java/com/casic/electric/detector/extensions/Long.kt b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
new file mode 100644
index 0000000..e721898
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/extensions/Long.kt
@@ -0,0 +1,10 @@
+package com.casic.electric.detector.extensions
+
+import java.text.SimpleDateFormat
+import java.util.Date
+import java.util.Locale
+
+fun Long.createTaskCode(): String {
+ val dateFormat = SimpleDateFormat("yyyyMMddHHmmss", Locale.CHINA)
+ return dateFormat.format(Date(this))
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
index 71db201..a74f8c9 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoMaster.java
@@ -21,16 +21,18 @@
/** Creates underlying database table using DAOs. */
public static void createAllTables(Database db, boolean ifNotExists) {
- LabelBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ MarkerLocalBeanDao.createTable(db, ifNotExists);
+ SmallMarkerLocalBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/** Drops underlying database table using DAOs. */
public static void dropAllTables(Database db, boolean ifExists) {
- LabelBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ MarkerLocalBeanDao.dropTable(db, ifExists);
+ SmallMarkerLocalBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -49,9 +51,10 @@
public DaoMaster(Database db) {
super(db, SCHEMA_VERSION);
- registerDaoClass(LabelBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(MarkerLocalBeanDao.class);
+ registerDaoClass(SmallMarkerLocalBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
index 564a552..6868224 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/DaoSession.java
@@ -1,8 +1,9 @@
package com.casic.electric.detector.greendao;
-import com.casic.electric.detector.bean.LabelBean;
-import com.casic.electric.detector.bean.SmallLabelBean;
-import com.casic.electric.detector.bean.TaskBean;
+import com.casic.electric.detector.bean.MarkerLocalBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
+import com.casic.electric.detector.bean.TaskLocalBean;
+import com.casic.electric.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -21,52 +22,64 @@
*/
public class DaoSession extends AbstractDaoSession {
- private final DaoConfig labelBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig markerLocalBeanDaoConfig;
+ private final DaoConfig smallMarkerLocalBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
- private final LabelBeanDao labelBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final MarkerLocalBeanDao markerLocalBeanDao;
+ private final SmallMarkerLocalBeanDao smallMarkerLocalBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property MarkerObjType = new Property(1, String.class, "markerObjType", false, "MARKER_OBJ_TYPE");
- public final static Property MarkerNumber = new Property(2, String.class, "markerNumber", false, "MARKER_NUMBER");
- public final static Property ObjectName = new Property(3, String.class, "objectName", false, "OBJECT_NAME");
- public final static Property VoltageLevel = new Property(4, String.class, "voltageLevel", false, "VOLTAGE_LEVEL");
- public final static Property TransformerModel = new Property(5, String.class, "transformerModel", false, "TRANSFORMER_MODEL");
- public final static Property HoleCount = new Property(6, String.class, "holeCount", false, "HOLE_COUNT");
- public final static Property Capacity = new Property(7, String.class, "capacity", false, "CAPACITY");
- public final static Property WellCoverMaterial = new Property(8, String.class, "wellCoverMaterial", false, "WELL_COVER_MATERIAL");
- public final static Property CoverDepth = new Property(9, String.class, "coverDepth", false, "COVER_DEPTH");
- public final static Property TransformerSpec = new Property(10, String.class, "transformerSpec", false, "TRANSFORMER_SPEC");
- public final static Property InlineName = new Property(11, String.class, "inlineName", false, "INLINE_NAME");
- public final static Property Size = new Property(12, String.class, "size", false, "SIZE");
- public final static Property BottomDepth = new Property(13, String.class, "bottomDepth", false, "BOTTOM_DEPTH");
- public final static Property Height = new Property(14, String.class, "height", false, "HEIGHT");
- public final static Property CrossPipeLine = new Property(15, String.class, "crossPipeLine", false, "CROSS_PIPE_LINE");
- public final static Property InlineCount = new Property(16, String.class, "inlineCount", false, "INLINE_COUNT");
- public final static Property LineNumber = new Property(17, String.class, "lineNumber", false, "LINE_NUMBER");
- public final static Property JointCount = new Property(18, String.class, "jointCount", false, "JOINT_COUNT");
- public final static Property OutlineCount = new Property(19, String.class, "outlineCount", false, "OUTLINE_COUNT");
- public final static Property RemainingChannels = new Property(20, String.class, "remainingChannels", false, "REMAINING_CHANNELS");
- public final static Property CabinetType = new Property(21, String.class, "cabinetType", false, "CABINET_TYPE");
- public final static Property TieCable1 = new Property(22, String.class, "tieCable1", false, "TIE_CABLE1");
- public final static Property TieCable2 = new Property(23, String.class, "tieCable2", false, "TIE_CABLE2");
- public final static Property CasingMaterial = new Property(24, String.class, "casingMaterial", false, "CASING_MATERIAL");
- public final static Property CasingSpec = new Property(25, String.class, "casingSpec", false, "CASING_SPEC");
- public final static Property ConstructTime = new Property(26, String.class, "constructTime", false, "CONSTRUCT_TIME");
- public final static Property InspectionUnit = new Property(27, String.class, "inspectionUnit", false, "INSPECTION_UNIT");
- public final static Property Area = new Property(28, String.class, "area", false, "AREA");
- public final static Property Road = new Property(29, String.class, "road", false, "ROAD");
- public final static Property Memo1 = new Property(30, String.class, "memo1", false, "MEMO1");
- public final static Property Memo2 = new Property(31, String.class, "memo2", false, "MEMO2");
- public final static Property Memo3 = new Property(32, String.class, "memo3", false, "MEMO3");
- public final static Property MarkerId = new Property(33, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerType = new Property(34, String.class, "markerType", false, "MARKER_TYPE");
- public final static Property Owner = new Property(35, String.class, "owner", false, "OWNER");
- public final static Property MarkerDepth = new Property(36, String.class, "markerDepth", false, "MARKER_DEPTH");
- public final static Property ElectricTagCount = new Property(37, String.class, "electricTagCount", false, "ELECTRIC_TAG_COUNT");
- public final static Property InstalledTime = new Property(38, String.class, "installedTime", false, "INSTALLED_TIME");
- public final static Property Longitude = new Property(39, String.class, "longitude", false, "LONGITUDE");
- public final static Property Latitude = new Property(40, String.class, "latitude", false, "LATITUDE");
- public final static Property MarkerMemo1 = new Property(41, String.class, "markerMemo1", false, "MARKER_MEMO1");
- public final static Property MarkerMemo2 = new Property(42, String.class, "markerMemo2", false, "MARKER_MEMO2");
- public final static Property MarkerMemo3 = new Property(43, String.class, "markerMemo3", false, "MARKER_MEMO3");
- public final static Property ImagePath = new Property(44, String.class, "imagePath", false, "IMAGE_PATH");
- }
-
-
- public LabelBeanDao(DaoConfig config) {
- super(config);
- }
-
- public LabelBeanDao(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 + "\"LABEL_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"MARKER_OBJ_TYPE\" TEXT," + // 1: markerObjType
- "\"MARKER_NUMBER\" TEXT," + // 2: markerNumber
- "\"OBJECT_NAME\" TEXT," + // 3: objectName
- "\"VOLTAGE_LEVEL\" TEXT," + // 4: voltageLevel
- "\"TRANSFORMER_MODEL\" TEXT," + // 5: transformerModel
- "\"HOLE_COUNT\" TEXT," + // 6: holeCount
- "\"CAPACITY\" TEXT," + // 7: capacity
- "\"WELL_COVER_MATERIAL\" TEXT," + // 8: wellCoverMaterial
- "\"COVER_DEPTH\" TEXT," + // 9: coverDepth
- "\"TRANSFORMER_SPEC\" TEXT," + // 10: transformerSpec
- "\"INLINE_NAME\" TEXT," + // 11: inlineName
- "\"SIZE\" TEXT," + // 12: size
- "\"BOTTOM_DEPTH\" TEXT," + // 13: bottomDepth
- "\"HEIGHT\" TEXT," + // 14: height
- "\"CROSS_PIPE_LINE\" TEXT," + // 15: crossPipeLine
- "\"INLINE_COUNT\" TEXT," + // 16: inlineCount
- "\"LINE_NUMBER\" TEXT," + // 17: lineNumber
- "\"JOINT_COUNT\" TEXT," + // 18: jointCount
- "\"OUTLINE_COUNT\" TEXT," + // 19: outlineCount
- "\"REMAINING_CHANNELS\" TEXT," + // 20: remainingChannels
- "\"CABINET_TYPE\" TEXT," + // 21: cabinetType
- "\"TIE_CABLE1\" TEXT," + // 22: tieCable1
- "\"TIE_CABLE2\" TEXT," + // 23: tieCable2
- "\"CASING_MATERIAL\" TEXT," + // 24: casingMaterial
- "\"CASING_SPEC\" TEXT," + // 25: casingSpec
- "\"CONSTRUCT_TIME\" TEXT," + // 26: constructTime
- "\"INSPECTION_UNIT\" TEXT," + // 27: inspectionUnit
- "\"AREA\" TEXT," + // 28: area
- "\"ROAD\" TEXT," + // 29: road
- "\"MEMO1\" TEXT," + // 30: memo1
- "\"MEMO2\" TEXT," + // 31: memo2
- "\"MEMO3\" TEXT," + // 32: memo3
- "\"MARKER_ID\" TEXT," + // 33: markerId
- "\"MARKER_TYPE\" TEXT," + // 34: markerType
- "\"OWNER\" TEXT," + // 35: owner
- "\"MARKER_DEPTH\" TEXT," + // 36: markerDepth
- "\"ELECTRIC_TAG_COUNT\" TEXT," + // 37: electricTagCount
- "\"INSTALLED_TIME\" TEXT," + // 38: installedTime
- "\"LONGITUDE\" TEXT," + // 39: longitude
- "\"LATITUDE\" TEXT," + // 40: latitude
- "\"MARKER_MEMO1\" TEXT," + // 41: markerMemo1
- "\"MARKER_MEMO2\" TEXT," + // 42: markerMemo2
- "\"MARKER_MEMO3\" TEXT," + // 43: markerMemo3
- "\"IMAGE_PATH\" TEXT);"); // 44: imagePath
- }
-
- /** Drops the underlying database table. */
- public static void dropTable(Database db, boolean ifExists) {
- String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"LABEL_BEAN\"";
- db.execSQL(sql);
- }
-
- @Override
- protected final void bindValues(DatabaseStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- protected final void bindValues(SQLiteStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public LabelBean readEntity(Cursor cursor, int offset) {
- LabelBean entity = new LabelBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerObjType
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // markerNumber
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // objectName
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // voltageLevel
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // transformerModel
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // holeCount
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // capacity
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // wellCoverMaterial
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // coverDepth
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // transformerSpec
- cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // inlineName
- cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // size
- cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // bottomDepth
- cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // height
- cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // crossPipeLine
- cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // inlineCount
- cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lineNumber
- cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // jointCount
- cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // outlineCount
- cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // remainingChannels
- cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // cabinetType
- cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // tieCable1
- cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // tieCable2
- cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // casingMaterial
- cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // casingSpec
- cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26), // constructTime
- cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27), // inspectionUnit
- cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28), // area
- cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29), // road
- cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30), // memo1
- cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31), // memo2
- cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32), // memo3
- cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33), // markerId
- cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34), // markerType
- cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35), // owner
- cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36), // markerDepth
- cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37), // electricTagCount
- cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38), // installedTime
- cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39), // longitude
- cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40), // latitude
- cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41), // markerMemo1
- cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42), // markerMemo2
- cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43), // markerMemo3
- cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44) // imagePath
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, LabelBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setMarkerObjType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setMarkerNumber(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setObjectName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setVoltageLevel(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setTransformerModel(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setHoleCount(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setCapacity(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setWellCoverMaterial(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setCoverDepth(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- entity.setTransformerSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
- entity.setInlineName(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
- entity.setSize(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
- entity.setBottomDepth(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
- entity.setHeight(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
- entity.setCrossPipeLine(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
- entity.setInlineCount(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
- entity.setLineNumber(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
- entity.setJointCount(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
- entity.setOutlineCount(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
- entity.setRemainingChannels(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
- entity.setCabinetType(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
- entity.setTieCable1(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
- entity.setTieCable2(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
- entity.setCasingMaterial(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
- entity.setCasingSpec(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
- entity.setConstructTime(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
- entity.setInspectionUnit(cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27));
- entity.setArea(cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28));
- entity.setRoad(cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29));
- entity.setMemo1(cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30));
- entity.setMemo2(cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31));
- entity.setMemo3(cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32));
- entity.setMarkerId(cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33));
- entity.setMarkerType(cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34));
- entity.setOwner(cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35));
- entity.setMarkerDepth(cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36));
- entity.setElectricTagCount(cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37));
- entity.setInstalledTime(cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38));
- entity.setLongitude(cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39));
- entity.setLatitude(cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40));
- entity.setMarkerMemo1(cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41));
- entity.setMarkerMemo2(cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42));
- entity.setMarkerMemo3(cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43));
- entity.setImagePath(cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(LabelBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(LabelBean entity) {
- if(entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(LabelBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 167cf0c..93ec3d6 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -1,21 +1,21 @@
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property MarkerObjType = new Property(1, String.class, "markerObjType", false, "MARKER_OBJ_TYPE");
- public final static Property MarkerNumber = new Property(2, String.class, "markerNumber", false, "MARKER_NUMBER");
- public final static Property ObjectName = new Property(3, String.class, "objectName", false, "OBJECT_NAME");
- public final static Property VoltageLevel = new Property(4, String.class, "voltageLevel", false, "VOLTAGE_LEVEL");
- public final static Property TransformerModel = new Property(5, String.class, "transformerModel", false, "TRANSFORMER_MODEL");
- public final static Property HoleCount = new Property(6, String.class, "holeCount", false, "HOLE_COUNT");
- public final static Property Capacity = new Property(7, String.class, "capacity", false, "CAPACITY");
- public final static Property WellCoverMaterial = new Property(8, String.class, "wellCoverMaterial", false, "WELL_COVER_MATERIAL");
- public final static Property CoverDepth = new Property(9, String.class, "coverDepth", false, "COVER_DEPTH");
- public final static Property TransformerSpec = new Property(10, String.class, "transformerSpec", false, "TRANSFORMER_SPEC");
- public final static Property InlineName = new Property(11, String.class, "inlineName", false, "INLINE_NAME");
- public final static Property Size = new Property(12, String.class, "size", false, "SIZE");
- public final static Property BottomDepth = new Property(13, String.class, "bottomDepth", false, "BOTTOM_DEPTH");
- public final static Property Height = new Property(14, String.class, "height", false, "HEIGHT");
- public final static Property CrossPipeLine = new Property(15, String.class, "crossPipeLine", false, "CROSS_PIPE_LINE");
- public final static Property InlineCount = new Property(16, String.class, "inlineCount", false, "INLINE_COUNT");
- public final static Property LineNumber = new Property(17, String.class, "lineNumber", false, "LINE_NUMBER");
- public final static Property JointCount = new Property(18, String.class, "jointCount", false, "JOINT_COUNT");
- public final static Property OutlineCount = new Property(19, String.class, "outlineCount", false, "OUTLINE_COUNT");
- public final static Property RemainingChannels = new Property(20, String.class, "remainingChannels", false, "REMAINING_CHANNELS");
- public final static Property CabinetType = new Property(21, String.class, "cabinetType", false, "CABINET_TYPE");
- public final static Property TieCable1 = new Property(22, String.class, "tieCable1", false, "TIE_CABLE1");
- public final static Property TieCable2 = new Property(23, String.class, "tieCable2", false, "TIE_CABLE2");
- public final static Property CasingMaterial = new Property(24, String.class, "casingMaterial", false, "CASING_MATERIAL");
- public final static Property CasingSpec = new Property(25, String.class, "casingSpec", false, "CASING_SPEC");
- public final static Property ConstructTime = new Property(26, String.class, "constructTime", false, "CONSTRUCT_TIME");
- public final static Property InspectionUnit = new Property(27, String.class, "inspectionUnit", false, "INSPECTION_UNIT");
- public final static Property Area = new Property(28, String.class, "area", false, "AREA");
- public final static Property Road = new Property(29, String.class, "road", false, "ROAD");
- public final static Property Memo1 = new Property(30, String.class, "memo1", false, "MEMO1");
- public final static Property Memo2 = new Property(31, String.class, "memo2", false, "MEMO2");
- public final static Property Memo3 = new Property(32, String.class, "memo3", false, "MEMO3");
- public final static Property MarkerId = new Property(33, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerType = new Property(34, String.class, "markerType", false, "MARKER_TYPE");
- public final static Property Owner = new Property(35, String.class, "owner", false, "OWNER");
- public final static Property MarkerDepth = new Property(36, String.class, "markerDepth", false, "MARKER_DEPTH");
- public final static Property ElectricTagCount = new Property(37, String.class, "electricTagCount", false, "ELECTRIC_TAG_COUNT");
- public final static Property InstalledTime = new Property(38, String.class, "installedTime", false, "INSTALLED_TIME");
- public final static Property Longitude = new Property(39, String.class, "longitude", false, "LONGITUDE");
- public final static Property Latitude = new Property(40, String.class, "latitude", false, "LATITUDE");
- public final static Property MarkerMemo1 = new Property(41, String.class, "markerMemo1", false, "MARKER_MEMO1");
- public final static Property MarkerMemo2 = new Property(42, String.class, "markerMemo2", false, "MARKER_MEMO2");
- public final static Property MarkerMemo3 = new Property(43, String.class, "markerMemo3", false, "MARKER_MEMO3");
- public final static Property ImagePath = new Property(44, String.class, "imagePath", false, "IMAGE_PATH");
- }
-
-
- public LabelBeanDao(DaoConfig config) {
- super(config);
- }
-
- public LabelBeanDao(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 + "\"LABEL_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"MARKER_OBJ_TYPE\" TEXT," + // 1: markerObjType
- "\"MARKER_NUMBER\" TEXT," + // 2: markerNumber
- "\"OBJECT_NAME\" TEXT," + // 3: objectName
- "\"VOLTAGE_LEVEL\" TEXT," + // 4: voltageLevel
- "\"TRANSFORMER_MODEL\" TEXT," + // 5: transformerModel
- "\"HOLE_COUNT\" TEXT," + // 6: holeCount
- "\"CAPACITY\" TEXT," + // 7: capacity
- "\"WELL_COVER_MATERIAL\" TEXT," + // 8: wellCoverMaterial
- "\"COVER_DEPTH\" TEXT," + // 9: coverDepth
- "\"TRANSFORMER_SPEC\" TEXT," + // 10: transformerSpec
- "\"INLINE_NAME\" TEXT," + // 11: inlineName
- "\"SIZE\" TEXT," + // 12: size
- "\"BOTTOM_DEPTH\" TEXT," + // 13: bottomDepth
- "\"HEIGHT\" TEXT," + // 14: height
- "\"CROSS_PIPE_LINE\" TEXT," + // 15: crossPipeLine
- "\"INLINE_COUNT\" TEXT," + // 16: inlineCount
- "\"LINE_NUMBER\" TEXT," + // 17: lineNumber
- "\"JOINT_COUNT\" TEXT," + // 18: jointCount
- "\"OUTLINE_COUNT\" TEXT," + // 19: outlineCount
- "\"REMAINING_CHANNELS\" TEXT," + // 20: remainingChannels
- "\"CABINET_TYPE\" TEXT," + // 21: cabinetType
- "\"TIE_CABLE1\" TEXT," + // 22: tieCable1
- "\"TIE_CABLE2\" TEXT," + // 23: tieCable2
- "\"CASING_MATERIAL\" TEXT," + // 24: casingMaterial
- "\"CASING_SPEC\" TEXT," + // 25: casingSpec
- "\"CONSTRUCT_TIME\" TEXT," + // 26: constructTime
- "\"INSPECTION_UNIT\" TEXT," + // 27: inspectionUnit
- "\"AREA\" TEXT," + // 28: area
- "\"ROAD\" TEXT," + // 29: road
- "\"MEMO1\" TEXT," + // 30: memo1
- "\"MEMO2\" TEXT," + // 31: memo2
- "\"MEMO3\" TEXT," + // 32: memo3
- "\"MARKER_ID\" TEXT," + // 33: markerId
- "\"MARKER_TYPE\" TEXT," + // 34: markerType
- "\"OWNER\" TEXT," + // 35: owner
- "\"MARKER_DEPTH\" TEXT," + // 36: markerDepth
- "\"ELECTRIC_TAG_COUNT\" TEXT," + // 37: electricTagCount
- "\"INSTALLED_TIME\" TEXT," + // 38: installedTime
- "\"LONGITUDE\" TEXT," + // 39: longitude
- "\"LATITUDE\" TEXT," + // 40: latitude
- "\"MARKER_MEMO1\" TEXT," + // 41: markerMemo1
- "\"MARKER_MEMO2\" TEXT," + // 42: markerMemo2
- "\"MARKER_MEMO3\" TEXT," + // 43: markerMemo3
- "\"IMAGE_PATH\" TEXT);"); // 44: imagePath
- }
-
- /** Drops the underlying database table. */
- public static void dropTable(Database db, boolean ifExists) {
- String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"LABEL_BEAN\"";
- db.execSQL(sql);
- }
-
- @Override
- protected final void bindValues(DatabaseStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- protected final void bindValues(SQLiteStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public LabelBean readEntity(Cursor cursor, int offset) {
- LabelBean entity = new LabelBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerObjType
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // markerNumber
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // objectName
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // voltageLevel
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // transformerModel
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // holeCount
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // capacity
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // wellCoverMaterial
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // coverDepth
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // transformerSpec
- cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // inlineName
- cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // size
- cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // bottomDepth
- cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // height
- cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // crossPipeLine
- cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // inlineCount
- cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lineNumber
- cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // jointCount
- cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // outlineCount
- cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // remainingChannels
- cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // cabinetType
- cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // tieCable1
- cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // tieCable2
- cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // casingMaterial
- cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // casingSpec
- cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26), // constructTime
- cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27), // inspectionUnit
- cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28), // area
- cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29), // road
- cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30), // memo1
- cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31), // memo2
- cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32), // memo3
- cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33), // markerId
- cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34), // markerType
- cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35), // owner
- cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36), // markerDepth
- cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37), // electricTagCount
- cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38), // installedTime
- cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39), // longitude
- cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40), // latitude
- cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41), // markerMemo1
- cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42), // markerMemo2
- cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43), // markerMemo3
- cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44) // imagePath
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, LabelBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setMarkerObjType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setMarkerNumber(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setObjectName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setVoltageLevel(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setTransformerModel(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setHoleCount(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setCapacity(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setWellCoverMaterial(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setCoverDepth(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- entity.setTransformerSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
- entity.setInlineName(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
- entity.setSize(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
- entity.setBottomDepth(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
- entity.setHeight(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
- entity.setCrossPipeLine(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
- entity.setInlineCount(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
- entity.setLineNumber(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
- entity.setJointCount(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
- entity.setOutlineCount(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
- entity.setRemainingChannels(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
- entity.setCabinetType(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
- entity.setTieCable1(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
- entity.setTieCable2(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
- entity.setCasingMaterial(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
- entity.setCasingSpec(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
- entity.setConstructTime(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
- entity.setInspectionUnit(cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27));
- entity.setArea(cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28));
- entity.setRoad(cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29));
- entity.setMemo1(cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30));
- entity.setMemo2(cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31));
- entity.setMemo3(cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32));
- entity.setMarkerId(cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33));
- entity.setMarkerType(cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34));
- entity.setOwner(cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35));
- entity.setMarkerDepth(cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36));
- entity.setElectricTagCount(cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37));
- entity.setInstalledTime(cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38));
- entity.setLongitude(cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39));
- entity.setLatitude(cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40));
- entity.setMarkerMemo1(cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41));
- entity.setMarkerMemo2(cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42));
- entity.setMarkerMemo3(cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43));
- entity.setImagePath(cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(LabelBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(LabelBean entity) {
- if(entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(LabelBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java
new file mode 100644
index 0000000..9f2afa5
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java
@@ -0,0 +1,479 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.MarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "MARKER_LOCAL_BEAN".
+*/
+public class MarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property PipelineType = new Property(1, String.class, "pipelineType", false, "PIPELINE_TYPE");
+ public final static Property PipelineDiameter = new Property(2, String.class, "pipelineDiameter", false, "PIPELINE_DIAMETER");
+ public final static Property PipelineMaterial = new Property(3, String.class, "pipelineMaterial", false, "PIPELINE_MATERIAL");
+ public final static Property BuryMethod = new Property(4, String.class, "buryMethod", false, "BURY_METHOD");
+ public final static Property BuryDepth = new Property(5, String.class, "buryDepth", false, "BURY_DEPTH");
+ public final static Property Area = new Property(6, String.class, "area", false, "AREA");
+ public final static Property Line = new Property(7, String.class, "line", false, "LINE");
+ public final static Property Road = new Property(8, String.class, "road", false, "ROAD");
+ public final static Property ConstructTime = new Property(9, String.class, "constructTime", false, "CONSTRUCT_TIME");
+ public final static Property Owner = new Property(10, String.class, "owner", false, "OWNER");
+ public final static Property ObjectId = new Property(11, String.class, "objectId", false, "OBJECT_ID");
+ public final static Property MarkerId = new Property(12, String.class, "markerId", false, "MARKER_ID");
+ public final static Property MarkerType = new Property(13, String.class, "markerType", false, "MARKER_TYPE");
+ public final static Property MarkerDepth = new Property(14, String.class, "markerDepth", false, "MARKER_DEPTH");
+ public final static Property InstallationDept = new Property(15, String.class, "installationDept", false, "INSTALLATION_DEPT");
+ public final static Property Lng = new Property(16, String.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(17, String.class, "lat", false, "LAT");
+ public final static Property UpdateTime = new Property(18, String.class, "updateTime", false, "UPDATE_TIME");
+ public final static Property Remark = new Property(19, String.class, "remark", false, "REMARK");
+ public final static Property UnderlyingPipelineType = new Property(20, String.class, "underlyingPipelineType", false, "UNDERLYING_PIPELINE_TYPE");
+ public final static Property UnderlyingPipelineDepth = new Property(21, String.class, "underlyingPipelineDepth", false, "UNDERLYING_PIPELINE_DEPTH");
+ public final static Property UnderlyingPipelineDiameter = new Property(22, String.class, "underlyingPipelineDiameter", false, "UNDERLYING_PIPELINE_DIAMETER");
+ public final static Property UnderlyingPipelineMaterial = new Property(23, String.class, "underlyingPipelineMaterial", false, "UNDERLYING_PIPELINE_MATERIAL");
+ public final static Property ObjectType = new Property(24, String.class, "objectType", false, "OBJECT_TYPE");
+ public final static Property Color = new Property(25, String.class, "color", false, "COLOR");
+ public final static Property ImagePath = new Property(26, String.class, "imagePath", false, "IMAGE_PATH");
+ }
+
+
+ public MarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public MarkerLocalBeanDao(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 + "\"MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
+ "\"PIPELINE_TYPE\" TEXT," + // 1: pipelineType
+ "\"PIPELINE_DIAMETER\" TEXT," + // 2: pipelineDiameter
+ "\"PIPELINE_MATERIAL\" TEXT," + // 3: pipelineMaterial
+ "\"BURY_METHOD\" TEXT," + // 4: buryMethod
+ "\"BURY_DEPTH\" TEXT," + // 5: buryDepth
+ "\"AREA\" TEXT," + // 6: area
+ "\"LINE\" TEXT," + // 7: line
+ "\"ROAD\" TEXT," + // 8: road
+ "\"CONSTRUCT_TIME\" TEXT," + // 9: constructTime
+ "\"OWNER\" TEXT," + // 10: owner
+ "\"OBJECT_ID\" TEXT," + // 11: objectId
+ "\"MARKER_ID\" TEXT," + // 12: markerId
+ "\"MARKER_TYPE\" TEXT," + // 13: markerType
+ "\"MARKER_DEPTH\" TEXT," + // 14: markerDepth
+ "\"INSTALLATION_DEPT\" TEXT," + // 15: installationDept
+ "\"LNG\" TEXT," + // 16: lng
+ "\"LAT\" TEXT," + // 17: lat
+ "\"UPDATE_TIME\" TEXT," + // 18: updateTime
+ "\"REMARK\" TEXT," + // 19: remark
+ "\"UNDERLYING_PIPELINE_TYPE\" TEXT," + // 20: underlyingPipelineType
+ "\"UNDERLYING_PIPELINE_DEPTH\" TEXT," + // 21: underlyingPipelineDepth
+ "\"UNDERLYING_PIPELINE_DIAMETER\" TEXT," + // 22: underlyingPipelineDiameter
+ "\"UNDERLYING_PIPELINE_MATERIAL\" TEXT," + // 23: underlyingPipelineMaterial
+ "\"OBJECT_TYPE\" TEXT," + // 24: objectType
+ "\"COLOR\" TEXT," + // 25: color
+ "\"IMAGE_PATH\" TEXT);"); // 26: imagePath
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, MarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String pipelineType = entity.getPipelineType();
+ if (pipelineType != null) {
+ stmt.bindString(2, pipelineType);
+ }
+
+ String pipelineDiameter = entity.getPipelineDiameter();
+ if (pipelineDiameter != null) {
+ stmt.bindString(3, pipelineDiameter);
+ }
+
+ String pipelineMaterial = entity.getPipelineMaterial();
+ if (pipelineMaterial != null) {
+ stmt.bindString(4, pipelineMaterial);
+ }
+
+ String buryMethod = entity.getBuryMethod();
+ if (buryMethod != null) {
+ stmt.bindString(5, buryMethod);
+ }
+
+ String buryDepth = entity.getBuryDepth();
+ if (buryDepth != null) {
+ stmt.bindString(6, buryDepth);
+ }
+
+ String area = entity.getArea();
+ if (area != null) {
+ stmt.bindString(7, area);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String road = entity.getRoad();
+ if (road != null) {
+ stmt.bindString(9, road);
+ }
+
+ String constructTime = entity.getConstructTime();
+ if (constructTime != null) {
+ stmt.bindString(10, constructTime);
+ }
+
+ String owner = entity.getOwner();
+ if (owner != null) {
+ stmt.bindString(11, owner);
+ }
+
+ String objectId = entity.getObjectId();
+ if (objectId != null) {
+ stmt.bindString(12, objectId);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(13, markerId);
+ }
+
+ String markerType = entity.getMarkerType();
+ if (markerType != null) {
+ stmt.bindString(14, markerType);
+ }
+
+ String markerDepth = entity.getMarkerDepth();
+ if (markerDepth != null) {
+ stmt.bindString(15, markerDepth);
+ }
+
+ String installationDept = entity.getInstallationDept();
+ if (installationDept != null) {
+ stmt.bindString(16, installationDept);
+ }
+
+ String lng = entity.getLng();
+ if (lng != null) {
+ stmt.bindString(17, lng);
+ }
+
+ String lat = entity.getLat();
+ if (lat != null) {
+ stmt.bindString(18, lat);
+ }
+
+ String updateTime = entity.getUpdateTime();
+ if (updateTime != null) {
+ stmt.bindString(19, updateTime);
+ }
+
+ String remark = entity.getRemark();
+ if (remark != null) {
+ stmt.bindString(20, remark);
+ }
+
+ String underlyingPipelineType = entity.getUnderlyingPipelineType();
+ if (underlyingPipelineType != null) {
+ stmt.bindString(21, underlyingPipelineType);
+ }
+
+ String underlyingPipelineDepth = entity.getUnderlyingPipelineDepth();
+ if (underlyingPipelineDepth != null) {
+ stmt.bindString(22, underlyingPipelineDepth);
+ }
+
+ String underlyingPipelineDiameter = entity.getUnderlyingPipelineDiameter();
+ if (underlyingPipelineDiameter != null) {
+ stmt.bindString(23, underlyingPipelineDiameter);
+ }
+
+ String underlyingPipelineMaterial = entity.getUnderlyingPipelineMaterial();
+ if (underlyingPipelineMaterial != null) {
+ stmt.bindString(24, underlyingPipelineMaterial);
+ }
+
+ String objectType = entity.getObjectType();
+ if (objectType != null) {
+ stmt.bindString(25, objectType);
+ }
+
+ String color = entity.getColor();
+ if (color != null) {
+ stmt.bindString(26, color);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(27, imagePath);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, MarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String pipelineType = entity.getPipelineType();
+ if (pipelineType != null) {
+ stmt.bindString(2, pipelineType);
+ }
+
+ String pipelineDiameter = entity.getPipelineDiameter();
+ if (pipelineDiameter != null) {
+ stmt.bindString(3, pipelineDiameter);
+ }
+
+ String pipelineMaterial = entity.getPipelineMaterial();
+ if (pipelineMaterial != null) {
+ stmt.bindString(4, pipelineMaterial);
+ }
+
+ String buryMethod = entity.getBuryMethod();
+ if (buryMethod != null) {
+ stmt.bindString(5, buryMethod);
+ }
+
+ String buryDepth = entity.getBuryDepth();
+ if (buryDepth != null) {
+ stmt.bindString(6, buryDepth);
+ }
+
+ String area = entity.getArea();
+ if (area != null) {
+ stmt.bindString(7, area);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String road = entity.getRoad();
+ if (road != null) {
+ stmt.bindString(9, road);
+ }
+
+ String constructTime = entity.getConstructTime();
+ if (constructTime != null) {
+ stmt.bindString(10, constructTime);
+ }
+
+ String owner = entity.getOwner();
+ if (owner != null) {
+ stmt.bindString(11, owner);
+ }
+
+ String objectId = entity.getObjectId();
+ if (objectId != null) {
+ stmt.bindString(12, objectId);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(13, markerId);
+ }
+
+ String markerType = entity.getMarkerType();
+ if (markerType != null) {
+ stmt.bindString(14, markerType);
+ }
+
+ String markerDepth = entity.getMarkerDepth();
+ if (markerDepth != null) {
+ stmt.bindString(15, markerDepth);
+ }
+
+ String installationDept = entity.getInstallationDept();
+ if (installationDept != null) {
+ stmt.bindString(16, installationDept);
+ }
+
+ String lng = entity.getLng();
+ if (lng != null) {
+ stmt.bindString(17, lng);
+ }
+
+ String lat = entity.getLat();
+ if (lat != null) {
+ stmt.bindString(18, lat);
+ }
+
+ String updateTime = entity.getUpdateTime();
+ if (updateTime != null) {
+ stmt.bindString(19, updateTime);
+ }
+
+ String remark = entity.getRemark();
+ if (remark != null) {
+ stmt.bindString(20, remark);
+ }
+
+ String underlyingPipelineType = entity.getUnderlyingPipelineType();
+ if (underlyingPipelineType != null) {
+ stmt.bindString(21, underlyingPipelineType);
+ }
+
+ String underlyingPipelineDepth = entity.getUnderlyingPipelineDepth();
+ if (underlyingPipelineDepth != null) {
+ stmt.bindString(22, underlyingPipelineDepth);
+ }
+
+ String underlyingPipelineDiameter = entity.getUnderlyingPipelineDiameter();
+ if (underlyingPipelineDiameter != null) {
+ stmt.bindString(23, underlyingPipelineDiameter);
+ }
+
+ String underlyingPipelineMaterial = entity.getUnderlyingPipelineMaterial();
+ if (underlyingPipelineMaterial != null) {
+ stmt.bindString(24, underlyingPipelineMaterial);
+ }
+
+ String objectType = entity.getObjectType();
+ if (objectType != null) {
+ stmt.bindString(25, objectType);
+ }
+
+ String color = entity.getColor();
+ if (color != null) {
+ stmt.bindString(26, color);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(27, imagePath);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public MarkerLocalBean readEntity(Cursor cursor, int offset) {
+ MarkerLocalBean entity = new MarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // pipelineType
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // pipelineDiameter
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // pipelineMaterial
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // buryMethod
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // buryDepth
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // area
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // road
+ cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // constructTime
+ cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // owner
+ cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // objectId
+ cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // markerId
+ cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // markerType
+ cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // markerDepth
+ cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // installationDept
+ cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // lng
+ cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lat
+ cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // updateTime
+ cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // remark
+ cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // underlyingPipelineType
+ cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // underlyingPipelineDepth
+ cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // underlyingPipelineDiameter
+ cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // underlyingPipelineMaterial
+ cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // objectType
+ cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // color
+ cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26) // imagePath
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, MarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setPipelineType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setPipelineDiameter(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setPipelineMaterial(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setBuryMethod(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setBuryDepth(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setArea(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setRoad(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ entity.setConstructTime(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
+ entity.setOwner(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
+ entity.setObjectId(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
+ entity.setMarkerId(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
+ entity.setMarkerType(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
+ entity.setMarkerDepth(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
+ entity.setInstallationDept(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
+ entity.setLng(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
+ entity.setLat(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
+ entity.setUpdateTime(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
+ entity.setRemark(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
+ entity.setUnderlyingPipelineType(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
+ entity.setUnderlyingPipelineDepth(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
+ entity.setUnderlyingPipelineDiameter(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
+ entity.setUnderlyingPipelineMaterial(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
+ entity.setObjectType(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
+ entity.setColor(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
+ entity.setImagePath(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(MarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(MarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(MarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 167cf0c..93ec3d6 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -1,21 +1,21 @@
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property MarkerObjType = new Property(1, String.class, "markerObjType", false, "MARKER_OBJ_TYPE");
- public final static Property MarkerNumber = new Property(2, String.class, "markerNumber", false, "MARKER_NUMBER");
- public final static Property ObjectName = new Property(3, String.class, "objectName", false, "OBJECT_NAME");
- public final static Property VoltageLevel = new Property(4, String.class, "voltageLevel", false, "VOLTAGE_LEVEL");
- public final static Property TransformerModel = new Property(5, String.class, "transformerModel", false, "TRANSFORMER_MODEL");
- public final static Property HoleCount = new Property(6, String.class, "holeCount", false, "HOLE_COUNT");
- public final static Property Capacity = new Property(7, String.class, "capacity", false, "CAPACITY");
- public final static Property WellCoverMaterial = new Property(8, String.class, "wellCoverMaterial", false, "WELL_COVER_MATERIAL");
- public final static Property CoverDepth = new Property(9, String.class, "coverDepth", false, "COVER_DEPTH");
- public final static Property TransformerSpec = new Property(10, String.class, "transformerSpec", false, "TRANSFORMER_SPEC");
- public final static Property InlineName = new Property(11, String.class, "inlineName", false, "INLINE_NAME");
- public final static Property Size = new Property(12, String.class, "size", false, "SIZE");
- public final static Property BottomDepth = new Property(13, String.class, "bottomDepth", false, "BOTTOM_DEPTH");
- public final static Property Height = new Property(14, String.class, "height", false, "HEIGHT");
- public final static Property CrossPipeLine = new Property(15, String.class, "crossPipeLine", false, "CROSS_PIPE_LINE");
- public final static Property InlineCount = new Property(16, String.class, "inlineCount", false, "INLINE_COUNT");
- public final static Property LineNumber = new Property(17, String.class, "lineNumber", false, "LINE_NUMBER");
- public final static Property JointCount = new Property(18, String.class, "jointCount", false, "JOINT_COUNT");
- public final static Property OutlineCount = new Property(19, String.class, "outlineCount", false, "OUTLINE_COUNT");
- public final static Property RemainingChannels = new Property(20, String.class, "remainingChannels", false, "REMAINING_CHANNELS");
- public final static Property CabinetType = new Property(21, String.class, "cabinetType", false, "CABINET_TYPE");
- public final static Property TieCable1 = new Property(22, String.class, "tieCable1", false, "TIE_CABLE1");
- public final static Property TieCable2 = new Property(23, String.class, "tieCable2", false, "TIE_CABLE2");
- public final static Property CasingMaterial = new Property(24, String.class, "casingMaterial", false, "CASING_MATERIAL");
- public final static Property CasingSpec = new Property(25, String.class, "casingSpec", false, "CASING_SPEC");
- public final static Property ConstructTime = new Property(26, String.class, "constructTime", false, "CONSTRUCT_TIME");
- public final static Property InspectionUnit = new Property(27, String.class, "inspectionUnit", false, "INSPECTION_UNIT");
- public final static Property Area = new Property(28, String.class, "area", false, "AREA");
- public final static Property Road = new Property(29, String.class, "road", false, "ROAD");
- public final static Property Memo1 = new Property(30, String.class, "memo1", false, "MEMO1");
- public final static Property Memo2 = new Property(31, String.class, "memo2", false, "MEMO2");
- public final static Property Memo3 = new Property(32, String.class, "memo3", false, "MEMO3");
- public final static Property MarkerId = new Property(33, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerType = new Property(34, String.class, "markerType", false, "MARKER_TYPE");
- public final static Property Owner = new Property(35, String.class, "owner", false, "OWNER");
- public final static Property MarkerDepth = new Property(36, String.class, "markerDepth", false, "MARKER_DEPTH");
- public final static Property ElectricTagCount = new Property(37, String.class, "electricTagCount", false, "ELECTRIC_TAG_COUNT");
- public final static Property InstalledTime = new Property(38, String.class, "installedTime", false, "INSTALLED_TIME");
- public final static Property Longitude = new Property(39, String.class, "longitude", false, "LONGITUDE");
- public final static Property Latitude = new Property(40, String.class, "latitude", false, "LATITUDE");
- public final static Property MarkerMemo1 = new Property(41, String.class, "markerMemo1", false, "MARKER_MEMO1");
- public final static Property MarkerMemo2 = new Property(42, String.class, "markerMemo2", false, "MARKER_MEMO2");
- public final static Property MarkerMemo3 = new Property(43, String.class, "markerMemo3", false, "MARKER_MEMO3");
- public final static Property ImagePath = new Property(44, String.class, "imagePath", false, "IMAGE_PATH");
- }
-
-
- public LabelBeanDao(DaoConfig config) {
- super(config);
- }
-
- public LabelBeanDao(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 + "\"LABEL_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"MARKER_OBJ_TYPE\" TEXT," + // 1: markerObjType
- "\"MARKER_NUMBER\" TEXT," + // 2: markerNumber
- "\"OBJECT_NAME\" TEXT," + // 3: objectName
- "\"VOLTAGE_LEVEL\" TEXT," + // 4: voltageLevel
- "\"TRANSFORMER_MODEL\" TEXT," + // 5: transformerModel
- "\"HOLE_COUNT\" TEXT," + // 6: holeCount
- "\"CAPACITY\" TEXT," + // 7: capacity
- "\"WELL_COVER_MATERIAL\" TEXT," + // 8: wellCoverMaterial
- "\"COVER_DEPTH\" TEXT," + // 9: coverDepth
- "\"TRANSFORMER_SPEC\" TEXT," + // 10: transformerSpec
- "\"INLINE_NAME\" TEXT," + // 11: inlineName
- "\"SIZE\" TEXT," + // 12: size
- "\"BOTTOM_DEPTH\" TEXT," + // 13: bottomDepth
- "\"HEIGHT\" TEXT," + // 14: height
- "\"CROSS_PIPE_LINE\" TEXT," + // 15: crossPipeLine
- "\"INLINE_COUNT\" TEXT," + // 16: inlineCount
- "\"LINE_NUMBER\" TEXT," + // 17: lineNumber
- "\"JOINT_COUNT\" TEXT," + // 18: jointCount
- "\"OUTLINE_COUNT\" TEXT," + // 19: outlineCount
- "\"REMAINING_CHANNELS\" TEXT," + // 20: remainingChannels
- "\"CABINET_TYPE\" TEXT," + // 21: cabinetType
- "\"TIE_CABLE1\" TEXT," + // 22: tieCable1
- "\"TIE_CABLE2\" TEXT," + // 23: tieCable2
- "\"CASING_MATERIAL\" TEXT," + // 24: casingMaterial
- "\"CASING_SPEC\" TEXT," + // 25: casingSpec
- "\"CONSTRUCT_TIME\" TEXT," + // 26: constructTime
- "\"INSPECTION_UNIT\" TEXT," + // 27: inspectionUnit
- "\"AREA\" TEXT," + // 28: area
- "\"ROAD\" TEXT," + // 29: road
- "\"MEMO1\" TEXT," + // 30: memo1
- "\"MEMO2\" TEXT," + // 31: memo2
- "\"MEMO3\" TEXT," + // 32: memo3
- "\"MARKER_ID\" TEXT," + // 33: markerId
- "\"MARKER_TYPE\" TEXT," + // 34: markerType
- "\"OWNER\" TEXT," + // 35: owner
- "\"MARKER_DEPTH\" TEXT," + // 36: markerDepth
- "\"ELECTRIC_TAG_COUNT\" TEXT," + // 37: electricTagCount
- "\"INSTALLED_TIME\" TEXT," + // 38: installedTime
- "\"LONGITUDE\" TEXT," + // 39: longitude
- "\"LATITUDE\" TEXT," + // 40: latitude
- "\"MARKER_MEMO1\" TEXT," + // 41: markerMemo1
- "\"MARKER_MEMO2\" TEXT," + // 42: markerMemo2
- "\"MARKER_MEMO3\" TEXT," + // 43: markerMemo3
- "\"IMAGE_PATH\" TEXT);"); // 44: imagePath
- }
-
- /** Drops the underlying database table. */
- public static void dropTable(Database db, boolean ifExists) {
- String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"LABEL_BEAN\"";
- db.execSQL(sql);
- }
-
- @Override
- protected final void bindValues(DatabaseStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- protected final void bindValues(SQLiteStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public LabelBean readEntity(Cursor cursor, int offset) {
- LabelBean entity = new LabelBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerObjType
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // markerNumber
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // objectName
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // voltageLevel
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // transformerModel
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // holeCount
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // capacity
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // wellCoverMaterial
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // coverDepth
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // transformerSpec
- cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // inlineName
- cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // size
- cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // bottomDepth
- cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // height
- cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // crossPipeLine
- cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // inlineCount
- cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lineNumber
- cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // jointCount
- cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // outlineCount
- cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // remainingChannels
- cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // cabinetType
- cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // tieCable1
- cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // tieCable2
- cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // casingMaterial
- cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // casingSpec
- cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26), // constructTime
- cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27), // inspectionUnit
- cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28), // area
- cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29), // road
- cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30), // memo1
- cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31), // memo2
- cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32), // memo3
- cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33), // markerId
- cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34), // markerType
- cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35), // owner
- cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36), // markerDepth
- cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37), // electricTagCount
- cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38), // installedTime
- cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39), // longitude
- cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40), // latitude
- cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41), // markerMemo1
- cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42), // markerMemo2
- cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43), // markerMemo3
- cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44) // imagePath
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, LabelBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setMarkerObjType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setMarkerNumber(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setObjectName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setVoltageLevel(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setTransformerModel(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setHoleCount(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setCapacity(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setWellCoverMaterial(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setCoverDepth(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- entity.setTransformerSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
- entity.setInlineName(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
- entity.setSize(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
- entity.setBottomDepth(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
- entity.setHeight(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
- entity.setCrossPipeLine(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
- entity.setInlineCount(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
- entity.setLineNumber(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
- entity.setJointCount(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
- entity.setOutlineCount(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
- entity.setRemainingChannels(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
- entity.setCabinetType(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
- entity.setTieCable1(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
- entity.setTieCable2(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
- entity.setCasingMaterial(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
- entity.setCasingSpec(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
- entity.setConstructTime(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
- entity.setInspectionUnit(cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27));
- entity.setArea(cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28));
- entity.setRoad(cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29));
- entity.setMemo1(cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30));
- entity.setMemo2(cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31));
- entity.setMemo3(cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32));
- entity.setMarkerId(cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33));
- entity.setMarkerType(cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34));
- entity.setOwner(cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35));
- entity.setMarkerDepth(cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36));
- entity.setElectricTagCount(cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37));
- entity.setInstalledTime(cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38));
- entity.setLongitude(cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39));
- entity.setLatitude(cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40));
- entity.setMarkerMemo1(cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41));
- entity.setMarkerMemo2(cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42));
- entity.setMarkerMemo3(cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43));
- entity.setImagePath(cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(LabelBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(LabelBean entity) {
- if(entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(LabelBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java
new file mode 100644
index 0000000..9f2afa5
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java
@@ -0,0 +1,479 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.MarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "MARKER_LOCAL_BEAN".
+*/
+public class MarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property PipelineType = new Property(1, String.class, "pipelineType", false, "PIPELINE_TYPE");
+ public final static Property PipelineDiameter = new Property(2, String.class, "pipelineDiameter", false, "PIPELINE_DIAMETER");
+ public final static Property PipelineMaterial = new Property(3, String.class, "pipelineMaterial", false, "PIPELINE_MATERIAL");
+ public final static Property BuryMethod = new Property(4, String.class, "buryMethod", false, "BURY_METHOD");
+ public final static Property BuryDepth = new Property(5, String.class, "buryDepth", false, "BURY_DEPTH");
+ public final static Property Area = new Property(6, String.class, "area", false, "AREA");
+ public final static Property Line = new Property(7, String.class, "line", false, "LINE");
+ public final static Property Road = new Property(8, String.class, "road", false, "ROAD");
+ public final static Property ConstructTime = new Property(9, String.class, "constructTime", false, "CONSTRUCT_TIME");
+ public final static Property Owner = new Property(10, String.class, "owner", false, "OWNER");
+ public final static Property ObjectId = new Property(11, String.class, "objectId", false, "OBJECT_ID");
+ public final static Property MarkerId = new Property(12, String.class, "markerId", false, "MARKER_ID");
+ public final static Property MarkerType = new Property(13, String.class, "markerType", false, "MARKER_TYPE");
+ public final static Property MarkerDepth = new Property(14, String.class, "markerDepth", false, "MARKER_DEPTH");
+ public final static Property InstallationDept = new Property(15, String.class, "installationDept", false, "INSTALLATION_DEPT");
+ public final static Property Lng = new Property(16, String.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(17, String.class, "lat", false, "LAT");
+ public final static Property UpdateTime = new Property(18, String.class, "updateTime", false, "UPDATE_TIME");
+ public final static Property Remark = new Property(19, String.class, "remark", false, "REMARK");
+ public final static Property UnderlyingPipelineType = new Property(20, String.class, "underlyingPipelineType", false, "UNDERLYING_PIPELINE_TYPE");
+ public final static Property UnderlyingPipelineDepth = new Property(21, String.class, "underlyingPipelineDepth", false, "UNDERLYING_PIPELINE_DEPTH");
+ public final static Property UnderlyingPipelineDiameter = new Property(22, String.class, "underlyingPipelineDiameter", false, "UNDERLYING_PIPELINE_DIAMETER");
+ public final static Property UnderlyingPipelineMaterial = new Property(23, String.class, "underlyingPipelineMaterial", false, "UNDERLYING_PIPELINE_MATERIAL");
+ public final static Property ObjectType = new Property(24, String.class, "objectType", false, "OBJECT_TYPE");
+ public final static Property Color = new Property(25, String.class, "color", false, "COLOR");
+ public final static Property ImagePath = new Property(26, String.class, "imagePath", false, "IMAGE_PATH");
+ }
+
+
+ public MarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public MarkerLocalBeanDao(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 + "\"MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
+ "\"PIPELINE_TYPE\" TEXT," + // 1: pipelineType
+ "\"PIPELINE_DIAMETER\" TEXT," + // 2: pipelineDiameter
+ "\"PIPELINE_MATERIAL\" TEXT," + // 3: pipelineMaterial
+ "\"BURY_METHOD\" TEXT," + // 4: buryMethod
+ "\"BURY_DEPTH\" TEXT," + // 5: buryDepth
+ "\"AREA\" TEXT," + // 6: area
+ "\"LINE\" TEXT," + // 7: line
+ "\"ROAD\" TEXT," + // 8: road
+ "\"CONSTRUCT_TIME\" TEXT," + // 9: constructTime
+ "\"OWNER\" TEXT," + // 10: owner
+ "\"OBJECT_ID\" TEXT," + // 11: objectId
+ "\"MARKER_ID\" TEXT," + // 12: markerId
+ "\"MARKER_TYPE\" TEXT," + // 13: markerType
+ "\"MARKER_DEPTH\" TEXT," + // 14: markerDepth
+ "\"INSTALLATION_DEPT\" TEXT," + // 15: installationDept
+ "\"LNG\" TEXT," + // 16: lng
+ "\"LAT\" TEXT," + // 17: lat
+ "\"UPDATE_TIME\" TEXT," + // 18: updateTime
+ "\"REMARK\" TEXT," + // 19: remark
+ "\"UNDERLYING_PIPELINE_TYPE\" TEXT," + // 20: underlyingPipelineType
+ "\"UNDERLYING_PIPELINE_DEPTH\" TEXT," + // 21: underlyingPipelineDepth
+ "\"UNDERLYING_PIPELINE_DIAMETER\" TEXT," + // 22: underlyingPipelineDiameter
+ "\"UNDERLYING_PIPELINE_MATERIAL\" TEXT," + // 23: underlyingPipelineMaterial
+ "\"OBJECT_TYPE\" TEXT," + // 24: objectType
+ "\"COLOR\" TEXT," + // 25: color
+ "\"IMAGE_PATH\" TEXT);"); // 26: imagePath
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, MarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String pipelineType = entity.getPipelineType();
+ if (pipelineType != null) {
+ stmt.bindString(2, pipelineType);
+ }
+
+ String pipelineDiameter = entity.getPipelineDiameter();
+ if (pipelineDiameter != null) {
+ stmt.bindString(3, pipelineDiameter);
+ }
+
+ String pipelineMaterial = entity.getPipelineMaterial();
+ if (pipelineMaterial != null) {
+ stmt.bindString(4, pipelineMaterial);
+ }
+
+ String buryMethod = entity.getBuryMethod();
+ if (buryMethod != null) {
+ stmt.bindString(5, buryMethod);
+ }
+
+ String buryDepth = entity.getBuryDepth();
+ if (buryDepth != null) {
+ stmt.bindString(6, buryDepth);
+ }
+
+ String area = entity.getArea();
+ if (area != null) {
+ stmt.bindString(7, area);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String road = entity.getRoad();
+ if (road != null) {
+ stmt.bindString(9, road);
+ }
+
+ String constructTime = entity.getConstructTime();
+ if (constructTime != null) {
+ stmt.bindString(10, constructTime);
+ }
+
+ String owner = entity.getOwner();
+ if (owner != null) {
+ stmt.bindString(11, owner);
+ }
+
+ String objectId = entity.getObjectId();
+ if (objectId != null) {
+ stmt.bindString(12, objectId);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(13, markerId);
+ }
+
+ String markerType = entity.getMarkerType();
+ if (markerType != null) {
+ stmt.bindString(14, markerType);
+ }
+
+ String markerDepth = entity.getMarkerDepth();
+ if (markerDepth != null) {
+ stmt.bindString(15, markerDepth);
+ }
+
+ String installationDept = entity.getInstallationDept();
+ if (installationDept != null) {
+ stmt.bindString(16, installationDept);
+ }
+
+ String lng = entity.getLng();
+ if (lng != null) {
+ stmt.bindString(17, lng);
+ }
+
+ String lat = entity.getLat();
+ if (lat != null) {
+ stmt.bindString(18, lat);
+ }
+
+ String updateTime = entity.getUpdateTime();
+ if (updateTime != null) {
+ stmt.bindString(19, updateTime);
+ }
+
+ String remark = entity.getRemark();
+ if (remark != null) {
+ stmt.bindString(20, remark);
+ }
+
+ String underlyingPipelineType = entity.getUnderlyingPipelineType();
+ if (underlyingPipelineType != null) {
+ stmt.bindString(21, underlyingPipelineType);
+ }
+
+ String underlyingPipelineDepth = entity.getUnderlyingPipelineDepth();
+ if (underlyingPipelineDepth != null) {
+ stmt.bindString(22, underlyingPipelineDepth);
+ }
+
+ String underlyingPipelineDiameter = entity.getUnderlyingPipelineDiameter();
+ if (underlyingPipelineDiameter != null) {
+ stmt.bindString(23, underlyingPipelineDiameter);
+ }
+
+ String underlyingPipelineMaterial = entity.getUnderlyingPipelineMaterial();
+ if (underlyingPipelineMaterial != null) {
+ stmt.bindString(24, underlyingPipelineMaterial);
+ }
+
+ String objectType = entity.getObjectType();
+ if (objectType != null) {
+ stmt.bindString(25, objectType);
+ }
+
+ String color = entity.getColor();
+ if (color != null) {
+ stmt.bindString(26, color);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(27, imagePath);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, MarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String pipelineType = entity.getPipelineType();
+ if (pipelineType != null) {
+ stmt.bindString(2, pipelineType);
+ }
+
+ String pipelineDiameter = entity.getPipelineDiameter();
+ if (pipelineDiameter != null) {
+ stmt.bindString(3, pipelineDiameter);
+ }
+
+ String pipelineMaterial = entity.getPipelineMaterial();
+ if (pipelineMaterial != null) {
+ stmt.bindString(4, pipelineMaterial);
+ }
+
+ String buryMethod = entity.getBuryMethod();
+ if (buryMethod != null) {
+ stmt.bindString(5, buryMethod);
+ }
+
+ String buryDepth = entity.getBuryDepth();
+ if (buryDepth != null) {
+ stmt.bindString(6, buryDepth);
+ }
+
+ String area = entity.getArea();
+ if (area != null) {
+ stmt.bindString(7, area);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String road = entity.getRoad();
+ if (road != null) {
+ stmt.bindString(9, road);
+ }
+
+ String constructTime = entity.getConstructTime();
+ if (constructTime != null) {
+ stmt.bindString(10, constructTime);
+ }
+
+ String owner = entity.getOwner();
+ if (owner != null) {
+ stmt.bindString(11, owner);
+ }
+
+ String objectId = entity.getObjectId();
+ if (objectId != null) {
+ stmt.bindString(12, objectId);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(13, markerId);
+ }
+
+ String markerType = entity.getMarkerType();
+ if (markerType != null) {
+ stmt.bindString(14, markerType);
+ }
+
+ String markerDepth = entity.getMarkerDepth();
+ if (markerDepth != null) {
+ stmt.bindString(15, markerDepth);
+ }
+
+ String installationDept = entity.getInstallationDept();
+ if (installationDept != null) {
+ stmt.bindString(16, installationDept);
+ }
+
+ String lng = entity.getLng();
+ if (lng != null) {
+ stmt.bindString(17, lng);
+ }
+
+ String lat = entity.getLat();
+ if (lat != null) {
+ stmt.bindString(18, lat);
+ }
+
+ String updateTime = entity.getUpdateTime();
+ if (updateTime != null) {
+ stmt.bindString(19, updateTime);
+ }
+
+ String remark = entity.getRemark();
+ if (remark != null) {
+ stmt.bindString(20, remark);
+ }
+
+ String underlyingPipelineType = entity.getUnderlyingPipelineType();
+ if (underlyingPipelineType != null) {
+ stmt.bindString(21, underlyingPipelineType);
+ }
+
+ String underlyingPipelineDepth = entity.getUnderlyingPipelineDepth();
+ if (underlyingPipelineDepth != null) {
+ stmt.bindString(22, underlyingPipelineDepth);
+ }
+
+ String underlyingPipelineDiameter = entity.getUnderlyingPipelineDiameter();
+ if (underlyingPipelineDiameter != null) {
+ stmt.bindString(23, underlyingPipelineDiameter);
+ }
+
+ String underlyingPipelineMaterial = entity.getUnderlyingPipelineMaterial();
+ if (underlyingPipelineMaterial != null) {
+ stmt.bindString(24, underlyingPipelineMaterial);
+ }
+
+ String objectType = entity.getObjectType();
+ if (objectType != null) {
+ stmt.bindString(25, objectType);
+ }
+
+ String color = entity.getColor();
+ if (color != null) {
+ stmt.bindString(26, color);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(27, imagePath);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public MarkerLocalBean readEntity(Cursor cursor, int offset) {
+ MarkerLocalBean entity = new MarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // pipelineType
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // pipelineDiameter
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // pipelineMaterial
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // buryMethod
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // buryDepth
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // area
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // road
+ cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // constructTime
+ cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // owner
+ cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // objectId
+ cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // markerId
+ cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // markerType
+ cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // markerDepth
+ cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // installationDept
+ cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // lng
+ cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lat
+ cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // updateTime
+ cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // remark
+ cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // underlyingPipelineType
+ cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // underlyingPipelineDepth
+ cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // underlyingPipelineDiameter
+ cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // underlyingPipelineMaterial
+ cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // objectType
+ cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // color
+ cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26) // imagePath
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, MarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setPipelineType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setPipelineDiameter(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setPipelineMaterial(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setBuryMethod(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setBuryDepth(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setArea(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setRoad(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ entity.setConstructTime(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
+ entity.setOwner(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
+ entity.setObjectId(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
+ entity.setMarkerId(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
+ entity.setMarkerType(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
+ entity.setMarkerDepth(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
+ entity.setInstallationDept(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
+ entity.setLng(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
+ entity.setLat(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
+ entity.setUpdateTime(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
+ entity.setRemark(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
+ entity.setUnderlyingPipelineType(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
+ entity.setUnderlyingPipelineDepth(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
+ entity.setUnderlyingPipelineDiameter(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
+ entity.setUnderlyingPipelineMaterial(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
+ entity.setObjectType(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
+ entity.setColor(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
+ entity.setImagePath(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(MarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(MarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(MarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
index 18b1b7b..9d99b8d 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
@@ -3,7 +3,7 @@
import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;
-import com.casic.electric.detector.bean.SmallLabelBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.Property;
@@ -12,10 +12,11 @@
import org.greenrobot.greendao.internal.DaoConfig;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-/**
+
+/**
* DAO for table "SMALL_LABEL_BEAN".
-*/
-public class SmallLabelBeanDao extends AbstractDao
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property MarkerObjType = new Property(1, String.class, "markerObjType", false, "MARKER_OBJ_TYPE");
- public final static Property MarkerNumber = new Property(2, String.class, "markerNumber", false, "MARKER_NUMBER");
- public final static Property ObjectName = new Property(3, String.class, "objectName", false, "OBJECT_NAME");
- public final static Property VoltageLevel = new Property(4, String.class, "voltageLevel", false, "VOLTAGE_LEVEL");
- public final static Property TransformerModel = new Property(5, String.class, "transformerModel", false, "TRANSFORMER_MODEL");
- public final static Property HoleCount = new Property(6, String.class, "holeCount", false, "HOLE_COUNT");
- public final static Property Capacity = new Property(7, String.class, "capacity", false, "CAPACITY");
- public final static Property WellCoverMaterial = new Property(8, String.class, "wellCoverMaterial", false, "WELL_COVER_MATERIAL");
- public final static Property CoverDepth = new Property(9, String.class, "coverDepth", false, "COVER_DEPTH");
- public final static Property TransformerSpec = new Property(10, String.class, "transformerSpec", false, "TRANSFORMER_SPEC");
- public final static Property InlineName = new Property(11, String.class, "inlineName", false, "INLINE_NAME");
- public final static Property Size = new Property(12, String.class, "size", false, "SIZE");
- public final static Property BottomDepth = new Property(13, String.class, "bottomDepth", false, "BOTTOM_DEPTH");
- public final static Property Height = new Property(14, String.class, "height", false, "HEIGHT");
- public final static Property CrossPipeLine = new Property(15, String.class, "crossPipeLine", false, "CROSS_PIPE_LINE");
- public final static Property InlineCount = new Property(16, String.class, "inlineCount", false, "INLINE_COUNT");
- public final static Property LineNumber = new Property(17, String.class, "lineNumber", false, "LINE_NUMBER");
- public final static Property JointCount = new Property(18, String.class, "jointCount", false, "JOINT_COUNT");
- public final static Property OutlineCount = new Property(19, String.class, "outlineCount", false, "OUTLINE_COUNT");
- public final static Property RemainingChannels = new Property(20, String.class, "remainingChannels", false, "REMAINING_CHANNELS");
- public final static Property CabinetType = new Property(21, String.class, "cabinetType", false, "CABINET_TYPE");
- public final static Property TieCable1 = new Property(22, String.class, "tieCable1", false, "TIE_CABLE1");
- public final static Property TieCable2 = new Property(23, String.class, "tieCable2", false, "TIE_CABLE2");
- public final static Property CasingMaterial = new Property(24, String.class, "casingMaterial", false, "CASING_MATERIAL");
- public final static Property CasingSpec = new Property(25, String.class, "casingSpec", false, "CASING_SPEC");
- public final static Property ConstructTime = new Property(26, String.class, "constructTime", false, "CONSTRUCT_TIME");
- public final static Property InspectionUnit = new Property(27, String.class, "inspectionUnit", false, "INSPECTION_UNIT");
- public final static Property Area = new Property(28, String.class, "area", false, "AREA");
- public final static Property Road = new Property(29, String.class, "road", false, "ROAD");
- public final static Property Memo1 = new Property(30, String.class, "memo1", false, "MEMO1");
- public final static Property Memo2 = new Property(31, String.class, "memo2", false, "MEMO2");
- public final static Property Memo3 = new Property(32, String.class, "memo3", false, "MEMO3");
- public final static Property MarkerId = new Property(33, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerType = new Property(34, String.class, "markerType", false, "MARKER_TYPE");
- public final static Property Owner = new Property(35, String.class, "owner", false, "OWNER");
- public final static Property MarkerDepth = new Property(36, String.class, "markerDepth", false, "MARKER_DEPTH");
- public final static Property ElectricTagCount = new Property(37, String.class, "electricTagCount", false, "ELECTRIC_TAG_COUNT");
- public final static Property InstalledTime = new Property(38, String.class, "installedTime", false, "INSTALLED_TIME");
- public final static Property Longitude = new Property(39, String.class, "longitude", false, "LONGITUDE");
- public final static Property Latitude = new Property(40, String.class, "latitude", false, "LATITUDE");
- public final static Property MarkerMemo1 = new Property(41, String.class, "markerMemo1", false, "MARKER_MEMO1");
- public final static Property MarkerMemo2 = new Property(42, String.class, "markerMemo2", false, "MARKER_MEMO2");
- public final static Property MarkerMemo3 = new Property(43, String.class, "markerMemo3", false, "MARKER_MEMO3");
- public final static Property ImagePath = new Property(44, String.class, "imagePath", false, "IMAGE_PATH");
- }
-
-
- public LabelBeanDao(DaoConfig config) {
- super(config);
- }
-
- public LabelBeanDao(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 + "\"LABEL_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"MARKER_OBJ_TYPE\" TEXT," + // 1: markerObjType
- "\"MARKER_NUMBER\" TEXT," + // 2: markerNumber
- "\"OBJECT_NAME\" TEXT," + // 3: objectName
- "\"VOLTAGE_LEVEL\" TEXT," + // 4: voltageLevel
- "\"TRANSFORMER_MODEL\" TEXT," + // 5: transformerModel
- "\"HOLE_COUNT\" TEXT," + // 6: holeCount
- "\"CAPACITY\" TEXT," + // 7: capacity
- "\"WELL_COVER_MATERIAL\" TEXT," + // 8: wellCoverMaterial
- "\"COVER_DEPTH\" TEXT," + // 9: coverDepth
- "\"TRANSFORMER_SPEC\" TEXT," + // 10: transformerSpec
- "\"INLINE_NAME\" TEXT," + // 11: inlineName
- "\"SIZE\" TEXT," + // 12: size
- "\"BOTTOM_DEPTH\" TEXT," + // 13: bottomDepth
- "\"HEIGHT\" TEXT," + // 14: height
- "\"CROSS_PIPE_LINE\" TEXT," + // 15: crossPipeLine
- "\"INLINE_COUNT\" TEXT," + // 16: inlineCount
- "\"LINE_NUMBER\" TEXT," + // 17: lineNumber
- "\"JOINT_COUNT\" TEXT," + // 18: jointCount
- "\"OUTLINE_COUNT\" TEXT," + // 19: outlineCount
- "\"REMAINING_CHANNELS\" TEXT," + // 20: remainingChannels
- "\"CABINET_TYPE\" TEXT," + // 21: cabinetType
- "\"TIE_CABLE1\" TEXT," + // 22: tieCable1
- "\"TIE_CABLE2\" TEXT," + // 23: tieCable2
- "\"CASING_MATERIAL\" TEXT," + // 24: casingMaterial
- "\"CASING_SPEC\" TEXT," + // 25: casingSpec
- "\"CONSTRUCT_TIME\" TEXT," + // 26: constructTime
- "\"INSPECTION_UNIT\" TEXT," + // 27: inspectionUnit
- "\"AREA\" TEXT," + // 28: area
- "\"ROAD\" TEXT," + // 29: road
- "\"MEMO1\" TEXT," + // 30: memo1
- "\"MEMO2\" TEXT," + // 31: memo2
- "\"MEMO3\" TEXT," + // 32: memo3
- "\"MARKER_ID\" TEXT," + // 33: markerId
- "\"MARKER_TYPE\" TEXT," + // 34: markerType
- "\"OWNER\" TEXT," + // 35: owner
- "\"MARKER_DEPTH\" TEXT," + // 36: markerDepth
- "\"ELECTRIC_TAG_COUNT\" TEXT," + // 37: electricTagCount
- "\"INSTALLED_TIME\" TEXT," + // 38: installedTime
- "\"LONGITUDE\" TEXT," + // 39: longitude
- "\"LATITUDE\" TEXT," + // 40: latitude
- "\"MARKER_MEMO1\" TEXT," + // 41: markerMemo1
- "\"MARKER_MEMO2\" TEXT," + // 42: markerMemo2
- "\"MARKER_MEMO3\" TEXT," + // 43: markerMemo3
- "\"IMAGE_PATH\" TEXT);"); // 44: imagePath
- }
-
- /** Drops the underlying database table. */
- public static void dropTable(Database db, boolean ifExists) {
- String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"LABEL_BEAN\"";
- db.execSQL(sql);
- }
-
- @Override
- protected final void bindValues(DatabaseStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- protected final void bindValues(SQLiteStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public LabelBean readEntity(Cursor cursor, int offset) {
- LabelBean entity = new LabelBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerObjType
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // markerNumber
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // objectName
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // voltageLevel
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // transformerModel
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // holeCount
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // capacity
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // wellCoverMaterial
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // coverDepth
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // transformerSpec
- cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // inlineName
- cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // size
- cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // bottomDepth
- cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // height
- cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // crossPipeLine
- cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // inlineCount
- cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lineNumber
- cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // jointCount
- cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // outlineCount
- cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // remainingChannels
- cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // cabinetType
- cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // tieCable1
- cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // tieCable2
- cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // casingMaterial
- cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // casingSpec
- cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26), // constructTime
- cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27), // inspectionUnit
- cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28), // area
- cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29), // road
- cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30), // memo1
- cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31), // memo2
- cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32), // memo3
- cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33), // markerId
- cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34), // markerType
- cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35), // owner
- cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36), // markerDepth
- cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37), // electricTagCount
- cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38), // installedTime
- cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39), // longitude
- cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40), // latitude
- cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41), // markerMemo1
- cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42), // markerMemo2
- cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43), // markerMemo3
- cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44) // imagePath
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, LabelBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setMarkerObjType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setMarkerNumber(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setObjectName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setVoltageLevel(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setTransformerModel(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setHoleCount(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setCapacity(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setWellCoverMaterial(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setCoverDepth(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- entity.setTransformerSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
- entity.setInlineName(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
- entity.setSize(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
- entity.setBottomDepth(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
- entity.setHeight(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
- entity.setCrossPipeLine(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
- entity.setInlineCount(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
- entity.setLineNumber(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
- entity.setJointCount(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
- entity.setOutlineCount(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
- entity.setRemainingChannels(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
- entity.setCabinetType(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
- entity.setTieCable1(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
- entity.setTieCable2(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
- entity.setCasingMaterial(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
- entity.setCasingSpec(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
- entity.setConstructTime(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
- entity.setInspectionUnit(cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27));
- entity.setArea(cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28));
- entity.setRoad(cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29));
- entity.setMemo1(cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30));
- entity.setMemo2(cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31));
- entity.setMemo3(cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32));
- entity.setMarkerId(cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33));
- entity.setMarkerType(cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34));
- entity.setOwner(cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35));
- entity.setMarkerDepth(cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36));
- entity.setElectricTagCount(cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37));
- entity.setInstalledTime(cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38));
- entity.setLongitude(cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39));
- entity.setLatitude(cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40));
- entity.setMarkerMemo1(cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41));
- entity.setMarkerMemo2(cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42));
- entity.setMarkerMemo3(cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43));
- entity.setImagePath(cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(LabelBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(LabelBean entity) {
- if(entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(LabelBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java
new file mode 100644
index 0000000..9f2afa5
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java
@@ -0,0 +1,479 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.MarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "MARKER_LOCAL_BEAN".
+*/
+public class MarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property PipelineType = new Property(1, String.class, "pipelineType", false, "PIPELINE_TYPE");
+ public final static Property PipelineDiameter = new Property(2, String.class, "pipelineDiameter", false, "PIPELINE_DIAMETER");
+ public final static Property PipelineMaterial = new Property(3, String.class, "pipelineMaterial", false, "PIPELINE_MATERIAL");
+ public final static Property BuryMethod = new Property(4, String.class, "buryMethod", false, "BURY_METHOD");
+ public final static Property BuryDepth = new Property(5, String.class, "buryDepth", false, "BURY_DEPTH");
+ public final static Property Area = new Property(6, String.class, "area", false, "AREA");
+ public final static Property Line = new Property(7, String.class, "line", false, "LINE");
+ public final static Property Road = new Property(8, String.class, "road", false, "ROAD");
+ public final static Property ConstructTime = new Property(9, String.class, "constructTime", false, "CONSTRUCT_TIME");
+ public final static Property Owner = new Property(10, String.class, "owner", false, "OWNER");
+ public final static Property ObjectId = new Property(11, String.class, "objectId", false, "OBJECT_ID");
+ public final static Property MarkerId = new Property(12, String.class, "markerId", false, "MARKER_ID");
+ public final static Property MarkerType = new Property(13, String.class, "markerType", false, "MARKER_TYPE");
+ public final static Property MarkerDepth = new Property(14, String.class, "markerDepth", false, "MARKER_DEPTH");
+ public final static Property InstallationDept = new Property(15, String.class, "installationDept", false, "INSTALLATION_DEPT");
+ public final static Property Lng = new Property(16, String.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(17, String.class, "lat", false, "LAT");
+ public final static Property UpdateTime = new Property(18, String.class, "updateTime", false, "UPDATE_TIME");
+ public final static Property Remark = new Property(19, String.class, "remark", false, "REMARK");
+ public final static Property UnderlyingPipelineType = new Property(20, String.class, "underlyingPipelineType", false, "UNDERLYING_PIPELINE_TYPE");
+ public final static Property UnderlyingPipelineDepth = new Property(21, String.class, "underlyingPipelineDepth", false, "UNDERLYING_PIPELINE_DEPTH");
+ public final static Property UnderlyingPipelineDiameter = new Property(22, String.class, "underlyingPipelineDiameter", false, "UNDERLYING_PIPELINE_DIAMETER");
+ public final static Property UnderlyingPipelineMaterial = new Property(23, String.class, "underlyingPipelineMaterial", false, "UNDERLYING_PIPELINE_MATERIAL");
+ public final static Property ObjectType = new Property(24, String.class, "objectType", false, "OBJECT_TYPE");
+ public final static Property Color = new Property(25, String.class, "color", false, "COLOR");
+ public final static Property ImagePath = new Property(26, String.class, "imagePath", false, "IMAGE_PATH");
+ }
+
+
+ public MarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public MarkerLocalBeanDao(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 + "\"MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
+ "\"PIPELINE_TYPE\" TEXT," + // 1: pipelineType
+ "\"PIPELINE_DIAMETER\" TEXT," + // 2: pipelineDiameter
+ "\"PIPELINE_MATERIAL\" TEXT," + // 3: pipelineMaterial
+ "\"BURY_METHOD\" TEXT," + // 4: buryMethod
+ "\"BURY_DEPTH\" TEXT," + // 5: buryDepth
+ "\"AREA\" TEXT," + // 6: area
+ "\"LINE\" TEXT," + // 7: line
+ "\"ROAD\" TEXT," + // 8: road
+ "\"CONSTRUCT_TIME\" TEXT," + // 9: constructTime
+ "\"OWNER\" TEXT," + // 10: owner
+ "\"OBJECT_ID\" TEXT," + // 11: objectId
+ "\"MARKER_ID\" TEXT," + // 12: markerId
+ "\"MARKER_TYPE\" TEXT," + // 13: markerType
+ "\"MARKER_DEPTH\" TEXT," + // 14: markerDepth
+ "\"INSTALLATION_DEPT\" TEXT," + // 15: installationDept
+ "\"LNG\" TEXT," + // 16: lng
+ "\"LAT\" TEXT," + // 17: lat
+ "\"UPDATE_TIME\" TEXT," + // 18: updateTime
+ "\"REMARK\" TEXT," + // 19: remark
+ "\"UNDERLYING_PIPELINE_TYPE\" TEXT," + // 20: underlyingPipelineType
+ "\"UNDERLYING_PIPELINE_DEPTH\" TEXT," + // 21: underlyingPipelineDepth
+ "\"UNDERLYING_PIPELINE_DIAMETER\" TEXT," + // 22: underlyingPipelineDiameter
+ "\"UNDERLYING_PIPELINE_MATERIAL\" TEXT," + // 23: underlyingPipelineMaterial
+ "\"OBJECT_TYPE\" TEXT," + // 24: objectType
+ "\"COLOR\" TEXT," + // 25: color
+ "\"IMAGE_PATH\" TEXT);"); // 26: imagePath
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, MarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String pipelineType = entity.getPipelineType();
+ if (pipelineType != null) {
+ stmt.bindString(2, pipelineType);
+ }
+
+ String pipelineDiameter = entity.getPipelineDiameter();
+ if (pipelineDiameter != null) {
+ stmt.bindString(3, pipelineDiameter);
+ }
+
+ String pipelineMaterial = entity.getPipelineMaterial();
+ if (pipelineMaterial != null) {
+ stmt.bindString(4, pipelineMaterial);
+ }
+
+ String buryMethod = entity.getBuryMethod();
+ if (buryMethod != null) {
+ stmt.bindString(5, buryMethod);
+ }
+
+ String buryDepth = entity.getBuryDepth();
+ if (buryDepth != null) {
+ stmt.bindString(6, buryDepth);
+ }
+
+ String area = entity.getArea();
+ if (area != null) {
+ stmt.bindString(7, area);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String road = entity.getRoad();
+ if (road != null) {
+ stmt.bindString(9, road);
+ }
+
+ String constructTime = entity.getConstructTime();
+ if (constructTime != null) {
+ stmt.bindString(10, constructTime);
+ }
+
+ String owner = entity.getOwner();
+ if (owner != null) {
+ stmt.bindString(11, owner);
+ }
+
+ String objectId = entity.getObjectId();
+ if (objectId != null) {
+ stmt.bindString(12, objectId);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(13, markerId);
+ }
+
+ String markerType = entity.getMarkerType();
+ if (markerType != null) {
+ stmt.bindString(14, markerType);
+ }
+
+ String markerDepth = entity.getMarkerDepth();
+ if (markerDepth != null) {
+ stmt.bindString(15, markerDepth);
+ }
+
+ String installationDept = entity.getInstallationDept();
+ if (installationDept != null) {
+ stmt.bindString(16, installationDept);
+ }
+
+ String lng = entity.getLng();
+ if (lng != null) {
+ stmt.bindString(17, lng);
+ }
+
+ String lat = entity.getLat();
+ if (lat != null) {
+ stmt.bindString(18, lat);
+ }
+
+ String updateTime = entity.getUpdateTime();
+ if (updateTime != null) {
+ stmt.bindString(19, updateTime);
+ }
+
+ String remark = entity.getRemark();
+ if (remark != null) {
+ stmt.bindString(20, remark);
+ }
+
+ String underlyingPipelineType = entity.getUnderlyingPipelineType();
+ if (underlyingPipelineType != null) {
+ stmt.bindString(21, underlyingPipelineType);
+ }
+
+ String underlyingPipelineDepth = entity.getUnderlyingPipelineDepth();
+ if (underlyingPipelineDepth != null) {
+ stmt.bindString(22, underlyingPipelineDepth);
+ }
+
+ String underlyingPipelineDiameter = entity.getUnderlyingPipelineDiameter();
+ if (underlyingPipelineDiameter != null) {
+ stmt.bindString(23, underlyingPipelineDiameter);
+ }
+
+ String underlyingPipelineMaterial = entity.getUnderlyingPipelineMaterial();
+ if (underlyingPipelineMaterial != null) {
+ stmt.bindString(24, underlyingPipelineMaterial);
+ }
+
+ String objectType = entity.getObjectType();
+ if (objectType != null) {
+ stmt.bindString(25, objectType);
+ }
+
+ String color = entity.getColor();
+ if (color != null) {
+ stmt.bindString(26, color);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(27, imagePath);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, MarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String pipelineType = entity.getPipelineType();
+ if (pipelineType != null) {
+ stmt.bindString(2, pipelineType);
+ }
+
+ String pipelineDiameter = entity.getPipelineDiameter();
+ if (pipelineDiameter != null) {
+ stmt.bindString(3, pipelineDiameter);
+ }
+
+ String pipelineMaterial = entity.getPipelineMaterial();
+ if (pipelineMaterial != null) {
+ stmt.bindString(4, pipelineMaterial);
+ }
+
+ String buryMethod = entity.getBuryMethod();
+ if (buryMethod != null) {
+ stmt.bindString(5, buryMethod);
+ }
+
+ String buryDepth = entity.getBuryDepth();
+ if (buryDepth != null) {
+ stmt.bindString(6, buryDepth);
+ }
+
+ String area = entity.getArea();
+ if (area != null) {
+ stmt.bindString(7, area);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String road = entity.getRoad();
+ if (road != null) {
+ stmt.bindString(9, road);
+ }
+
+ String constructTime = entity.getConstructTime();
+ if (constructTime != null) {
+ stmt.bindString(10, constructTime);
+ }
+
+ String owner = entity.getOwner();
+ if (owner != null) {
+ stmt.bindString(11, owner);
+ }
+
+ String objectId = entity.getObjectId();
+ if (objectId != null) {
+ stmt.bindString(12, objectId);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(13, markerId);
+ }
+
+ String markerType = entity.getMarkerType();
+ if (markerType != null) {
+ stmt.bindString(14, markerType);
+ }
+
+ String markerDepth = entity.getMarkerDepth();
+ if (markerDepth != null) {
+ stmt.bindString(15, markerDepth);
+ }
+
+ String installationDept = entity.getInstallationDept();
+ if (installationDept != null) {
+ stmt.bindString(16, installationDept);
+ }
+
+ String lng = entity.getLng();
+ if (lng != null) {
+ stmt.bindString(17, lng);
+ }
+
+ String lat = entity.getLat();
+ if (lat != null) {
+ stmt.bindString(18, lat);
+ }
+
+ String updateTime = entity.getUpdateTime();
+ if (updateTime != null) {
+ stmt.bindString(19, updateTime);
+ }
+
+ String remark = entity.getRemark();
+ if (remark != null) {
+ stmt.bindString(20, remark);
+ }
+
+ String underlyingPipelineType = entity.getUnderlyingPipelineType();
+ if (underlyingPipelineType != null) {
+ stmt.bindString(21, underlyingPipelineType);
+ }
+
+ String underlyingPipelineDepth = entity.getUnderlyingPipelineDepth();
+ if (underlyingPipelineDepth != null) {
+ stmt.bindString(22, underlyingPipelineDepth);
+ }
+
+ String underlyingPipelineDiameter = entity.getUnderlyingPipelineDiameter();
+ if (underlyingPipelineDiameter != null) {
+ stmt.bindString(23, underlyingPipelineDiameter);
+ }
+
+ String underlyingPipelineMaterial = entity.getUnderlyingPipelineMaterial();
+ if (underlyingPipelineMaterial != null) {
+ stmt.bindString(24, underlyingPipelineMaterial);
+ }
+
+ String objectType = entity.getObjectType();
+ if (objectType != null) {
+ stmt.bindString(25, objectType);
+ }
+
+ String color = entity.getColor();
+ if (color != null) {
+ stmt.bindString(26, color);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(27, imagePath);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public MarkerLocalBean readEntity(Cursor cursor, int offset) {
+ MarkerLocalBean entity = new MarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // pipelineType
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // pipelineDiameter
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // pipelineMaterial
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // buryMethod
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // buryDepth
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // area
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // road
+ cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // constructTime
+ cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // owner
+ cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // objectId
+ cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // markerId
+ cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // markerType
+ cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // markerDepth
+ cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // installationDept
+ cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // lng
+ cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lat
+ cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // updateTime
+ cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // remark
+ cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // underlyingPipelineType
+ cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // underlyingPipelineDepth
+ cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // underlyingPipelineDiameter
+ cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // underlyingPipelineMaterial
+ cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // objectType
+ cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // color
+ cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26) // imagePath
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, MarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setPipelineType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setPipelineDiameter(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setPipelineMaterial(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setBuryMethod(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setBuryDepth(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setArea(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setRoad(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ entity.setConstructTime(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
+ entity.setOwner(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
+ entity.setObjectId(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
+ entity.setMarkerId(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
+ entity.setMarkerType(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
+ entity.setMarkerDepth(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
+ entity.setInstallationDept(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
+ entity.setLng(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
+ entity.setLat(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
+ entity.setUpdateTime(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
+ entity.setRemark(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
+ entity.setUnderlyingPipelineType(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
+ entity.setUnderlyingPipelineDepth(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
+ entity.setUnderlyingPipelineDiameter(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
+ entity.setUnderlyingPipelineMaterial(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
+ entity.setObjectType(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
+ entity.setColor(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
+ entity.setImagePath(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(MarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(MarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(MarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
index 18b1b7b..9d99b8d 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
@@ -3,7 +3,7 @@
import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;
-import com.casic.electric.detector.bean.SmallLabelBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.Property;
@@ -12,10 +12,11 @@
import org.greenrobot.greendao.internal.DaoConfig;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-/**
+
+/**
* DAO for table "SMALL_LABEL_BEAN".
-*/
-public class SmallLabelBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property MarkerId = new Property(1, String.class, "markerId", false, "MARKER_ID");
+ public final static Property LocationNumber = new Property(2, String.class, "locationNumber", false, "LOCATION_NUMBER");
+ public final static Property LocationName = new Property(3, String.class, "locationName", false, "LOCATION_NAME");
+ public final static Property ElectricMarkerId = new Property(4, String.class, "electricMarkerId", false, "ELECTRIC_MARKER_ID");
+ public final static Property CableName = new Property(5, String.class, "cableName", false, "CABLE_NAME");
+ public final static Property CableNumber = new Property(6, String.class, "cableNumber", false, "CABLE_NUMBER");
+ public final static Property Line = new Property(7, String.class, "line", false, "LINE");
+ public final static Property VoltageLevel = new Property(8, String.class, "voltageLevel", false, "VOLTAGE_LEVEL");
+ public final static Property CableType = new Property(9, String.class, "cableType", false, "CABLE_TYPE");
+ public final static Property CableSpec = new Property(10, String.class, "cableSpec", false, "CABLE_SPEC");
+ public final static Property CableBrand = new Property(11, String.class, "cableBrand", false, "CABLE_BRAND");
+ public final static Property CableStart = new Property(12, String.class, "cableStart", false, "CABLE_START");
+ public final static Property CableEnd = new Property(13, String.class, "cableEnd", false, "CABLE_END");
+ public final static Property HasJoint = new Property(14, String.class, "hasJoint", false, "HAS_JOINT");
+ public final static Property JointCreator = new Property(15, String.class, "jointCreator", false, "JOINT_CREATOR");
+ public final static Property ImagePath = new Property(16, String.class, "imagePath", false, "IMAGE_PATH");
+ public final static Property Memo1 = new Property(17, String.class, "memo1", false, "MEMO1");
+ public final static Property Memo2 = new Property(18, String.class, "memo2", false, "MEMO2");
+ public final static Property Memo3 = new Property(19, String.class, "memo3", false, "MEMO3");
+ }
+
+
+ public SmallMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public SmallMarkerLocalBeanDao(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 + "\"SMALL_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
+ "\"MARKER_ID\" TEXT," + // 1: markerId
+ "\"LOCATION_NUMBER\" TEXT," + // 2: locationNumber
+ "\"LOCATION_NAME\" TEXT," + // 3: locationName
+ "\"ELECTRIC_MARKER_ID\" TEXT," + // 4: electricMarkerId
+ "\"CABLE_NAME\" TEXT," + // 5: cableName
+ "\"CABLE_NUMBER\" TEXT," + // 6: cableNumber
+ "\"LINE\" TEXT," + // 7: line
+ "\"VOLTAGE_LEVEL\" TEXT," + // 8: voltageLevel
+ "\"CABLE_TYPE\" TEXT," + // 9: cableType
+ "\"CABLE_SPEC\" TEXT," + // 10: cableSpec
+ "\"CABLE_BRAND\" TEXT," + // 11: cableBrand
+ "\"CABLE_START\" TEXT," + // 12: cableStart
+ "\"CABLE_END\" TEXT," + // 13: cableEnd
+ "\"HAS_JOINT\" TEXT," + // 14: hasJoint
+ "\"JOINT_CREATOR\" TEXT," + // 15: jointCreator
+ "\"IMAGE_PATH\" TEXT," + // 16: imagePath
+ "\"MEMO1\" TEXT," + // 17: memo1
+ "\"MEMO2\" TEXT," + // 18: memo2
+ "\"MEMO3\" TEXT);"); // 19: memo3
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"SMALL_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, SmallMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(2, markerId);
+ }
+
+ String locationNumber = entity.getLocationNumber();
+ if (locationNumber != null) {
+ stmt.bindString(3, locationNumber);
+ }
+
+ String locationName = entity.getLocationName();
+ if (locationName != null) {
+ stmt.bindString(4, locationName);
+ }
+
+ String electricMarkerId = entity.getElectricMarkerId();
+ if (electricMarkerId != null) {
+ stmt.bindString(5, electricMarkerId);
+ }
+
+ String cableName = entity.getCableName();
+ if (cableName != null) {
+ stmt.bindString(6, cableName);
+ }
+
+ String cableNumber = entity.getCableNumber();
+ if (cableNumber != null) {
+ stmt.bindString(7, cableNumber);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String voltageLevel = entity.getVoltageLevel();
+ if (voltageLevel != null) {
+ stmt.bindString(9, voltageLevel);
+ }
+
+ String cableType = entity.getCableType();
+ if (cableType != null) {
+ stmt.bindString(10, cableType);
+ }
+
+ String cableSpec = entity.getCableSpec();
+ if (cableSpec != null) {
+ stmt.bindString(11, cableSpec);
+ }
+
+ String cableBrand = entity.getCableBrand();
+ if (cableBrand != null) {
+ stmt.bindString(12, cableBrand);
+ }
+
+ String cableStart = entity.getCableStart();
+ if (cableStart != null) {
+ stmt.bindString(13, cableStart);
+ }
+
+ String cableEnd = entity.getCableEnd();
+ if (cableEnd != null) {
+ stmt.bindString(14, cableEnd);
+ }
+
+ String hasJoint = entity.getHasJoint();
+ if (hasJoint != null) {
+ stmt.bindString(15, hasJoint);
+ }
+
+ String jointCreator = entity.getJointCreator();
+ if (jointCreator != null) {
+ stmt.bindString(16, jointCreator);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(17, imagePath);
+ }
+
+ String memo1 = entity.getMemo1();
+ if (memo1 != null) {
+ stmt.bindString(18, memo1);
+ }
+
+ String memo2 = entity.getMemo2();
+ if (memo2 != null) {
+ stmt.bindString(19, memo2);
+ }
+
+ String memo3 = entity.getMemo3();
+ if (memo3 != null) {
+ stmt.bindString(20, memo3);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, SmallMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(2, markerId);
+ }
+
+ String locationNumber = entity.getLocationNumber();
+ if (locationNumber != null) {
+ stmt.bindString(3, locationNumber);
+ }
+
+ String locationName = entity.getLocationName();
+ if (locationName != null) {
+ stmt.bindString(4, locationName);
+ }
+
+ String electricMarkerId = entity.getElectricMarkerId();
+ if (electricMarkerId != null) {
+ stmt.bindString(5, electricMarkerId);
+ }
+
+ String cableName = entity.getCableName();
+ if (cableName != null) {
+ stmt.bindString(6, cableName);
+ }
+
+ String cableNumber = entity.getCableNumber();
+ if (cableNumber != null) {
+ stmt.bindString(7, cableNumber);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String voltageLevel = entity.getVoltageLevel();
+ if (voltageLevel != null) {
+ stmt.bindString(9, voltageLevel);
+ }
+
+ String cableType = entity.getCableType();
+ if (cableType != null) {
+ stmt.bindString(10, cableType);
+ }
+
+ String cableSpec = entity.getCableSpec();
+ if (cableSpec != null) {
+ stmt.bindString(11, cableSpec);
+ }
+
+ String cableBrand = entity.getCableBrand();
+ if (cableBrand != null) {
+ stmt.bindString(12, cableBrand);
+ }
+
+ String cableStart = entity.getCableStart();
+ if (cableStart != null) {
+ stmt.bindString(13, cableStart);
+ }
+
+ String cableEnd = entity.getCableEnd();
+ if (cableEnd != null) {
+ stmt.bindString(14, cableEnd);
+ }
+
+ String hasJoint = entity.getHasJoint();
+ if (hasJoint != null) {
+ stmt.bindString(15, hasJoint);
+ }
+
+ String jointCreator = entity.getJointCreator();
+ if (jointCreator != null) {
+ stmt.bindString(16, jointCreator);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(17, imagePath);
+ }
+
+ String memo1 = entity.getMemo1();
+ if (memo1 != null) {
+ stmt.bindString(18, memo1);
+ }
+
+ String memo2 = entity.getMemo2();
+ if (memo2 != null) {
+ stmt.bindString(19, memo2);
+ }
+
+ String memo3 = entity.getMemo3();
+ if (memo3 != null) {
+ stmt.bindString(20, memo3);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public SmallMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ SmallMarkerLocalBean entity = new SmallMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // locationNumber
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // locationName
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // electricMarkerId
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // cableName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // cableNumber
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // voltageLevel
+ cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // cableType
+ cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // cableSpec
+ cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // cableBrand
+ cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // cableStart
+ cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // cableEnd
+ cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // hasJoint
+ cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // jointCreator
+ cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // imagePath
+ cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // memo1
+ cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // memo2
+ cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19) // memo3
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, SmallMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setMarkerId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setLocationNumber(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setLocationName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setElectricMarkerId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCableName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setCableNumber(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setVoltageLevel(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ entity.setCableType(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
+ entity.setCableSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
+ entity.setCableBrand(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
+ entity.setCableStart(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
+ entity.setCableEnd(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
+ entity.setHasJoint(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
+ entity.setJointCreator(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
+ entity.setImagePath(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
+ entity.setMemo1(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
+ entity.setMemo2(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
+ entity.setMemo3(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(SmallMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(SmallMarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(SmallMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 167cf0c..93ec3d6 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -1,21 +1,21 @@
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property MarkerObjType = new Property(1, String.class, "markerObjType", false, "MARKER_OBJ_TYPE");
- public final static Property MarkerNumber = new Property(2, String.class, "markerNumber", false, "MARKER_NUMBER");
- public final static Property ObjectName = new Property(3, String.class, "objectName", false, "OBJECT_NAME");
- public final static Property VoltageLevel = new Property(4, String.class, "voltageLevel", false, "VOLTAGE_LEVEL");
- public final static Property TransformerModel = new Property(5, String.class, "transformerModel", false, "TRANSFORMER_MODEL");
- public final static Property HoleCount = new Property(6, String.class, "holeCount", false, "HOLE_COUNT");
- public final static Property Capacity = new Property(7, String.class, "capacity", false, "CAPACITY");
- public final static Property WellCoverMaterial = new Property(8, String.class, "wellCoverMaterial", false, "WELL_COVER_MATERIAL");
- public final static Property CoverDepth = new Property(9, String.class, "coverDepth", false, "COVER_DEPTH");
- public final static Property TransformerSpec = new Property(10, String.class, "transformerSpec", false, "TRANSFORMER_SPEC");
- public final static Property InlineName = new Property(11, String.class, "inlineName", false, "INLINE_NAME");
- public final static Property Size = new Property(12, String.class, "size", false, "SIZE");
- public final static Property BottomDepth = new Property(13, String.class, "bottomDepth", false, "BOTTOM_DEPTH");
- public final static Property Height = new Property(14, String.class, "height", false, "HEIGHT");
- public final static Property CrossPipeLine = new Property(15, String.class, "crossPipeLine", false, "CROSS_PIPE_LINE");
- public final static Property InlineCount = new Property(16, String.class, "inlineCount", false, "INLINE_COUNT");
- public final static Property LineNumber = new Property(17, String.class, "lineNumber", false, "LINE_NUMBER");
- public final static Property JointCount = new Property(18, String.class, "jointCount", false, "JOINT_COUNT");
- public final static Property OutlineCount = new Property(19, String.class, "outlineCount", false, "OUTLINE_COUNT");
- public final static Property RemainingChannels = new Property(20, String.class, "remainingChannels", false, "REMAINING_CHANNELS");
- public final static Property CabinetType = new Property(21, String.class, "cabinetType", false, "CABINET_TYPE");
- public final static Property TieCable1 = new Property(22, String.class, "tieCable1", false, "TIE_CABLE1");
- public final static Property TieCable2 = new Property(23, String.class, "tieCable2", false, "TIE_CABLE2");
- public final static Property CasingMaterial = new Property(24, String.class, "casingMaterial", false, "CASING_MATERIAL");
- public final static Property CasingSpec = new Property(25, String.class, "casingSpec", false, "CASING_SPEC");
- public final static Property ConstructTime = new Property(26, String.class, "constructTime", false, "CONSTRUCT_TIME");
- public final static Property InspectionUnit = new Property(27, String.class, "inspectionUnit", false, "INSPECTION_UNIT");
- public final static Property Area = new Property(28, String.class, "area", false, "AREA");
- public final static Property Road = new Property(29, String.class, "road", false, "ROAD");
- public final static Property Memo1 = new Property(30, String.class, "memo1", false, "MEMO1");
- public final static Property Memo2 = new Property(31, String.class, "memo2", false, "MEMO2");
- public final static Property Memo3 = new Property(32, String.class, "memo3", false, "MEMO3");
- public final static Property MarkerId = new Property(33, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerType = new Property(34, String.class, "markerType", false, "MARKER_TYPE");
- public final static Property Owner = new Property(35, String.class, "owner", false, "OWNER");
- public final static Property MarkerDepth = new Property(36, String.class, "markerDepth", false, "MARKER_DEPTH");
- public final static Property ElectricTagCount = new Property(37, String.class, "electricTagCount", false, "ELECTRIC_TAG_COUNT");
- public final static Property InstalledTime = new Property(38, String.class, "installedTime", false, "INSTALLED_TIME");
- public final static Property Longitude = new Property(39, String.class, "longitude", false, "LONGITUDE");
- public final static Property Latitude = new Property(40, String.class, "latitude", false, "LATITUDE");
- public final static Property MarkerMemo1 = new Property(41, String.class, "markerMemo1", false, "MARKER_MEMO1");
- public final static Property MarkerMemo2 = new Property(42, String.class, "markerMemo2", false, "MARKER_MEMO2");
- public final static Property MarkerMemo3 = new Property(43, String.class, "markerMemo3", false, "MARKER_MEMO3");
- public final static Property ImagePath = new Property(44, String.class, "imagePath", false, "IMAGE_PATH");
- }
-
-
- public LabelBeanDao(DaoConfig config) {
- super(config);
- }
-
- public LabelBeanDao(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 + "\"LABEL_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"MARKER_OBJ_TYPE\" TEXT," + // 1: markerObjType
- "\"MARKER_NUMBER\" TEXT," + // 2: markerNumber
- "\"OBJECT_NAME\" TEXT," + // 3: objectName
- "\"VOLTAGE_LEVEL\" TEXT," + // 4: voltageLevel
- "\"TRANSFORMER_MODEL\" TEXT," + // 5: transformerModel
- "\"HOLE_COUNT\" TEXT," + // 6: holeCount
- "\"CAPACITY\" TEXT," + // 7: capacity
- "\"WELL_COVER_MATERIAL\" TEXT," + // 8: wellCoverMaterial
- "\"COVER_DEPTH\" TEXT," + // 9: coverDepth
- "\"TRANSFORMER_SPEC\" TEXT," + // 10: transformerSpec
- "\"INLINE_NAME\" TEXT," + // 11: inlineName
- "\"SIZE\" TEXT," + // 12: size
- "\"BOTTOM_DEPTH\" TEXT," + // 13: bottomDepth
- "\"HEIGHT\" TEXT," + // 14: height
- "\"CROSS_PIPE_LINE\" TEXT," + // 15: crossPipeLine
- "\"INLINE_COUNT\" TEXT," + // 16: inlineCount
- "\"LINE_NUMBER\" TEXT," + // 17: lineNumber
- "\"JOINT_COUNT\" TEXT," + // 18: jointCount
- "\"OUTLINE_COUNT\" TEXT," + // 19: outlineCount
- "\"REMAINING_CHANNELS\" TEXT," + // 20: remainingChannels
- "\"CABINET_TYPE\" TEXT," + // 21: cabinetType
- "\"TIE_CABLE1\" TEXT," + // 22: tieCable1
- "\"TIE_CABLE2\" TEXT," + // 23: tieCable2
- "\"CASING_MATERIAL\" TEXT," + // 24: casingMaterial
- "\"CASING_SPEC\" TEXT," + // 25: casingSpec
- "\"CONSTRUCT_TIME\" TEXT," + // 26: constructTime
- "\"INSPECTION_UNIT\" TEXT," + // 27: inspectionUnit
- "\"AREA\" TEXT," + // 28: area
- "\"ROAD\" TEXT," + // 29: road
- "\"MEMO1\" TEXT," + // 30: memo1
- "\"MEMO2\" TEXT," + // 31: memo2
- "\"MEMO3\" TEXT," + // 32: memo3
- "\"MARKER_ID\" TEXT," + // 33: markerId
- "\"MARKER_TYPE\" TEXT," + // 34: markerType
- "\"OWNER\" TEXT," + // 35: owner
- "\"MARKER_DEPTH\" TEXT," + // 36: markerDepth
- "\"ELECTRIC_TAG_COUNT\" TEXT," + // 37: electricTagCount
- "\"INSTALLED_TIME\" TEXT," + // 38: installedTime
- "\"LONGITUDE\" TEXT," + // 39: longitude
- "\"LATITUDE\" TEXT," + // 40: latitude
- "\"MARKER_MEMO1\" TEXT," + // 41: markerMemo1
- "\"MARKER_MEMO2\" TEXT," + // 42: markerMemo2
- "\"MARKER_MEMO3\" TEXT," + // 43: markerMemo3
- "\"IMAGE_PATH\" TEXT);"); // 44: imagePath
- }
-
- /** Drops the underlying database table. */
- public static void dropTable(Database db, boolean ifExists) {
- String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"LABEL_BEAN\"";
- db.execSQL(sql);
- }
-
- @Override
- protected final void bindValues(DatabaseStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- protected final void bindValues(SQLiteStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public LabelBean readEntity(Cursor cursor, int offset) {
- LabelBean entity = new LabelBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerObjType
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // markerNumber
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // objectName
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // voltageLevel
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // transformerModel
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // holeCount
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // capacity
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // wellCoverMaterial
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // coverDepth
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // transformerSpec
- cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // inlineName
- cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // size
- cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // bottomDepth
- cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // height
- cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // crossPipeLine
- cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // inlineCount
- cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lineNumber
- cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // jointCount
- cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // outlineCount
- cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // remainingChannels
- cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // cabinetType
- cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // tieCable1
- cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // tieCable2
- cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // casingMaterial
- cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // casingSpec
- cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26), // constructTime
- cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27), // inspectionUnit
- cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28), // area
- cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29), // road
- cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30), // memo1
- cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31), // memo2
- cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32), // memo3
- cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33), // markerId
- cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34), // markerType
- cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35), // owner
- cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36), // markerDepth
- cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37), // electricTagCount
- cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38), // installedTime
- cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39), // longitude
- cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40), // latitude
- cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41), // markerMemo1
- cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42), // markerMemo2
- cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43), // markerMemo3
- cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44) // imagePath
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, LabelBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setMarkerObjType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setMarkerNumber(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setObjectName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setVoltageLevel(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setTransformerModel(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setHoleCount(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setCapacity(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setWellCoverMaterial(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setCoverDepth(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- entity.setTransformerSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
- entity.setInlineName(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
- entity.setSize(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
- entity.setBottomDepth(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
- entity.setHeight(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
- entity.setCrossPipeLine(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
- entity.setInlineCount(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
- entity.setLineNumber(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
- entity.setJointCount(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
- entity.setOutlineCount(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
- entity.setRemainingChannels(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
- entity.setCabinetType(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
- entity.setTieCable1(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
- entity.setTieCable2(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
- entity.setCasingMaterial(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
- entity.setCasingSpec(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
- entity.setConstructTime(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
- entity.setInspectionUnit(cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27));
- entity.setArea(cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28));
- entity.setRoad(cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29));
- entity.setMemo1(cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30));
- entity.setMemo2(cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31));
- entity.setMemo3(cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32));
- entity.setMarkerId(cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33));
- entity.setMarkerType(cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34));
- entity.setOwner(cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35));
- entity.setMarkerDepth(cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36));
- entity.setElectricTagCount(cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37));
- entity.setInstalledTime(cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38));
- entity.setLongitude(cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39));
- entity.setLatitude(cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40));
- entity.setMarkerMemo1(cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41));
- entity.setMarkerMemo2(cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42));
- entity.setMarkerMemo3(cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43));
- entity.setImagePath(cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(LabelBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(LabelBean entity) {
- if(entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(LabelBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java
new file mode 100644
index 0000000..9f2afa5
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java
@@ -0,0 +1,479 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.MarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "MARKER_LOCAL_BEAN".
+*/
+public class MarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property PipelineType = new Property(1, String.class, "pipelineType", false, "PIPELINE_TYPE");
+ public final static Property PipelineDiameter = new Property(2, String.class, "pipelineDiameter", false, "PIPELINE_DIAMETER");
+ public final static Property PipelineMaterial = new Property(3, String.class, "pipelineMaterial", false, "PIPELINE_MATERIAL");
+ public final static Property BuryMethod = new Property(4, String.class, "buryMethod", false, "BURY_METHOD");
+ public final static Property BuryDepth = new Property(5, String.class, "buryDepth", false, "BURY_DEPTH");
+ public final static Property Area = new Property(6, String.class, "area", false, "AREA");
+ public final static Property Line = new Property(7, String.class, "line", false, "LINE");
+ public final static Property Road = new Property(8, String.class, "road", false, "ROAD");
+ public final static Property ConstructTime = new Property(9, String.class, "constructTime", false, "CONSTRUCT_TIME");
+ public final static Property Owner = new Property(10, String.class, "owner", false, "OWNER");
+ public final static Property ObjectId = new Property(11, String.class, "objectId", false, "OBJECT_ID");
+ public final static Property MarkerId = new Property(12, String.class, "markerId", false, "MARKER_ID");
+ public final static Property MarkerType = new Property(13, String.class, "markerType", false, "MARKER_TYPE");
+ public final static Property MarkerDepth = new Property(14, String.class, "markerDepth", false, "MARKER_DEPTH");
+ public final static Property InstallationDept = new Property(15, String.class, "installationDept", false, "INSTALLATION_DEPT");
+ public final static Property Lng = new Property(16, String.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(17, String.class, "lat", false, "LAT");
+ public final static Property UpdateTime = new Property(18, String.class, "updateTime", false, "UPDATE_TIME");
+ public final static Property Remark = new Property(19, String.class, "remark", false, "REMARK");
+ public final static Property UnderlyingPipelineType = new Property(20, String.class, "underlyingPipelineType", false, "UNDERLYING_PIPELINE_TYPE");
+ public final static Property UnderlyingPipelineDepth = new Property(21, String.class, "underlyingPipelineDepth", false, "UNDERLYING_PIPELINE_DEPTH");
+ public final static Property UnderlyingPipelineDiameter = new Property(22, String.class, "underlyingPipelineDiameter", false, "UNDERLYING_PIPELINE_DIAMETER");
+ public final static Property UnderlyingPipelineMaterial = new Property(23, String.class, "underlyingPipelineMaterial", false, "UNDERLYING_PIPELINE_MATERIAL");
+ public final static Property ObjectType = new Property(24, String.class, "objectType", false, "OBJECT_TYPE");
+ public final static Property Color = new Property(25, String.class, "color", false, "COLOR");
+ public final static Property ImagePath = new Property(26, String.class, "imagePath", false, "IMAGE_PATH");
+ }
+
+
+ public MarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public MarkerLocalBeanDao(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 + "\"MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
+ "\"PIPELINE_TYPE\" TEXT," + // 1: pipelineType
+ "\"PIPELINE_DIAMETER\" TEXT," + // 2: pipelineDiameter
+ "\"PIPELINE_MATERIAL\" TEXT," + // 3: pipelineMaterial
+ "\"BURY_METHOD\" TEXT," + // 4: buryMethod
+ "\"BURY_DEPTH\" TEXT," + // 5: buryDepth
+ "\"AREA\" TEXT," + // 6: area
+ "\"LINE\" TEXT," + // 7: line
+ "\"ROAD\" TEXT," + // 8: road
+ "\"CONSTRUCT_TIME\" TEXT," + // 9: constructTime
+ "\"OWNER\" TEXT," + // 10: owner
+ "\"OBJECT_ID\" TEXT," + // 11: objectId
+ "\"MARKER_ID\" TEXT," + // 12: markerId
+ "\"MARKER_TYPE\" TEXT," + // 13: markerType
+ "\"MARKER_DEPTH\" TEXT," + // 14: markerDepth
+ "\"INSTALLATION_DEPT\" TEXT," + // 15: installationDept
+ "\"LNG\" TEXT," + // 16: lng
+ "\"LAT\" TEXT," + // 17: lat
+ "\"UPDATE_TIME\" TEXT," + // 18: updateTime
+ "\"REMARK\" TEXT," + // 19: remark
+ "\"UNDERLYING_PIPELINE_TYPE\" TEXT," + // 20: underlyingPipelineType
+ "\"UNDERLYING_PIPELINE_DEPTH\" TEXT," + // 21: underlyingPipelineDepth
+ "\"UNDERLYING_PIPELINE_DIAMETER\" TEXT," + // 22: underlyingPipelineDiameter
+ "\"UNDERLYING_PIPELINE_MATERIAL\" TEXT," + // 23: underlyingPipelineMaterial
+ "\"OBJECT_TYPE\" TEXT," + // 24: objectType
+ "\"COLOR\" TEXT," + // 25: color
+ "\"IMAGE_PATH\" TEXT);"); // 26: imagePath
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, MarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String pipelineType = entity.getPipelineType();
+ if (pipelineType != null) {
+ stmt.bindString(2, pipelineType);
+ }
+
+ String pipelineDiameter = entity.getPipelineDiameter();
+ if (pipelineDiameter != null) {
+ stmt.bindString(3, pipelineDiameter);
+ }
+
+ String pipelineMaterial = entity.getPipelineMaterial();
+ if (pipelineMaterial != null) {
+ stmt.bindString(4, pipelineMaterial);
+ }
+
+ String buryMethod = entity.getBuryMethod();
+ if (buryMethod != null) {
+ stmt.bindString(5, buryMethod);
+ }
+
+ String buryDepth = entity.getBuryDepth();
+ if (buryDepth != null) {
+ stmt.bindString(6, buryDepth);
+ }
+
+ String area = entity.getArea();
+ if (area != null) {
+ stmt.bindString(7, area);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String road = entity.getRoad();
+ if (road != null) {
+ stmt.bindString(9, road);
+ }
+
+ String constructTime = entity.getConstructTime();
+ if (constructTime != null) {
+ stmt.bindString(10, constructTime);
+ }
+
+ String owner = entity.getOwner();
+ if (owner != null) {
+ stmt.bindString(11, owner);
+ }
+
+ String objectId = entity.getObjectId();
+ if (objectId != null) {
+ stmt.bindString(12, objectId);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(13, markerId);
+ }
+
+ String markerType = entity.getMarkerType();
+ if (markerType != null) {
+ stmt.bindString(14, markerType);
+ }
+
+ String markerDepth = entity.getMarkerDepth();
+ if (markerDepth != null) {
+ stmt.bindString(15, markerDepth);
+ }
+
+ String installationDept = entity.getInstallationDept();
+ if (installationDept != null) {
+ stmt.bindString(16, installationDept);
+ }
+
+ String lng = entity.getLng();
+ if (lng != null) {
+ stmt.bindString(17, lng);
+ }
+
+ String lat = entity.getLat();
+ if (lat != null) {
+ stmt.bindString(18, lat);
+ }
+
+ String updateTime = entity.getUpdateTime();
+ if (updateTime != null) {
+ stmt.bindString(19, updateTime);
+ }
+
+ String remark = entity.getRemark();
+ if (remark != null) {
+ stmt.bindString(20, remark);
+ }
+
+ String underlyingPipelineType = entity.getUnderlyingPipelineType();
+ if (underlyingPipelineType != null) {
+ stmt.bindString(21, underlyingPipelineType);
+ }
+
+ String underlyingPipelineDepth = entity.getUnderlyingPipelineDepth();
+ if (underlyingPipelineDepth != null) {
+ stmt.bindString(22, underlyingPipelineDepth);
+ }
+
+ String underlyingPipelineDiameter = entity.getUnderlyingPipelineDiameter();
+ if (underlyingPipelineDiameter != null) {
+ stmt.bindString(23, underlyingPipelineDiameter);
+ }
+
+ String underlyingPipelineMaterial = entity.getUnderlyingPipelineMaterial();
+ if (underlyingPipelineMaterial != null) {
+ stmt.bindString(24, underlyingPipelineMaterial);
+ }
+
+ String objectType = entity.getObjectType();
+ if (objectType != null) {
+ stmt.bindString(25, objectType);
+ }
+
+ String color = entity.getColor();
+ if (color != null) {
+ stmt.bindString(26, color);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(27, imagePath);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, MarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String pipelineType = entity.getPipelineType();
+ if (pipelineType != null) {
+ stmt.bindString(2, pipelineType);
+ }
+
+ String pipelineDiameter = entity.getPipelineDiameter();
+ if (pipelineDiameter != null) {
+ stmt.bindString(3, pipelineDiameter);
+ }
+
+ String pipelineMaterial = entity.getPipelineMaterial();
+ if (pipelineMaterial != null) {
+ stmt.bindString(4, pipelineMaterial);
+ }
+
+ String buryMethod = entity.getBuryMethod();
+ if (buryMethod != null) {
+ stmt.bindString(5, buryMethod);
+ }
+
+ String buryDepth = entity.getBuryDepth();
+ if (buryDepth != null) {
+ stmt.bindString(6, buryDepth);
+ }
+
+ String area = entity.getArea();
+ if (area != null) {
+ stmt.bindString(7, area);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String road = entity.getRoad();
+ if (road != null) {
+ stmt.bindString(9, road);
+ }
+
+ String constructTime = entity.getConstructTime();
+ if (constructTime != null) {
+ stmt.bindString(10, constructTime);
+ }
+
+ String owner = entity.getOwner();
+ if (owner != null) {
+ stmt.bindString(11, owner);
+ }
+
+ String objectId = entity.getObjectId();
+ if (objectId != null) {
+ stmt.bindString(12, objectId);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(13, markerId);
+ }
+
+ String markerType = entity.getMarkerType();
+ if (markerType != null) {
+ stmt.bindString(14, markerType);
+ }
+
+ String markerDepth = entity.getMarkerDepth();
+ if (markerDepth != null) {
+ stmt.bindString(15, markerDepth);
+ }
+
+ String installationDept = entity.getInstallationDept();
+ if (installationDept != null) {
+ stmt.bindString(16, installationDept);
+ }
+
+ String lng = entity.getLng();
+ if (lng != null) {
+ stmt.bindString(17, lng);
+ }
+
+ String lat = entity.getLat();
+ if (lat != null) {
+ stmt.bindString(18, lat);
+ }
+
+ String updateTime = entity.getUpdateTime();
+ if (updateTime != null) {
+ stmt.bindString(19, updateTime);
+ }
+
+ String remark = entity.getRemark();
+ if (remark != null) {
+ stmt.bindString(20, remark);
+ }
+
+ String underlyingPipelineType = entity.getUnderlyingPipelineType();
+ if (underlyingPipelineType != null) {
+ stmt.bindString(21, underlyingPipelineType);
+ }
+
+ String underlyingPipelineDepth = entity.getUnderlyingPipelineDepth();
+ if (underlyingPipelineDepth != null) {
+ stmt.bindString(22, underlyingPipelineDepth);
+ }
+
+ String underlyingPipelineDiameter = entity.getUnderlyingPipelineDiameter();
+ if (underlyingPipelineDiameter != null) {
+ stmt.bindString(23, underlyingPipelineDiameter);
+ }
+
+ String underlyingPipelineMaterial = entity.getUnderlyingPipelineMaterial();
+ if (underlyingPipelineMaterial != null) {
+ stmt.bindString(24, underlyingPipelineMaterial);
+ }
+
+ String objectType = entity.getObjectType();
+ if (objectType != null) {
+ stmt.bindString(25, objectType);
+ }
+
+ String color = entity.getColor();
+ if (color != null) {
+ stmt.bindString(26, color);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(27, imagePath);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public MarkerLocalBean readEntity(Cursor cursor, int offset) {
+ MarkerLocalBean entity = new MarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // pipelineType
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // pipelineDiameter
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // pipelineMaterial
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // buryMethod
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // buryDepth
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // area
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // road
+ cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // constructTime
+ cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // owner
+ cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // objectId
+ cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // markerId
+ cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // markerType
+ cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // markerDepth
+ cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // installationDept
+ cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // lng
+ cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lat
+ cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // updateTime
+ cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // remark
+ cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // underlyingPipelineType
+ cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // underlyingPipelineDepth
+ cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // underlyingPipelineDiameter
+ cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // underlyingPipelineMaterial
+ cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // objectType
+ cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // color
+ cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26) // imagePath
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, MarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setPipelineType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setPipelineDiameter(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setPipelineMaterial(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setBuryMethod(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setBuryDepth(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setArea(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setRoad(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ entity.setConstructTime(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
+ entity.setOwner(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
+ entity.setObjectId(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
+ entity.setMarkerId(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
+ entity.setMarkerType(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
+ entity.setMarkerDepth(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
+ entity.setInstallationDept(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
+ entity.setLng(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
+ entity.setLat(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
+ entity.setUpdateTime(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
+ entity.setRemark(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
+ entity.setUnderlyingPipelineType(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
+ entity.setUnderlyingPipelineDepth(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
+ entity.setUnderlyingPipelineDiameter(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
+ entity.setUnderlyingPipelineMaterial(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
+ entity.setObjectType(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
+ entity.setColor(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
+ entity.setImagePath(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(MarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(MarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(MarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
index 18b1b7b..9d99b8d 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
@@ -3,7 +3,7 @@
import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;
-import com.casic.electric.detector.bean.SmallLabelBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.Property;
@@ -12,10 +12,11 @@
import org.greenrobot.greendao.internal.DaoConfig;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-/**
+
+/**
* DAO for table "SMALL_LABEL_BEAN".
-*/
-public class SmallLabelBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property MarkerId = new Property(1, String.class, "markerId", false, "MARKER_ID");
+ public final static Property LocationNumber = new Property(2, String.class, "locationNumber", false, "LOCATION_NUMBER");
+ public final static Property LocationName = new Property(3, String.class, "locationName", false, "LOCATION_NAME");
+ public final static Property ElectricMarkerId = new Property(4, String.class, "electricMarkerId", false, "ELECTRIC_MARKER_ID");
+ public final static Property CableName = new Property(5, String.class, "cableName", false, "CABLE_NAME");
+ public final static Property CableNumber = new Property(6, String.class, "cableNumber", false, "CABLE_NUMBER");
+ public final static Property Line = new Property(7, String.class, "line", false, "LINE");
+ public final static Property VoltageLevel = new Property(8, String.class, "voltageLevel", false, "VOLTAGE_LEVEL");
+ public final static Property CableType = new Property(9, String.class, "cableType", false, "CABLE_TYPE");
+ public final static Property CableSpec = new Property(10, String.class, "cableSpec", false, "CABLE_SPEC");
+ public final static Property CableBrand = new Property(11, String.class, "cableBrand", false, "CABLE_BRAND");
+ public final static Property CableStart = new Property(12, String.class, "cableStart", false, "CABLE_START");
+ public final static Property CableEnd = new Property(13, String.class, "cableEnd", false, "CABLE_END");
+ public final static Property HasJoint = new Property(14, String.class, "hasJoint", false, "HAS_JOINT");
+ public final static Property JointCreator = new Property(15, String.class, "jointCreator", false, "JOINT_CREATOR");
+ public final static Property ImagePath = new Property(16, String.class, "imagePath", false, "IMAGE_PATH");
+ public final static Property Memo1 = new Property(17, String.class, "memo1", false, "MEMO1");
+ public final static Property Memo2 = new Property(18, String.class, "memo2", false, "MEMO2");
+ public final static Property Memo3 = new Property(19, String.class, "memo3", false, "MEMO3");
+ }
+
+
+ public SmallMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public SmallMarkerLocalBeanDao(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 + "\"SMALL_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
+ "\"MARKER_ID\" TEXT," + // 1: markerId
+ "\"LOCATION_NUMBER\" TEXT," + // 2: locationNumber
+ "\"LOCATION_NAME\" TEXT," + // 3: locationName
+ "\"ELECTRIC_MARKER_ID\" TEXT," + // 4: electricMarkerId
+ "\"CABLE_NAME\" TEXT," + // 5: cableName
+ "\"CABLE_NUMBER\" TEXT," + // 6: cableNumber
+ "\"LINE\" TEXT," + // 7: line
+ "\"VOLTAGE_LEVEL\" TEXT," + // 8: voltageLevel
+ "\"CABLE_TYPE\" TEXT," + // 9: cableType
+ "\"CABLE_SPEC\" TEXT," + // 10: cableSpec
+ "\"CABLE_BRAND\" TEXT," + // 11: cableBrand
+ "\"CABLE_START\" TEXT," + // 12: cableStart
+ "\"CABLE_END\" TEXT," + // 13: cableEnd
+ "\"HAS_JOINT\" TEXT," + // 14: hasJoint
+ "\"JOINT_CREATOR\" TEXT," + // 15: jointCreator
+ "\"IMAGE_PATH\" TEXT," + // 16: imagePath
+ "\"MEMO1\" TEXT," + // 17: memo1
+ "\"MEMO2\" TEXT," + // 18: memo2
+ "\"MEMO3\" TEXT);"); // 19: memo3
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"SMALL_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, SmallMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(2, markerId);
+ }
+
+ String locationNumber = entity.getLocationNumber();
+ if (locationNumber != null) {
+ stmt.bindString(3, locationNumber);
+ }
+
+ String locationName = entity.getLocationName();
+ if (locationName != null) {
+ stmt.bindString(4, locationName);
+ }
+
+ String electricMarkerId = entity.getElectricMarkerId();
+ if (electricMarkerId != null) {
+ stmt.bindString(5, electricMarkerId);
+ }
+
+ String cableName = entity.getCableName();
+ if (cableName != null) {
+ stmt.bindString(6, cableName);
+ }
+
+ String cableNumber = entity.getCableNumber();
+ if (cableNumber != null) {
+ stmt.bindString(7, cableNumber);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String voltageLevel = entity.getVoltageLevel();
+ if (voltageLevel != null) {
+ stmt.bindString(9, voltageLevel);
+ }
+
+ String cableType = entity.getCableType();
+ if (cableType != null) {
+ stmt.bindString(10, cableType);
+ }
+
+ String cableSpec = entity.getCableSpec();
+ if (cableSpec != null) {
+ stmt.bindString(11, cableSpec);
+ }
+
+ String cableBrand = entity.getCableBrand();
+ if (cableBrand != null) {
+ stmt.bindString(12, cableBrand);
+ }
+
+ String cableStart = entity.getCableStart();
+ if (cableStart != null) {
+ stmt.bindString(13, cableStart);
+ }
+
+ String cableEnd = entity.getCableEnd();
+ if (cableEnd != null) {
+ stmt.bindString(14, cableEnd);
+ }
+
+ String hasJoint = entity.getHasJoint();
+ if (hasJoint != null) {
+ stmt.bindString(15, hasJoint);
+ }
+
+ String jointCreator = entity.getJointCreator();
+ if (jointCreator != null) {
+ stmt.bindString(16, jointCreator);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(17, imagePath);
+ }
+
+ String memo1 = entity.getMemo1();
+ if (memo1 != null) {
+ stmt.bindString(18, memo1);
+ }
+
+ String memo2 = entity.getMemo2();
+ if (memo2 != null) {
+ stmt.bindString(19, memo2);
+ }
+
+ String memo3 = entity.getMemo3();
+ if (memo3 != null) {
+ stmt.bindString(20, memo3);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, SmallMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(2, markerId);
+ }
+
+ String locationNumber = entity.getLocationNumber();
+ if (locationNumber != null) {
+ stmt.bindString(3, locationNumber);
+ }
+
+ String locationName = entity.getLocationName();
+ if (locationName != null) {
+ stmt.bindString(4, locationName);
+ }
+
+ String electricMarkerId = entity.getElectricMarkerId();
+ if (electricMarkerId != null) {
+ stmt.bindString(5, electricMarkerId);
+ }
+
+ String cableName = entity.getCableName();
+ if (cableName != null) {
+ stmt.bindString(6, cableName);
+ }
+
+ String cableNumber = entity.getCableNumber();
+ if (cableNumber != null) {
+ stmt.bindString(7, cableNumber);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String voltageLevel = entity.getVoltageLevel();
+ if (voltageLevel != null) {
+ stmt.bindString(9, voltageLevel);
+ }
+
+ String cableType = entity.getCableType();
+ if (cableType != null) {
+ stmt.bindString(10, cableType);
+ }
+
+ String cableSpec = entity.getCableSpec();
+ if (cableSpec != null) {
+ stmt.bindString(11, cableSpec);
+ }
+
+ String cableBrand = entity.getCableBrand();
+ if (cableBrand != null) {
+ stmt.bindString(12, cableBrand);
+ }
+
+ String cableStart = entity.getCableStart();
+ if (cableStart != null) {
+ stmt.bindString(13, cableStart);
+ }
+
+ String cableEnd = entity.getCableEnd();
+ if (cableEnd != null) {
+ stmt.bindString(14, cableEnd);
+ }
+
+ String hasJoint = entity.getHasJoint();
+ if (hasJoint != null) {
+ stmt.bindString(15, hasJoint);
+ }
+
+ String jointCreator = entity.getJointCreator();
+ if (jointCreator != null) {
+ stmt.bindString(16, jointCreator);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(17, imagePath);
+ }
+
+ String memo1 = entity.getMemo1();
+ if (memo1 != null) {
+ stmt.bindString(18, memo1);
+ }
+
+ String memo2 = entity.getMemo2();
+ if (memo2 != null) {
+ stmt.bindString(19, memo2);
+ }
+
+ String memo3 = entity.getMemo3();
+ if (memo3 != null) {
+ stmt.bindString(20, memo3);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public SmallMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ SmallMarkerLocalBean entity = new SmallMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // locationNumber
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // locationName
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // electricMarkerId
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // cableName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // cableNumber
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // voltageLevel
+ cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // cableType
+ cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // cableSpec
+ cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // cableBrand
+ cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // cableStart
+ cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // cableEnd
+ cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // hasJoint
+ cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // jointCreator
+ cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // imagePath
+ cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // memo1
+ cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // memo2
+ cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19) // memo3
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, SmallMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setMarkerId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setLocationNumber(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setLocationName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setElectricMarkerId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCableName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setCableNumber(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setVoltageLevel(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ entity.setCableType(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
+ entity.setCableSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
+ entity.setCableBrand(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
+ entity.setCableStart(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
+ entity.setCableEnd(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
+ entity.setHasJoint(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
+ entity.setJointCreator(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
+ entity.setImagePath(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
+ entity.setMemo1(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
+ entity.setMemo2(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
+ entity.setMemo3(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(SmallMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(SmallMarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(SmallMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java
deleted file mode 100644
index 802ffb0..0000000
--- a/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java
+++ /dev/null
@@ -1,241 +0,0 @@
-package com.casic.electric.detector.greendao;
-
-import android.database.Cursor;
-import android.database.sqlite.SQLiteStatement;
-
-import com.casic.electric.detector.bean.TaskBean;
-
-import org.greenrobot.greendao.AbstractDao;
-import org.greenrobot.greendao.Property;
-import org.greenrobot.greendao.database.Database;
-import org.greenrobot.greendao.database.DatabaseStatement;
-import org.greenrobot.greendao.internal.DaoConfig;
-
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-/**
- * DAO for table "TASK_BEAN".
-*/
-public class TaskBeanDao extends AbstractDao
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property TaskId = new Property(1, String.class, "taskId", false, "TASK_ID");
- public final static Property TaskCode = new Property(2, String.class, "taskCode", false, "TASK_CODE");
- public final static Property MarkerId = new Property(3, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerRealId = new Property(4, String.class, "markerRealId", false, "MARKER_REAL_ID");
- public final static Property Scanner = new Property(5, String.class, "scanner", false, "SCANNER");
- public final static Property Lng = new Property(6, String.class, "lng", false, "LNG");
- public final static Property Lat = new Property(7, String.class, "lat", false, "LAT");
- public final static Property State = new Property(8, String.class, "state", false, "STATE");
- public final static Property Desc = new Property(9, String.class, "desc", false, "DESC");
- }
-
-
- public TaskBeanDao(DaoConfig config) {
- super(config);
- }
-
- public TaskBeanDao(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 + "\"TASK_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"TASK_ID\" TEXT," + // 1: taskId
- "\"TASK_CODE\" TEXT," + // 2: taskCode
- "\"MARKER_ID\" TEXT," + // 3: markerId
- "\"MARKER_REAL_ID\" TEXT," + // 4: markerRealId
- "\"SCANNER\" TEXT," + // 5: scanner
- "\"LNG\" TEXT," + // 6: lng
- "\"LAT\" TEXT," + // 7: lat
- "\"STATE\" TEXT," + // 8: state
- "\"DESC\" TEXT);"); // 9: desc
- }
-
- /** Drops the underlying database table. */
- public static void dropTable(Database db, boolean ifExists) {
- String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_BEAN\"";
- db.execSQL(sql);
- }
-
- @Override
- protected final void bindValues(DatabaseStatement stmt, TaskBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(2, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(3, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(4, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(5, markerRealId);
- }
-
- String scanner = entity.getScanner();
- if (scanner != null) {
- stmt.bindString(6, scanner);
- }
-
- String lng = entity.getLng();
- if (lng != null) {
- stmt.bindString(7, lng);
- }
-
- String lat = entity.getLat();
- if (lat != null) {
- stmt.bindString(8, lat);
- }
-
- String state = entity.getState();
- if (state != null) {
- stmt.bindString(9, state);
- }
-
- String desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(10, desc);
- }
- }
-
- @Override
- protected final void bindValues(SQLiteStatement stmt, TaskBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(2, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(3, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(4, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(5, markerRealId);
- }
-
- String scanner = entity.getScanner();
- if (scanner != null) {
- stmt.bindString(6, scanner);
- }
-
- String lng = entity.getLng();
- if (lng != null) {
- stmt.bindString(7, lng);
- }
-
- String lat = entity.getLat();
- if (lat != null) {
- stmt.bindString(8, lat);
- }
-
- String state = entity.getState();
- if (state != null) {
- stmt.bindString(9, state);
- }
-
- String desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(10, desc);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public TaskBean readEntity(Cursor cursor, int offset) {
- TaskBean entity = new TaskBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskId
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskCode
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // markerId
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // markerRealId
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // scanner
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // lng
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // lat
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // state
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9) // desc
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, TaskBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setTaskId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setTaskCode(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setMarkerId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setMarkerRealId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setScanner(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setLng(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLat(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setState(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setDesc(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(TaskBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(TaskBean entity) {
- if(entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(TaskBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 167cf0c..93ec3d6 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -1,21 +1,21 @@
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property MarkerObjType = new Property(1, String.class, "markerObjType", false, "MARKER_OBJ_TYPE");
- public final static Property MarkerNumber = new Property(2, String.class, "markerNumber", false, "MARKER_NUMBER");
- public final static Property ObjectName = new Property(3, String.class, "objectName", false, "OBJECT_NAME");
- public final static Property VoltageLevel = new Property(4, String.class, "voltageLevel", false, "VOLTAGE_LEVEL");
- public final static Property TransformerModel = new Property(5, String.class, "transformerModel", false, "TRANSFORMER_MODEL");
- public final static Property HoleCount = new Property(6, String.class, "holeCount", false, "HOLE_COUNT");
- public final static Property Capacity = new Property(7, String.class, "capacity", false, "CAPACITY");
- public final static Property WellCoverMaterial = new Property(8, String.class, "wellCoverMaterial", false, "WELL_COVER_MATERIAL");
- public final static Property CoverDepth = new Property(9, String.class, "coverDepth", false, "COVER_DEPTH");
- public final static Property TransformerSpec = new Property(10, String.class, "transformerSpec", false, "TRANSFORMER_SPEC");
- public final static Property InlineName = new Property(11, String.class, "inlineName", false, "INLINE_NAME");
- public final static Property Size = new Property(12, String.class, "size", false, "SIZE");
- public final static Property BottomDepth = new Property(13, String.class, "bottomDepth", false, "BOTTOM_DEPTH");
- public final static Property Height = new Property(14, String.class, "height", false, "HEIGHT");
- public final static Property CrossPipeLine = new Property(15, String.class, "crossPipeLine", false, "CROSS_PIPE_LINE");
- public final static Property InlineCount = new Property(16, String.class, "inlineCount", false, "INLINE_COUNT");
- public final static Property LineNumber = new Property(17, String.class, "lineNumber", false, "LINE_NUMBER");
- public final static Property JointCount = new Property(18, String.class, "jointCount", false, "JOINT_COUNT");
- public final static Property OutlineCount = new Property(19, String.class, "outlineCount", false, "OUTLINE_COUNT");
- public final static Property RemainingChannels = new Property(20, String.class, "remainingChannels", false, "REMAINING_CHANNELS");
- public final static Property CabinetType = new Property(21, String.class, "cabinetType", false, "CABINET_TYPE");
- public final static Property TieCable1 = new Property(22, String.class, "tieCable1", false, "TIE_CABLE1");
- public final static Property TieCable2 = new Property(23, String.class, "tieCable2", false, "TIE_CABLE2");
- public final static Property CasingMaterial = new Property(24, String.class, "casingMaterial", false, "CASING_MATERIAL");
- public final static Property CasingSpec = new Property(25, String.class, "casingSpec", false, "CASING_SPEC");
- public final static Property ConstructTime = new Property(26, String.class, "constructTime", false, "CONSTRUCT_TIME");
- public final static Property InspectionUnit = new Property(27, String.class, "inspectionUnit", false, "INSPECTION_UNIT");
- public final static Property Area = new Property(28, String.class, "area", false, "AREA");
- public final static Property Road = new Property(29, String.class, "road", false, "ROAD");
- public final static Property Memo1 = new Property(30, String.class, "memo1", false, "MEMO1");
- public final static Property Memo2 = new Property(31, String.class, "memo2", false, "MEMO2");
- public final static Property Memo3 = new Property(32, String.class, "memo3", false, "MEMO3");
- public final static Property MarkerId = new Property(33, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerType = new Property(34, String.class, "markerType", false, "MARKER_TYPE");
- public final static Property Owner = new Property(35, String.class, "owner", false, "OWNER");
- public final static Property MarkerDepth = new Property(36, String.class, "markerDepth", false, "MARKER_DEPTH");
- public final static Property ElectricTagCount = new Property(37, String.class, "electricTagCount", false, "ELECTRIC_TAG_COUNT");
- public final static Property InstalledTime = new Property(38, String.class, "installedTime", false, "INSTALLED_TIME");
- public final static Property Longitude = new Property(39, String.class, "longitude", false, "LONGITUDE");
- public final static Property Latitude = new Property(40, String.class, "latitude", false, "LATITUDE");
- public final static Property MarkerMemo1 = new Property(41, String.class, "markerMemo1", false, "MARKER_MEMO1");
- public final static Property MarkerMemo2 = new Property(42, String.class, "markerMemo2", false, "MARKER_MEMO2");
- public final static Property MarkerMemo3 = new Property(43, String.class, "markerMemo3", false, "MARKER_MEMO3");
- public final static Property ImagePath = new Property(44, String.class, "imagePath", false, "IMAGE_PATH");
- }
-
-
- public LabelBeanDao(DaoConfig config) {
- super(config);
- }
-
- public LabelBeanDao(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 + "\"LABEL_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"MARKER_OBJ_TYPE\" TEXT," + // 1: markerObjType
- "\"MARKER_NUMBER\" TEXT," + // 2: markerNumber
- "\"OBJECT_NAME\" TEXT," + // 3: objectName
- "\"VOLTAGE_LEVEL\" TEXT," + // 4: voltageLevel
- "\"TRANSFORMER_MODEL\" TEXT," + // 5: transformerModel
- "\"HOLE_COUNT\" TEXT," + // 6: holeCount
- "\"CAPACITY\" TEXT," + // 7: capacity
- "\"WELL_COVER_MATERIAL\" TEXT," + // 8: wellCoverMaterial
- "\"COVER_DEPTH\" TEXT," + // 9: coverDepth
- "\"TRANSFORMER_SPEC\" TEXT," + // 10: transformerSpec
- "\"INLINE_NAME\" TEXT," + // 11: inlineName
- "\"SIZE\" TEXT," + // 12: size
- "\"BOTTOM_DEPTH\" TEXT," + // 13: bottomDepth
- "\"HEIGHT\" TEXT," + // 14: height
- "\"CROSS_PIPE_LINE\" TEXT," + // 15: crossPipeLine
- "\"INLINE_COUNT\" TEXT," + // 16: inlineCount
- "\"LINE_NUMBER\" TEXT," + // 17: lineNumber
- "\"JOINT_COUNT\" TEXT," + // 18: jointCount
- "\"OUTLINE_COUNT\" TEXT," + // 19: outlineCount
- "\"REMAINING_CHANNELS\" TEXT," + // 20: remainingChannels
- "\"CABINET_TYPE\" TEXT," + // 21: cabinetType
- "\"TIE_CABLE1\" TEXT," + // 22: tieCable1
- "\"TIE_CABLE2\" TEXT," + // 23: tieCable2
- "\"CASING_MATERIAL\" TEXT," + // 24: casingMaterial
- "\"CASING_SPEC\" TEXT," + // 25: casingSpec
- "\"CONSTRUCT_TIME\" TEXT," + // 26: constructTime
- "\"INSPECTION_UNIT\" TEXT," + // 27: inspectionUnit
- "\"AREA\" TEXT," + // 28: area
- "\"ROAD\" TEXT," + // 29: road
- "\"MEMO1\" TEXT," + // 30: memo1
- "\"MEMO2\" TEXT," + // 31: memo2
- "\"MEMO3\" TEXT," + // 32: memo3
- "\"MARKER_ID\" TEXT," + // 33: markerId
- "\"MARKER_TYPE\" TEXT," + // 34: markerType
- "\"OWNER\" TEXT," + // 35: owner
- "\"MARKER_DEPTH\" TEXT," + // 36: markerDepth
- "\"ELECTRIC_TAG_COUNT\" TEXT," + // 37: electricTagCount
- "\"INSTALLED_TIME\" TEXT," + // 38: installedTime
- "\"LONGITUDE\" TEXT," + // 39: longitude
- "\"LATITUDE\" TEXT," + // 40: latitude
- "\"MARKER_MEMO1\" TEXT," + // 41: markerMemo1
- "\"MARKER_MEMO2\" TEXT," + // 42: markerMemo2
- "\"MARKER_MEMO3\" TEXT," + // 43: markerMemo3
- "\"IMAGE_PATH\" TEXT);"); // 44: imagePath
- }
-
- /** Drops the underlying database table. */
- public static void dropTable(Database db, boolean ifExists) {
- String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"LABEL_BEAN\"";
- db.execSQL(sql);
- }
-
- @Override
- protected final void bindValues(DatabaseStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- protected final void bindValues(SQLiteStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public LabelBean readEntity(Cursor cursor, int offset) {
- LabelBean entity = new LabelBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerObjType
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // markerNumber
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // objectName
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // voltageLevel
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // transformerModel
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // holeCount
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // capacity
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // wellCoverMaterial
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // coverDepth
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // transformerSpec
- cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // inlineName
- cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // size
- cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // bottomDepth
- cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // height
- cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // crossPipeLine
- cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // inlineCount
- cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lineNumber
- cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // jointCount
- cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // outlineCount
- cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // remainingChannels
- cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // cabinetType
- cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // tieCable1
- cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // tieCable2
- cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // casingMaterial
- cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // casingSpec
- cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26), // constructTime
- cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27), // inspectionUnit
- cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28), // area
- cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29), // road
- cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30), // memo1
- cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31), // memo2
- cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32), // memo3
- cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33), // markerId
- cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34), // markerType
- cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35), // owner
- cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36), // markerDepth
- cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37), // electricTagCount
- cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38), // installedTime
- cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39), // longitude
- cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40), // latitude
- cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41), // markerMemo1
- cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42), // markerMemo2
- cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43), // markerMemo3
- cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44) // imagePath
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, LabelBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setMarkerObjType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setMarkerNumber(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setObjectName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setVoltageLevel(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setTransformerModel(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setHoleCount(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setCapacity(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setWellCoverMaterial(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setCoverDepth(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- entity.setTransformerSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
- entity.setInlineName(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
- entity.setSize(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
- entity.setBottomDepth(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
- entity.setHeight(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
- entity.setCrossPipeLine(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
- entity.setInlineCount(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
- entity.setLineNumber(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
- entity.setJointCount(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
- entity.setOutlineCount(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
- entity.setRemainingChannels(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
- entity.setCabinetType(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
- entity.setTieCable1(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
- entity.setTieCable2(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
- entity.setCasingMaterial(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
- entity.setCasingSpec(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
- entity.setConstructTime(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
- entity.setInspectionUnit(cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27));
- entity.setArea(cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28));
- entity.setRoad(cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29));
- entity.setMemo1(cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30));
- entity.setMemo2(cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31));
- entity.setMemo3(cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32));
- entity.setMarkerId(cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33));
- entity.setMarkerType(cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34));
- entity.setOwner(cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35));
- entity.setMarkerDepth(cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36));
- entity.setElectricTagCount(cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37));
- entity.setInstalledTime(cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38));
- entity.setLongitude(cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39));
- entity.setLatitude(cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40));
- entity.setMarkerMemo1(cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41));
- entity.setMarkerMemo2(cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42));
- entity.setMarkerMemo3(cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43));
- entity.setImagePath(cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(LabelBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(LabelBean entity) {
- if(entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(LabelBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java
new file mode 100644
index 0000000..9f2afa5
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java
@@ -0,0 +1,479 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.MarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "MARKER_LOCAL_BEAN".
+*/
+public class MarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property PipelineType = new Property(1, String.class, "pipelineType", false, "PIPELINE_TYPE");
+ public final static Property PipelineDiameter = new Property(2, String.class, "pipelineDiameter", false, "PIPELINE_DIAMETER");
+ public final static Property PipelineMaterial = new Property(3, String.class, "pipelineMaterial", false, "PIPELINE_MATERIAL");
+ public final static Property BuryMethod = new Property(4, String.class, "buryMethod", false, "BURY_METHOD");
+ public final static Property BuryDepth = new Property(5, String.class, "buryDepth", false, "BURY_DEPTH");
+ public final static Property Area = new Property(6, String.class, "area", false, "AREA");
+ public final static Property Line = new Property(7, String.class, "line", false, "LINE");
+ public final static Property Road = new Property(8, String.class, "road", false, "ROAD");
+ public final static Property ConstructTime = new Property(9, String.class, "constructTime", false, "CONSTRUCT_TIME");
+ public final static Property Owner = new Property(10, String.class, "owner", false, "OWNER");
+ public final static Property ObjectId = new Property(11, String.class, "objectId", false, "OBJECT_ID");
+ public final static Property MarkerId = new Property(12, String.class, "markerId", false, "MARKER_ID");
+ public final static Property MarkerType = new Property(13, String.class, "markerType", false, "MARKER_TYPE");
+ public final static Property MarkerDepth = new Property(14, String.class, "markerDepth", false, "MARKER_DEPTH");
+ public final static Property InstallationDept = new Property(15, String.class, "installationDept", false, "INSTALLATION_DEPT");
+ public final static Property Lng = new Property(16, String.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(17, String.class, "lat", false, "LAT");
+ public final static Property UpdateTime = new Property(18, String.class, "updateTime", false, "UPDATE_TIME");
+ public final static Property Remark = new Property(19, String.class, "remark", false, "REMARK");
+ public final static Property UnderlyingPipelineType = new Property(20, String.class, "underlyingPipelineType", false, "UNDERLYING_PIPELINE_TYPE");
+ public final static Property UnderlyingPipelineDepth = new Property(21, String.class, "underlyingPipelineDepth", false, "UNDERLYING_PIPELINE_DEPTH");
+ public final static Property UnderlyingPipelineDiameter = new Property(22, String.class, "underlyingPipelineDiameter", false, "UNDERLYING_PIPELINE_DIAMETER");
+ public final static Property UnderlyingPipelineMaterial = new Property(23, String.class, "underlyingPipelineMaterial", false, "UNDERLYING_PIPELINE_MATERIAL");
+ public final static Property ObjectType = new Property(24, String.class, "objectType", false, "OBJECT_TYPE");
+ public final static Property Color = new Property(25, String.class, "color", false, "COLOR");
+ public final static Property ImagePath = new Property(26, String.class, "imagePath", false, "IMAGE_PATH");
+ }
+
+
+ public MarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public MarkerLocalBeanDao(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 + "\"MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
+ "\"PIPELINE_TYPE\" TEXT," + // 1: pipelineType
+ "\"PIPELINE_DIAMETER\" TEXT," + // 2: pipelineDiameter
+ "\"PIPELINE_MATERIAL\" TEXT," + // 3: pipelineMaterial
+ "\"BURY_METHOD\" TEXT," + // 4: buryMethod
+ "\"BURY_DEPTH\" TEXT," + // 5: buryDepth
+ "\"AREA\" TEXT," + // 6: area
+ "\"LINE\" TEXT," + // 7: line
+ "\"ROAD\" TEXT," + // 8: road
+ "\"CONSTRUCT_TIME\" TEXT," + // 9: constructTime
+ "\"OWNER\" TEXT," + // 10: owner
+ "\"OBJECT_ID\" TEXT," + // 11: objectId
+ "\"MARKER_ID\" TEXT," + // 12: markerId
+ "\"MARKER_TYPE\" TEXT," + // 13: markerType
+ "\"MARKER_DEPTH\" TEXT," + // 14: markerDepth
+ "\"INSTALLATION_DEPT\" TEXT," + // 15: installationDept
+ "\"LNG\" TEXT," + // 16: lng
+ "\"LAT\" TEXT," + // 17: lat
+ "\"UPDATE_TIME\" TEXT," + // 18: updateTime
+ "\"REMARK\" TEXT," + // 19: remark
+ "\"UNDERLYING_PIPELINE_TYPE\" TEXT," + // 20: underlyingPipelineType
+ "\"UNDERLYING_PIPELINE_DEPTH\" TEXT," + // 21: underlyingPipelineDepth
+ "\"UNDERLYING_PIPELINE_DIAMETER\" TEXT," + // 22: underlyingPipelineDiameter
+ "\"UNDERLYING_PIPELINE_MATERIAL\" TEXT," + // 23: underlyingPipelineMaterial
+ "\"OBJECT_TYPE\" TEXT," + // 24: objectType
+ "\"COLOR\" TEXT," + // 25: color
+ "\"IMAGE_PATH\" TEXT);"); // 26: imagePath
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, MarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String pipelineType = entity.getPipelineType();
+ if (pipelineType != null) {
+ stmt.bindString(2, pipelineType);
+ }
+
+ String pipelineDiameter = entity.getPipelineDiameter();
+ if (pipelineDiameter != null) {
+ stmt.bindString(3, pipelineDiameter);
+ }
+
+ String pipelineMaterial = entity.getPipelineMaterial();
+ if (pipelineMaterial != null) {
+ stmt.bindString(4, pipelineMaterial);
+ }
+
+ String buryMethod = entity.getBuryMethod();
+ if (buryMethod != null) {
+ stmt.bindString(5, buryMethod);
+ }
+
+ String buryDepth = entity.getBuryDepth();
+ if (buryDepth != null) {
+ stmt.bindString(6, buryDepth);
+ }
+
+ String area = entity.getArea();
+ if (area != null) {
+ stmt.bindString(7, area);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String road = entity.getRoad();
+ if (road != null) {
+ stmt.bindString(9, road);
+ }
+
+ String constructTime = entity.getConstructTime();
+ if (constructTime != null) {
+ stmt.bindString(10, constructTime);
+ }
+
+ String owner = entity.getOwner();
+ if (owner != null) {
+ stmt.bindString(11, owner);
+ }
+
+ String objectId = entity.getObjectId();
+ if (objectId != null) {
+ stmt.bindString(12, objectId);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(13, markerId);
+ }
+
+ String markerType = entity.getMarkerType();
+ if (markerType != null) {
+ stmt.bindString(14, markerType);
+ }
+
+ String markerDepth = entity.getMarkerDepth();
+ if (markerDepth != null) {
+ stmt.bindString(15, markerDepth);
+ }
+
+ String installationDept = entity.getInstallationDept();
+ if (installationDept != null) {
+ stmt.bindString(16, installationDept);
+ }
+
+ String lng = entity.getLng();
+ if (lng != null) {
+ stmt.bindString(17, lng);
+ }
+
+ String lat = entity.getLat();
+ if (lat != null) {
+ stmt.bindString(18, lat);
+ }
+
+ String updateTime = entity.getUpdateTime();
+ if (updateTime != null) {
+ stmt.bindString(19, updateTime);
+ }
+
+ String remark = entity.getRemark();
+ if (remark != null) {
+ stmt.bindString(20, remark);
+ }
+
+ String underlyingPipelineType = entity.getUnderlyingPipelineType();
+ if (underlyingPipelineType != null) {
+ stmt.bindString(21, underlyingPipelineType);
+ }
+
+ String underlyingPipelineDepth = entity.getUnderlyingPipelineDepth();
+ if (underlyingPipelineDepth != null) {
+ stmt.bindString(22, underlyingPipelineDepth);
+ }
+
+ String underlyingPipelineDiameter = entity.getUnderlyingPipelineDiameter();
+ if (underlyingPipelineDiameter != null) {
+ stmt.bindString(23, underlyingPipelineDiameter);
+ }
+
+ String underlyingPipelineMaterial = entity.getUnderlyingPipelineMaterial();
+ if (underlyingPipelineMaterial != null) {
+ stmt.bindString(24, underlyingPipelineMaterial);
+ }
+
+ String objectType = entity.getObjectType();
+ if (objectType != null) {
+ stmt.bindString(25, objectType);
+ }
+
+ String color = entity.getColor();
+ if (color != null) {
+ stmt.bindString(26, color);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(27, imagePath);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, MarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String pipelineType = entity.getPipelineType();
+ if (pipelineType != null) {
+ stmt.bindString(2, pipelineType);
+ }
+
+ String pipelineDiameter = entity.getPipelineDiameter();
+ if (pipelineDiameter != null) {
+ stmt.bindString(3, pipelineDiameter);
+ }
+
+ String pipelineMaterial = entity.getPipelineMaterial();
+ if (pipelineMaterial != null) {
+ stmt.bindString(4, pipelineMaterial);
+ }
+
+ String buryMethod = entity.getBuryMethod();
+ if (buryMethod != null) {
+ stmt.bindString(5, buryMethod);
+ }
+
+ String buryDepth = entity.getBuryDepth();
+ if (buryDepth != null) {
+ stmt.bindString(6, buryDepth);
+ }
+
+ String area = entity.getArea();
+ if (area != null) {
+ stmt.bindString(7, area);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String road = entity.getRoad();
+ if (road != null) {
+ stmt.bindString(9, road);
+ }
+
+ String constructTime = entity.getConstructTime();
+ if (constructTime != null) {
+ stmt.bindString(10, constructTime);
+ }
+
+ String owner = entity.getOwner();
+ if (owner != null) {
+ stmt.bindString(11, owner);
+ }
+
+ String objectId = entity.getObjectId();
+ if (objectId != null) {
+ stmt.bindString(12, objectId);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(13, markerId);
+ }
+
+ String markerType = entity.getMarkerType();
+ if (markerType != null) {
+ stmt.bindString(14, markerType);
+ }
+
+ String markerDepth = entity.getMarkerDepth();
+ if (markerDepth != null) {
+ stmt.bindString(15, markerDepth);
+ }
+
+ String installationDept = entity.getInstallationDept();
+ if (installationDept != null) {
+ stmt.bindString(16, installationDept);
+ }
+
+ String lng = entity.getLng();
+ if (lng != null) {
+ stmt.bindString(17, lng);
+ }
+
+ String lat = entity.getLat();
+ if (lat != null) {
+ stmt.bindString(18, lat);
+ }
+
+ String updateTime = entity.getUpdateTime();
+ if (updateTime != null) {
+ stmt.bindString(19, updateTime);
+ }
+
+ String remark = entity.getRemark();
+ if (remark != null) {
+ stmt.bindString(20, remark);
+ }
+
+ String underlyingPipelineType = entity.getUnderlyingPipelineType();
+ if (underlyingPipelineType != null) {
+ stmt.bindString(21, underlyingPipelineType);
+ }
+
+ String underlyingPipelineDepth = entity.getUnderlyingPipelineDepth();
+ if (underlyingPipelineDepth != null) {
+ stmt.bindString(22, underlyingPipelineDepth);
+ }
+
+ String underlyingPipelineDiameter = entity.getUnderlyingPipelineDiameter();
+ if (underlyingPipelineDiameter != null) {
+ stmt.bindString(23, underlyingPipelineDiameter);
+ }
+
+ String underlyingPipelineMaterial = entity.getUnderlyingPipelineMaterial();
+ if (underlyingPipelineMaterial != null) {
+ stmt.bindString(24, underlyingPipelineMaterial);
+ }
+
+ String objectType = entity.getObjectType();
+ if (objectType != null) {
+ stmt.bindString(25, objectType);
+ }
+
+ String color = entity.getColor();
+ if (color != null) {
+ stmt.bindString(26, color);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(27, imagePath);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public MarkerLocalBean readEntity(Cursor cursor, int offset) {
+ MarkerLocalBean entity = new MarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // pipelineType
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // pipelineDiameter
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // pipelineMaterial
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // buryMethod
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // buryDepth
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // area
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // road
+ cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // constructTime
+ cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // owner
+ cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // objectId
+ cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // markerId
+ cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // markerType
+ cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // markerDepth
+ cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // installationDept
+ cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // lng
+ cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lat
+ cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // updateTime
+ cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // remark
+ cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // underlyingPipelineType
+ cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // underlyingPipelineDepth
+ cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // underlyingPipelineDiameter
+ cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // underlyingPipelineMaterial
+ cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // objectType
+ cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // color
+ cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26) // imagePath
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, MarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setPipelineType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setPipelineDiameter(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setPipelineMaterial(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setBuryMethod(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setBuryDepth(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setArea(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setRoad(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ entity.setConstructTime(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
+ entity.setOwner(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
+ entity.setObjectId(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
+ entity.setMarkerId(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
+ entity.setMarkerType(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
+ entity.setMarkerDepth(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
+ entity.setInstallationDept(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
+ entity.setLng(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
+ entity.setLat(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
+ entity.setUpdateTime(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
+ entity.setRemark(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
+ entity.setUnderlyingPipelineType(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
+ entity.setUnderlyingPipelineDepth(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
+ entity.setUnderlyingPipelineDiameter(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
+ entity.setUnderlyingPipelineMaterial(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
+ entity.setObjectType(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
+ entity.setColor(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
+ entity.setImagePath(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(MarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(MarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(MarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
index 18b1b7b..9d99b8d 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
@@ -3,7 +3,7 @@
import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;
-import com.casic.electric.detector.bean.SmallLabelBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.Property;
@@ -12,10 +12,11 @@
import org.greenrobot.greendao.internal.DaoConfig;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-/**
+
+/**
* DAO for table "SMALL_LABEL_BEAN".
-*/
-public class SmallLabelBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property MarkerId = new Property(1, String.class, "markerId", false, "MARKER_ID");
+ public final static Property LocationNumber = new Property(2, String.class, "locationNumber", false, "LOCATION_NUMBER");
+ public final static Property LocationName = new Property(3, String.class, "locationName", false, "LOCATION_NAME");
+ public final static Property ElectricMarkerId = new Property(4, String.class, "electricMarkerId", false, "ELECTRIC_MARKER_ID");
+ public final static Property CableName = new Property(5, String.class, "cableName", false, "CABLE_NAME");
+ public final static Property CableNumber = new Property(6, String.class, "cableNumber", false, "CABLE_NUMBER");
+ public final static Property Line = new Property(7, String.class, "line", false, "LINE");
+ public final static Property VoltageLevel = new Property(8, String.class, "voltageLevel", false, "VOLTAGE_LEVEL");
+ public final static Property CableType = new Property(9, String.class, "cableType", false, "CABLE_TYPE");
+ public final static Property CableSpec = new Property(10, String.class, "cableSpec", false, "CABLE_SPEC");
+ public final static Property CableBrand = new Property(11, String.class, "cableBrand", false, "CABLE_BRAND");
+ public final static Property CableStart = new Property(12, String.class, "cableStart", false, "CABLE_START");
+ public final static Property CableEnd = new Property(13, String.class, "cableEnd", false, "CABLE_END");
+ public final static Property HasJoint = new Property(14, String.class, "hasJoint", false, "HAS_JOINT");
+ public final static Property JointCreator = new Property(15, String.class, "jointCreator", false, "JOINT_CREATOR");
+ public final static Property ImagePath = new Property(16, String.class, "imagePath", false, "IMAGE_PATH");
+ public final static Property Memo1 = new Property(17, String.class, "memo1", false, "MEMO1");
+ public final static Property Memo2 = new Property(18, String.class, "memo2", false, "MEMO2");
+ public final static Property Memo3 = new Property(19, String.class, "memo3", false, "MEMO3");
+ }
+
+
+ public SmallMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public SmallMarkerLocalBeanDao(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 + "\"SMALL_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
+ "\"MARKER_ID\" TEXT," + // 1: markerId
+ "\"LOCATION_NUMBER\" TEXT," + // 2: locationNumber
+ "\"LOCATION_NAME\" TEXT," + // 3: locationName
+ "\"ELECTRIC_MARKER_ID\" TEXT," + // 4: electricMarkerId
+ "\"CABLE_NAME\" TEXT," + // 5: cableName
+ "\"CABLE_NUMBER\" TEXT," + // 6: cableNumber
+ "\"LINE\" TEXT," + // 7: line
+ "\"VOLTAGE_LEVEL\" TEXT," + // 8: voltageLevel
+ "\"CABLE_TYPE\" TEXT," + // 9: cableType
+ "\"CABLE_SPEC\" TEXT," + // 10: cableSpec
+ "\"CABLE_BRAND\" TEXT," + // 11: cableBrand
+ "\"CABLE_START\" TEXT," + // 12: cableStart
+ "\"CABLE_END\" TEXT," + // 13: cableEnd
+ "\"HAS_JOINT\" TEXT," + // 14: hasJoint
+ "\"JOINT_CREATOR\" TEXT," + // 15: jointCreator
+ "\"IMAGE_PATH\" TEXT," + // 16: imagePath
+ "\"MEMO1\" TEXT," + // 17: memo1
+ "\"MEMO2\" TEXT," + // 18: memo2
+ "\"MEMO3\" TEXT);"); // 19: memo3
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"SMALL_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, SmallMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(2, markerId);
+ }
+
+ String locationNumber = entity.getLocationNumber();
+ if (locationNumber != null) {
+ stmt.bindString(3, locationNumber);
+ }
+
+ String locationName = entity.getLocationName();
+ if (locationName != null) {
+ stmt.bindString(4, locationName);
+ }
+
+ String electricMarkerId = entity.getElectricMarkerId();
+ if (electricMarkerId != null) {
+ stmt.bindString(5, electricMarkerId);
+ }
+
+ String cableName = entity.getCableName();
+ if (cableName != null) {
+ stmt.bindString(6, cableName);
+ }
+
+ String cableNumber = entity.getCableNumber();
+ if (cableNumber != null) {
+ stmt.bindString(7, cableNumber);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String voltageLevel = entity.getVoltageLevel();
+ if (voltageLevel != null) {
+ stmt.bindString(9, voltageLevel);
+ }
+
+ String cableType = entity.getCableType();
+ if (cableType != null) {
+ stmt.bindString(10, cableType);
+ }
+
+ String cableSpec = entity.getCableSpec();
+ if (cableSpec != null) {
+ stmt.bindString(11, cableSpec);
+ }
+
+ String cableBrand = entity.getCableBrand();
+ if (cableBrand != null) {
+ stmt.bindString(12, cableBrand);
+ }
+
+ String cableStart = entity.getCableStart();
+ if (cableStart != null) {
+ stmt.bindString(13, cableStart);
+ }
+
+ String cableEnd = entity.getCableEnd();
+ if (cableEnd != null) {
+ stmt.bindString(14, cableEnd);
+ }
+
+ String hasJoint = entity.getHasJoint();
+ if (hasJoint != null) {
+ stmt.bindString(15, hasJoint);
+ }
+
+ String jointCreator = entity.getJointCreator();
+ if (jointCreator != null) {
+ stmt.bindString(16, jointCreator);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(17, imagePath);
+ }
+
+ String memo1 = entity.getMemo1();
+ if (memo1 != null) {
+ stmt.bindString(18, memo1);
+ }
+
+ String memo2 = entity.getMemo2();
+ if (memo2 != null) {
+ stmt.bindString(19, memo2);
+ }
+
+ String memo3 = entity.getMemo3();
+ if (memo3 != null) {
+ stmt.bindString(20, memo3);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, SmallMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(2, markerId);
+ }
+
+ String locationNumber = entity.getLocationNumber();
+ if (locationNumber != null) {
+ stmt.bindString(3, locationNumber);
+ }
+
+ String locationName = entity.getLocationName();
+ if (locationName != null) {
+ stmt.bindString(4, locationName);
+ }
+
+ String electricMarkerId = entity.getElectricMarkerId();
+ if (electricMarkerId != null) {
+ stmt.bindString(5, electricMarkerId);
+ }
+
+ String cableName = entity.getCableName();
+ if (cableName != null) {
+ stmt.bindString(6, cableName);
+ }
+
+ String cableNumber = entity.getCableNumber();
+ if (cableNumber != null) {
+ stmt.bindString(7, cableNumber);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String voltageLevel = entity.getVoltageLevel();
+ if (voltageLevel != null) {
+ stmt.bindString(9, voltageLevel);
+ }
+
+ String cableType = entity.getCableType();
+ if (cableType != null) {
+ stmt.bindString(10, cableType);
+ }
+
+ String cableSpec = entity.getCableSpec();
+ if (cableSpec != null) {
+ stmt.bindString(11, cableSpec);
+ }
+
+ String cableBrand = entity.getCableBrand();
+ if (cableBrand != null) {
+ stmt.bindString(12, cableBrand);
+ }
+
+ String cableStart = entity.getCableStart();
+ if (cableStart != null) {
+ stmt.bindString(13, cableStart);
+ }
+
+ String cableEnd = entity.getCableEnd();
+ if (cableEnd != null) {
+ stmt.bindString(14, cableEnd);
+ }
+
+ String hasJoint = entity.getHasJoint();
+ if (hasJoint != null) {
+ stmt.bindString(15, hasJoint);
+ }
+
+ String jointCreator = entity.getJointCreator();
+ if (jointCreator != null) {
+ stmt.bindString(16, jointCreator);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(17, imagePath);
+ }
+
+ String memo1 = entity.getMemo1();
+ if (memo1 != null) {
+ stmt.bindString(18, memo1);
+ }
+
+ String memo2 = entity.getMemo2();
+ if (memo2 != null) {
+ stmt.bindString(19, memo2);
+ }
+
+ String memo3 = entity.getMemo3();
+ if (memo3 != null) {
+ stmt.bindString(20, memo3);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public SmallMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ SmallMarkerLocalBean entity = new SmallMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // locationNumber
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // locationName
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // electricMarkerId
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // cableName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // cableNumber
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // voltageLevel
+ cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // cableType
+ cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // cableSpec
+ cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // cableBrand
+ cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // cableStart
+ cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // cableEnd
+ cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // hasJoint
+ cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // jointCreator
+ cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // imagePath
+ cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // memo1
+ cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // memo2
+ cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19) // memo3
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, SmallMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setMarkerId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setLocationNumber(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setLocationName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setElectricMarkerId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCableName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setCableNumber(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setVoltageLevel(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ entity.setCableType(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
+ entity.setCableSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
+ entity.setCableBrand(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
+ entity.setCableStart(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
+ entity.setCableEnd(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
+ entity.setHasJoint(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
+ entity.setJointCreator(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
+ entity.setImagePath(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
+ entity.setMemo1(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
+ entity.setMemo2(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
+ entity.setMemo3(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(SmallMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(SmallMarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(SmallMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java
deleted file mode 100644
index 802ffb0..0000000
--- a/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java
+++ /dev/null
@@ -1,241 +0,0 @@
-package com.casic.electric.detector.greendao;
-
-import android.database.Cursor;
-import android.database.sqlite.SQLiteStatement;
-
-import com.casic.electric.detector.bean.TaskBean;
-
-import org.greenrobot.greendao.AbstractDao;
-import org.greenrobot.greendao.Property;
-import org.greenrobot.greendao.database.Database;
-import org.greenrobot.greendao.database.DatabaseStatement;
-import org.greenrobot.greendao.internal.DaoConfig;
-
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-/**
- * DAO for table "TASK_BEAN".
-*/
-public class TaskBeanDao extends AbstractDao
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property TaskId = new Property(1, String.class, "taskId", false, "TASK_ID");
- public final static Property TaskCode = new Property(2, String.class, "taskCode", false, "TASK_CODE");
- public final static Property MarkerId = new Property(3, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerRealId = new Property(4, String.class, "markerRealId", false, "MARKER_REAL_ID");
- public final static Property Scanner = new Property(5, String.class, "scanner", false, "SCANNER");
- public final static Property Lng = new Property(6, String.class, "lng", false, "LNG");
- public final static Property Lat = new Property(7, String.class, "lat", false, "LAT");
- public final static Property State = new Property(8, String.class, "state", false, "STATE");
- public final static Property Desc = new Property(9, String.class, "desc", false, "DESC");
- }
-
-
- public TaskBeanDao(DaoConfig config) {
- super(config);
- }
-
- public TaskBeanDao(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 + "\"TASK_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"TASK_ID\" TEXT," + // 1: taskId
- "\"TASK_CODE\" TEXT," + // 2: taskCode
- "\"MARKER_ID\" TEXT," + // 3: markerId
- "\"MARKER_REAL_ID\" TEXT," + // 4: markerRealId
- "\"SCANNER\" TEXT," + // 5: scanner
- "\"LNG\" TEXT," + // 6: lng
- "\"LAT\" TEXT," + // 7: lat
- "\"STATE\" TEXT," + // 8: state
- "\"DESC\" TEXT);"); // 9: desc
- }
-
- /** Drops the underlying database table. */
- public static void dropTable(Database db, boolean ifExists) {
- String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_BEAN\"";
- db.execSQL(sql);
- }
-
- @Override
- protected final void bindValues(DatabaseStatement stmt, TaskBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(2, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(3, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(4, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(5, markerRealId);
- }
-
- String scanner = entity.getScanner();
- if (scanner != null) {
- stmt.bindString(6, scanner);
- }
-
- String lng = entity.getLng();
- if (lng != null) {
- stmt.bindString(7, lng);
- }
-
- String lat = entity.getLat();
- if (lat != null) {
- stmt.bindString(8, lat);
- }
-
- String state = entity.getState();
- if (state != null) {
- stmt.bindString(9, state);
- }
-
- String desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(10, desc);
- }
- }
-
- @Override
- protected final void bindValues(SQLiteStatement stmt, TaskBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(2, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(3, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(4, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(5, markerRealId);
- }
-
- String scanner = entity.getScanner();
- if (scanner != null) {
- stmt.bindString(6, scanner);
- }
-
- String lng = entity.getLng();
- if (lng != null) {
- stmt.bindString(7, lng);
- }
-
- String lat = entity.getLat();
- if (lat != null) {
- stmt.bindString(8, lat);
- }
-
- String state = entity.getState();
- if (state != null) {
- stmt.bindString(9, state);
- }
-
- String desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(10, desc);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public TaskBean readEntity(Cursor cursor, int offset) {
- TaskBean entity = new TaskBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskId
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskCode
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // markerId
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // markerRealId
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // scanner
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // lng
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // lat
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // state
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9) // desc
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, TaskBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setTaskId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setTaskCode(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setMarkerId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setMarkerRealId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setScanner(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setLng(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLat(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setState(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setDesc(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(TaskBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(TaskBean entity) {
- if(entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(TaskBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java
new file mode 100644
index 0000000..330af6b
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java
@@ -0,0 +1,227 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.TaskLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "TASK_LOCAL_BEAN".
+*/
+public class TaskLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskCode = new Property(1, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property Description = new Property(2, String.class, "description", false, "DESCRIPTION");
+ public final static Property CreateTime = new Property(3, String.class, "createTime", false, "CREATE_TIME");
+ public final static Property Status = new Property(4, String.class, "status", false, "STATUS");
+ public final static Property CreateUserName = new Property(5, String.class, "createUserName", false, "CREATE_USER_NAME");
+ public final static Property StartTime = new Property(6, String.class, "startTime", false, "START_TIME");
+ public final static Property EndTime = new Property(7, String.class, "endTime", false, "END_TIME");
+ public final static Property IsFreeTask = new Property(8, String.class, "isFreeTask", false, "IS_FREE_TASK");
+ }
+
+
+ public TaskLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskLocalBeanDao(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 + "\"TASK_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_CODE\" TEXT," + // 1: taskCode
+ "\"DESCRIPTION\" TEXT," + // 2: description
+ "\"CREATE_TIME\" TEXT," + // 3: createTime
+ "\"STATUS\" TEXT," + // 4: status
+ "\"CREATE_USER_NAME\" TEXT," + // 5: createUserName
+ "\"START_TIME\" TEXT," + // 6: startTime
+ "\"END_TIME\" TEXT," + // 7: endTime
+ "\"IS_FREE_TASK\" TEXT);"); // 8: isFreeTask
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+
+ String isFreeTask = entity.getIsFreeTask();
+ if (isFreeTask != null) {
+ stmt.bindString(9, isFreeTask);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+
+ String isFreeTask = entity.getIsFreeTask();
+ if (isFreeTask != null) {
+ stmt.bindString(9, isFreeTask);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskLocalBean readEntity(Cursor cursor, int offset) {
+ TaskLocalBean entity = new TaskLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskCode
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // description
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // createTime
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // status
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // createUserName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // startTime
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // endTime
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8) // isFreeTask
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskCode(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setDescription(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setCreateTime(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setStatus(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCreateUserName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setStartTime(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setEndTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setIsFreeTask(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 167cf0c..93ec3d6 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -1,21 +1,21 @@
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property MarkerObjType = new Property(1, String.class, "markerObjType", false, "MARKER_OBJ_TYPE");
- public final static Property MarkerNumber = new Property(2, String.class, "markerNumber", false, "MARKER_NUMBER");
- public final static Property ObjectName = new Property(3, String.class, "objectName", false, "OBJECT_NAME");
- public final static Property VoltageLevel = new Property(4, String.class, "voltageLevel", false, "VOLTAGE_LEVEL");
- public final static Property TransformerModel = new Property(5, String.class, "transformerModel", false, "TRANSFORMER_MODEL");
- public final static Property HoleCount = new Property(6, String.class, "holeCount", false, "HOLE_COUNT");
- public final static Property Capacity = new Property(7, String.class, "capacity", false, "CAPACITY");
- public final static Property WellCoverMaterial = new Property(8, String.class, "wellCoverMaterial", false, "WELL_COVER_MATERIAL");
- public final static Property CoverDepth = new Property(9, String.class, "coverDepth", false, "COVER_DEPTH");
- public final static Property TransformerSpec = new Property(10, String.class, "transformerSpec", false, "TRANSFORMER_SPEC");
- public final static Property InlineName = new Property(11, String.class, "inlineName", false, "INLINE_NAME");
- public final static Property Size = new Property(12, String.class, "size", false, "SIZE");
- public final static Property BottomDepth = new Property(13, String.class, "bottomDepth", false, "BOTTOM_DEPTH");
- public final static Property Height = new Property(14, String.class, "height", false, "HEIGHT");
- public final static Property CrossPipeLine = new Property(15, String.class, "crossPipeLine", false, "CROSS_PIPE_LINE");
- public final static Property InlineCount = new Property(16, String.class, "inlineCount", false, "INLINE_COUNT");
- public final static Property LineNumber = new Property(17, String.class, "lineNumber", false, "LINE_NUMBER");
- public final static Property JointCount = new Property(18, String.class, "jointCount", false, "JOINT_COUNT");
- public final static Property OutlineCount = new Property(19, String.class, "outlineCount", false, "OUTLINE_COUNT");
- public final static Property RemainingChannels = new Property(20, String.class, "remainingChannels", false, "REMAINING_CHANNELS");
- public final static Property CabinetType = new Property(21, String.class, "cabinetType", false, "CABINET_TYPE");
- public final static Property TieCable1 = new Property(22, String.class, "tieCable1", false, "TIE_CABLE1");
- public final static Property TieCable2 = new Property(23, String.class, "tieCable2", false, "TIE_CABLE2");
- public final static Property CasingMaterial = new Property(24, String.class, "casingMaterial", false, "CASING_MATERIAL");
- public final static Property CasingSpec = new Property(25, String.class, "casingSpec", false, "CASING_SPEC");
- public final static Property ConstructTime = new Property(26, String.class, "constructTime", false, "CONSTRUCT_TIME");
- public final static Property InspectionUnit = new Property(27, String.class, "inspectionUnit", false, "INSPECTION_UNIT");
- public final static Property Area = new Property(28, String.class, "area", false, "AREA");
- public final static Property Road = new Property(29, String.class, "road", false, "ROAD");
- public final static Property Memo1 = new Property(30, String.class, "memo1", false, "MEMO1");
- public final static Property Memo2 = new Property(31, String.class, "memo2", false, "MEMO2");
- public final static Property Memo3 = new Property(32, String.class, "memo3", false, "MEMO3");
- public final static Property MarkerId = new Property(33, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerType = new Property(34, String.class, "markerType", false, "MARKER_TYPE");
- public final static Property Owner = new Property(35, String.class, "owner", false, "OWNER");
- public final static Property MarkerDepth = new Property(36, String.class, "markerDepth", false, "MARKER_DEPTH");
- public final static Property ElectricTagCount = new Property(37, String.class, "electricTagCount", false, "ELECTRIC_TAG_COUNT");
- public final static Property InstalledTime = new Property(38, String.class, "installedTime", false, "INSTALLED_TIME");
- public final static Property Longitude = new Property(39, String.class, "longitude", false, "LONGITUDE");
- public final static Property Latitude = new Property(40, String.class, "latitude", false, "LATITUDE");
- public final static Property MarkerMemo1 = new Property(41, String.class, "markerMemo1", false, "MARKER_MEMO1");
- public final static Property MarkerMemo2 = new Property(42, String.class, "markerMemo2", false, "MARKER_MEMO2");
- public final static Property MarkerMemo3 = new Property(43, String.class, "markerMemo3", false, "MARKER_MEMO3");
- public final static Property ImagePath = new Property(44, String.class, "imagePath", false, "IMAGE_PATH");
- }
-
-
- public LabelBeanDao(DaoConfig config) {
- super(config);
- }
-
- public LabelBeanDao(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 + "\"LABEL_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"MARKER_OBJ_TYPE\" TEXT," + // 1: markerObjType
- "\"MARKER_NUMBER\" TEXT," + // 2: markerNumber
- "\"OBJECT_NAME\" TEXT," + // 3: objectName
- "\"VOLTAGE_LEVEL\" TEXT," + // 4: voltageLevel
- "\"TRANSFORMER_MODEL\" TEXT," + // 5: transformerModel
- "\"HOLE_COUNT\" TEXT," + // 6: holeCount
- "\"CAPACITY\" TEXT," + // 7: capacity
- "\"WELL_COVER_MATERIAL\" TEXT," + // 8: wellCoverMaterial
- "\"COVER_DEPTH\" TEXT," + // 9: coverDepth
- "\"TRANSFORMER_SPEC\" TEXT," + // 10: transformerSpec
- "\"INLINE_NAME\" TEXT," + // 11: inlineName
- "\"SIZE\" TEXT," + // 12: size
- "\"BOTTOM_DEPTH\" TEXT," + // 13: bottomDepth
- "\"HEIGHT\" TEXT," + // 14: height
- "\"CROSS_PIPE_LINE\" TEXT," + // 15: crossPipeLine
- "\"INLINE_COUNT\" TEXT," + // 16: inlineCount
- "\"LINE_NUMBER\" TEXT," + // 17: lineNumber
- "\"JOINT_COUNT\" TEXT," + // 18: jointCount
- "\"OUTLINE_COUNT\" TEXT," + // 19: outlineCount
- "\"REMAINING_CHANNELS\" TEXT," + // 20: remainingChannels
- "\"CABINET_TYPE\" TEXT," + // 21: cabinetType
- "\"TIE_CABLE1\" TEXT," + // 22: tieCable1
- "\"TIE_CABLE2\" TEXT," + // 23: tieCable2
- "\"CASING_MATERIAL\" TEXT," + // 24: casingMaterial
- "\"CASING_SPEC\" TEXT," + // 25: casingSpec
- "\"CONSTRUCT_TIME\" TEXT," + // 26: constructTime
- "\"INSPECTION_UNIT\" TEXT," + // 27: inspectionUnit
- "\"AREA\" TEXT," + // 28: area
- "\"ROAD\" TEXT," + // 29: road
- "\"MEMO1\" TEXT," + // 30: memo1
- "\"MEMO2\" TEXT," + // 31: memo2
- "\"MEMO3\" TEXT," + // 32: memo3
- "\"MARKER_ID\" TEXT," + // 33: markerId
- "\"MARKER_TYPE\" TEXT," + // 34: markerType
- "\"OWNER\" TEXT," + // 35: owner
- "\"MARKER_DEPTH\" TEXT," + // 36: markerDepth
- "\"ELECTRIC_TAG_COUNT\" TEXT," + // 37: electricTagCount
- "\"INSTALLED_TIME\" TEXT," + // 38: installedTime
- "\"LONGITUDE\" TEXT," + // 39: longitude
- "\"LATITUDE\" TEXT," + // 40: latitude
- "\"MARKER_MEMO1\" TEXT," + // 41: markerMemo1
- "\"MARKER_MEMO2\" TEXT," + // 42: markerMemo2
- "\"MARKER_MEMO3\" TEXT," + // 43: markerMemo3
- "\"IMAGE_PATH\" TEXT);"); // 44: imagePath
- }
-
- /** Drops the underlying database table. */
- public static void dropTable(Database db, boolean ifExists) {
- String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"LABEL_BEAN\"";
- db.execSQL(sql);
- }
-
- @Override
- protected final void bindValues(DatabaseStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- protected final void bindValues(SQLiteStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public LabelBean readEntity(Cursor cursor, int offset) {
- LabelBean entity = new LabelBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerObjType
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // markerNumber
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // objectName
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // voltageLevel
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // transformerModel
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // holeCount
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // capacity
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // wellCoverMaterial
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // coverDepth
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // transformerSpec
- cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // inlineName
- cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // size
- cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // bottomDepth
- cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // height
- cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // crossPipeLine
- cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // inlineCount
- cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lineNumber
- cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // jointCount
- cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // outlineCount
- cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // remainingChannels
- cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // cabinetType
- cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // tieCable1
- cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // tieCable2
- cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // casingMaterial
- cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // casingSpec
- cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26), // constructTime
- cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27), // inspectionUnit
- cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28), // area
- cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29), // road
- cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30), // memo1
- cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31), // memo2
- cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32), // memo3
- cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33), // markerId
- cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34), // markerType
- cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35), // owner
- cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36), // markerDepth
- cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37), // electricTagCount
- cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38), // installedTime
- cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39), // longitude
- cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40), // latitude
- cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41), // markerMemo1
- cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42), // markerMemo2
- cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43), // markerMemo3
- cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44) // imagePath
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, LabelBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setMarkerObjType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setMarkerNumber(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setObjectName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setVoltageLevel(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setTransformerModel(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setHoleCount(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setCapacity(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setWellCoverMaterial(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setCoverDepth(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- entity.setTransformerSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
- entity.setInlineName(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
- entity.setSize(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
- entity.setBottomDepth(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
- entity.setHeight(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
- entity.setCrossPipeLine(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
- entity.setInlineCount(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
- entity.setLineNumber(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
- entity.setJointCount(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
- entity.setOutlineCount(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
- entity.setRemainingChannels(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
- entity.setCabinetType(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
- entity.setTieCable1(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
- entity.setTieCable2(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
- entity.setCasingMaterial(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
- entity.setCasingSpec(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
- entity.setConstructTime(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
- entity.setInspectionUnit(cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27));
- entity.setArea(cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28));
- entity.setRoad(cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29));
- entity.setMemo1(cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30));
- entity.setMemo2(cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31));
- entity.setMemo3(cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32));
- entity.setMarkerId(cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33));
- entity.setMarkerType(cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34));
- entity.setOwner(cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35));
- entity.setMarkerDepth(cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36));
- entity.setElectricTagCount(cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37));
- entity.setInstalledTime(cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38));
- entity.setLongitude(cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39));
- entity.setLatitude(cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40));
- entity.setMarkerMemo1(cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41));
- entity.setMarkerMemo2(cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42));
- entity.setMarkerMemo3(cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43));
- entity.setImagePath(cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(LabelBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(LabelBean entity) {
- if(entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(LabelBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java
new file mode 100644
index 0000000..9f2afa5
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java
@@ -0,0 +1,479 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.MarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "MARKER_LOCAL_BEAN".
+*/
+public class MarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property PipelineType = new Property(1, String.class, "pipelineType", false, "PIPELINE_TYPE");
+ public final static Property PipelineDiameter = new Property(2, String.class, "pipelineDiameter", false, "PIPELINE_DIAMETER");
+ public final static Property PipelineMaterial = new Property(3, String.class, "pipelineMaterial", false, "PIPELINE_MATERIAL");
+ public final static Property BuryMethod = new Property(4, String.class, "buryMethod", false, "BURY_METHOD");
+ public final static Property BuryDepth = new Property(5, String.class, "buryDepth", false, "BURY_DEPTH");
+ public final static Property Area = new Property(6, String.class, "area", false, "AREA");
+ public final static Property Line = new Property(7, String.class, "line", false, "LINE");
+ public final static Property Road = new Property(8, String.class, "road", false, "ROAD");
+ public final static Property ConstructTime = new Property(9, String.class, "constructTime", false, "CONSTRUCT_TIME");
+ public final static Property Owner = new Property(10, String.class, "owner", false, "OWNER");
+ public final static Property ObjectId = new Property(11, String.class, "objectId", false, "OBJECT_ID");
+ public final static Property MarkerId = new Property(12, String.class, "markerId", false, "MARKER_ID");
+ public final static Property MarkerType = new Property(13, String.class, "markerType", false, "MARKER_TYPE");
+ public final static Property MarkerDepth = new Property(14, String.class, "markerDepth", false, "MARKER_DEPTH");
+ public final static Property InstallationDept = new Property(15, String.class, "installationDept", false, "INSTALLATION_DEPT");
+ public final static Property Lng = new Property(16, String.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(17, String.class, "lat", false, "LAT");
+ public final static Property UpdateTime = new Property(18, String.class, "updateTime", false, "UPDATE_TIME");
+ public final static Property Remark = new Property(19, String.class, "remark", false, "REMARK");
+ public final static Property UnderlyingPipelineType = new Property(20, String.class, "underlyingPipelineType", false, "UNDERLYING_PIPELINE_TYPE");
+ public final static Property UnderlyingPipelineDepth = new Property(21, String.class, "underlyingPipelineDepth", false, "UNDERLYING_PIPELINE_DEPTH");
+ public final static Property UnderlyingPipelineDiameter = new Property(22, String.class, "underlyingPipelineDiameter", false, "UNDERLYING_PIPELINE_DIAMETER");
+ public final static Property UnderlyingPipelineMaterial = new Property(23, String.class, "underlyingPipelineMaterial", false, "UNDERLYING_PIPELINE_MATERIAL");
+ public final static Property ObjectType = new Property(24, String.class, "objectType", false, "OBJECT_TYPE");
+ public final static Property Color = new Property(25, String.class, "color", false, "COLOR");
+ public final static Property ImagePath = new Property(26, String.class, "imagePath", false, "IMAGE_PATH");
+ }
+
+
+ public MarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public MarkerLocalBeanDao(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 + "\"MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
+ "\"PIPELINE_TYPE\" TEXT," + // 1: pipelineType
+ "\"PIPELINE_DIAMETER\" TEXT," + // 2: pipelineDiameter
+ "\"PIPELINE_MATERIAL\" TEXT," + // 3: pipelineMaterial
+ "\"BURY_METHOD\" TEXT," + // 4: buryMethod
+ "\"BURY_DEPTH\" TEXT," + // 5: buryDepth
+ "\"AREA\" TEXT," + // 6: area
+ "\"LINE\" TEXT," + // 7: line
+ "\"ROAD\" TEXT," + // 8: road
+ "\"CONSTRUCT_TIME\" TEXT," + // 9: constructTime
+ "\"OWNER\" TEXT," + // 10: owner
+ "\"OBJECT_ID\" TEXT," + // 11: objectId
+ "\"MARKER_ID\" TEXT," + // 12: markerId
+ "\"MARKER_TYPE\" TEXT," + // 13: markerType
+ "\"MARKER_DEPTH\" TEXT," + // 14: markerDepth
+ "\"INSTALLATION_DEPT\" TEXT," + // 15: installationDept
+ "\"LNG\" TEXT," + // 16: lng
+ "\"LAT\" TEXT," + // 17: lat
+ "\"UPDATE_TIME\" TEXT," + // 18: updateTime
+ "\"REMARK\" TEXT," + // 19: remark
+ "\"UNDERLYING_PIPELINE_TYPE\" TEXT," + // 20: underlyingPipelineType
+ "\"UNDERLYING_PIPELINE_DEPTH\" TEXT," + // 21: underlyingPipelineDepth
+ "\"UNDERLYING_PIPELINE_DIAMETER\" TEXT," + // 22: underlyingPipelineDiameter
+ "\"UNDERLYING_PIPELINE_MATERIAL\" TEXT," + // 23: underlyingPipelineMaterial
+ "\"OBJECT_TYPE\" TEXT," + // 24: objectType
+ "\"COLOR\" TEXT," + // 25: color
+ "\"IMAGE_PATH\" TEXT);"); // 26: imagePath
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, MarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String pipelineType = entity.getPipelineType();
+ if (pipelineType != null) {
+ stmt.bindString(2, pipelineType);
+ }
+
+ String pipelineDiameter = entity.getPipelineDiameter();
+ if (pipelineDiameter != null) {
+ stmt.bindString(3, pipelineDiameter);
+ }
+
+ String pipelineMaterial = entity.getPipelineMaterial();
+ if (pipelineMaterial != null) {
+ stmt.bindString(4, pipelineMaterial);
+ }
+
+ String buryMethod = entity.getBuryMethod();
+ if (buryMethod != null) {
+ stmt.bindString(5, buryMethod);
+ }
+
+ String buryDepth = entity.getBuryDepth();
+ if (buryDepth != null) {
+ stmt.bindString(6, buryDepth);
+ }
+
+ String area = entity.getArea();
+ if (area != null) {
+ stmt.bindString(7, area);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String road = entity.getRoad();
+ if (road != null) {
+ stmt.bindString(9, road);
+ }
+
+ String constructTime = entity.getConstructTime();
+ if (constructTime != null) {
+ stmt.bindString(10, constructTime);
+ }
+
+ String owner = entity.getOwner();
+ if (owner != null) {
+ stmt.bindString(11, owner);
+ }
+
+ String objectId = entity.getObjectId();
+ if (objectId != null) {
+ stmt.bindString(12, objectId);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(13, markerId);
+ }
+
+ String markerType = entity.getMarkerType();
+ if (markerType != null) {
+ stmt.bindString(14, markerType);
+ }
+
+ String markerDepth = entity.getMarkerDepth();
+ if (markerDepth != null) {
+ stmt.bindString(15, markerDepth);
+ }
+
+ String installationDept = entity.getInstallationDept();
+ if (installationDept != null) {
+ stmt.bindString(16, installationDept);
+ }
+
+ String lng = entity.getLng();
+ if (lng != null) {
+ stmt.bindString(17, lng);
+ }
+
+ String lat = entity.getLat();
+ if (lat != null) {
+ stmt.bindString(18, lat);
+ }
+
+ String updateTime = entity.getUpdateTime();
+ if (updateTime != null) {
+ stmt.bindString(19, updateTime);
+ }
+
+ String remark = entity.getRemark();
+ if (remark != null) {
+ stmt.bindString(20, remark);
+ }
+
+ String underlyingPipelineType = entity.getUnderlyingPipelineType();
+ if (underlyingPipelineType != null) {
+ stmt.bindString(21, underlyingPipelineType);
+ }
+
+ String underlyingPipelineDepth = entity.getUnderlyingPipelineDepth();
+ if (underlyingPipelineDepth != null) {
+ stmt.bindString(22, underlyingPipelineDepth);
+ }
+
+ String underlyingPipelineDiameter = entity.getUnderlyingPipelineDiameter();
+ if (underlyingPipelineDiameter != null) {
+ stmt.bindString(23, underlyingPipelineDiameter);
+ }
+
+ String underlyingPipelineMaterial = entity.getUnderlyingPipelineMaterial();
+ if (underlyingPipelineMaterial != null) {
+ stmt.bindString(24, underlyingPipelineMaterial);
+ }
+
+ String objectType = entity.getObjectType();
+ if (objectType != null) {
+ stmt.bindString(25, objectType);
+ }
+
+ String color = entity.getColor();
+ if (color != null) {
+ stmt.bindString(26, color);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(27, imagePath);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, MarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String pipelineType = entity.getPipelineType();
+ if (pipelineType != null) {
+ stmt.bindString(2, pipelineType);
+ }
+
+ String pipelineDiameter = entity.getPipelineDiameter();
+ if (pipelineDiameter != null) {
+ stmt.bindString(3, pipelineDiameter);
+ }
+
+ String pipelineMaterial = entity.getPipelineMaterial();
+ if (pipelineMaterial != null) {
+ stmt.bindString(4, pipelineMaterial);
+ }
+
+ String buryMethod = entity.getBuryMethod();
+ if (buryMethod != null) {
+ stmt.bindString(5, buryMethod);
+ }
+
+ String buryDepth = entity.getBuryDepth();
+ if (buryDepth != null) {
+ stmt.bindString(6, buryDepth);
+ }
+
+ String area = entity.getArea();
+ if (area != null) {
+ stmt.bindString(7, area);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String road = entity.getRoad();
+ if (road != null) {
+ stmt.bindString(9, road);
+ }
+
+ String constructTime = entity.getConstructTime();
+ if (constructTime != null) {
+ stmt.bindString(10, constructTime);
+ }
+
+ String owner = entity.getOwner();
+ if (owner != null) {
+ stmt.bindString(11, owner);
+ }
+
+ String objectId = entity.getObjectId();
+ if (objectId != null) {
+ stmt.bindString(12, objectId);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(13, markerId);
+ }
+
+ String markerType = entity.getMarkerType();
+ if (markerType != null) {
+ stmt.bindString(14, markerType);
+ }
+
+ String markerDepth = entity.getMarkerDepth();
+ if (markerDepth != null) {
+ stmt.bindString(15, markerDepth);
+ }
+
+ String installationDept = entity.getInstallationDept();
+ if (installationDept != null) {
+ stmt.bindString(16, installationDept);
+ }
+
+ String lng = entity.getLng();
+ if (lng != null) {
+ stmt.bindString(17, lng);
+ }
+
+ String lat = entity.getLat();
+ if (lat != null) {
+ stmt.bindString(18, lat);
+ }
+
+ String updateTime = entity.getUpdateTime();
+ if (updateTime != null) {
+ stmt.bindString(19, updateTime);
+ }
+
+ String remark = entity.getRemark();
+ if (remark != null) {
+ stmt.bindString(20, remark);
+ }
+
+ String underlyingPipelineType = entity.getUnderlyingPipelineType();
+ if (underlyingPipelineType != null) {
+ stmt.bindString(21, underlyingPipelineType);
+ }
+
+ String underlyingPipelineDepth = entity.getUnderlyingPipelineDepth();
+ if (underlyingPipelineDepth != null) {
+ stmt.bindString(22, underlyingPipelineDepth);
+ }
+
+ String underlyingPipelineDiameter = entity.getUnderlyingPipelineDiameter();
+ if (underlyingPipelineDiameter != null) {
+ stmt.bindString(23, underlyingPipelineDiameter);
+ }
+
+ String underlyingPipelineMaterial = entity.getUnderlyingPipelineMaterial();
+ if (underlyingPipelineMaterial != null) {
+ stmt.bindString(24, underlyingPipelineMaterial);
+ }
+
+ String objectType = entity.getObjectType();
+ if (objectType != null) {
+ stmt.bindString(25, objectType);
+ }
+
+ String color = entity.getColor();
+ if (color != null) {
+ stmt.bindString(26, color);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(27, imagePath);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public MarkerLocalBean readEntity(Cursor cursor, int offset) {
+ MarkerLocalBean entity = new MarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // pipelineType
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // pipelineDiameter
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // pipelineMaterial
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // buryMethod
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // buryDepth
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // area
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // road
+ cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // constructTime
+ cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // owner
+ cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // objectId
+ cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // markerId
+ cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // markerType
+ cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // markerDepth
+ cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // installationDept
+ cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // lng
+ cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lat
+ cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // updateTime
+ cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // remark
+ cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // underlyingPipelineType
+ cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // underlyingPipelineDepth
+ cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // underlyingPipelineDiameter
+ cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // underlyingPipelineMaterial
+ cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // objectType
+ cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // color
+ cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26) // imagePath
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, MarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setPipelineType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setPipelineDiameter(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setPipelineMaterial(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setBuryMethod(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setBuryDepth(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setArea(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setRoad(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ entity.setConstructTime(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
+ entity.setOwner(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
+ entity.setObjectId(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
+ entity.setMarkerId(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
+ entity.setMarkerType(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
+ entity.setMarkerDepth(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
+ entity.setInstallationDept(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
+ entity.setLng(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
+ entity.setLat(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
+ entity.setUpdateTime(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
+ entity.setRemark(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
+ entity.setUnderlyingPipelineType(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
+ entity.setUnderlyingPipelineDepth(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
+ entity.setUnderlyingPipelineDiameter(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
+ entity.setUnderlyingPipelineMaterial(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
+ entity.setObjectType(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
+ entity.setColor(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
+ entity.setImagePath(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(MarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(MarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(MarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
index 18b1b7b..9d99b8d 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
@@ -3,7 +3,7 @@
import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;
-import com.casic.electric.detector.bean.SmallLabelBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.Property;
@@ -12,10 +12,11 @@
import org.greenrobot.greendao.internal.DaoConfig;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-/**
+
+/**
* DAO for table "SMALL_LABEL_BEAN".
-*/
-public class SmallLabelBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property MarkerId = new Property(1, String.class, "markerId", false, "MARKER_ID");
+ public final static Property LocationNumber = new Property(2, String.class, "locationNumber", false, "LOCATION_NUMBER");
+ public final static Property LocationName = new Property(3, String.class, "locationName", false, "LOCATION_NAME");
+ public final static Property ElectricMarkerId = new Property(4, String.class, "electricMarkerId", false, "ELECTRIC_MARKER_ID");
+ public final static Property CableName = new Property(5, String.class, "cableName", false, "CABLE_NAME");
+ public final static Property CableNumber = new Property(6, String.class, "cableNumber", false, "CABLE_NUMBER");
+ public final static Property Line = new Property(7, String.class, "line", false, "LINE");
+ public final static Property VoltageLevel = new Property(8, String.class, "voltageLevel", false, "VOLTAGE_LEVEL");
+ public final static Property CableType = new Property(9, String.class, "cableType", false, "CABLE_TYPE");
+ public final static Property CableSpec = new Property(10, String.class, "cableSpec", false, "CABLE_SPEC");
+ public final static Property CableBrand = new Property(11, String.class, "cableBrand", false, "CABLE_BRAND");
+ public final static Property CableStart = new Property(12, String.class, "cableStart", false, "CABLE_START");
+ public final static Property CableEnd = new Property(13, String.class, "cableEnd", false, "CABLE_END");
+ public final static Property HasJoint = new Property(14, String.class, "hasJoint", false, "HAS_JOINT");
+ public final static Property JointCreator = new Property(15, String.class, "jointCreator", false, "JOINT_CREATOR");
+ public final static Property ImagePath = new Property(16, String.class, "imagePath", false, "IMAGE_PATH");
+ public final static Property Memo1 = new Property(17, String.class, "memo1", false, "MEMO1");
+ public final static Property Memo2 = new Property(18, String.class, "memo2", false, "MEMO2");
+ public final static Property Memo3 = new Property(19, String.class, "memo3", false, "MEMO3");
+ }
+
+
+ public SmallMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public SmallMarkerLocalBeanDao(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 + "\"SMALL_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
+ "\"MARKER_ID\" TEXT," + // 1: markerId
+ "\"LOCATION_NUMBER\" TEXT," + // 2: locationNumber
+ "\"LOCATION_NAME\" TEXT," + // 3: locationName
+ "\"ELECTRIC_MARKER_ID\" TEXT," + // 4: electricMarkerId
+ "\"CABLE_NAME\" TEXT," + // 5: cableName
+ "\"CABLE_NUMBER\" TEXT," + // 6: cableNumber
+ "\"LINE\" TEXT," + // 7: line
+ "\"VOLTAGE_LEVEL\" TEXT," + // 8: voltageLevel
+ "\"CABLE_TYPE\" TEXT," + // 9: cableType
+ "\"CABLE_SPEC\" TEXT," + // 10: cableSpec
+ "\"CABLE_BRAND\" TEXT," + // 11: cableBrand
+ "\"CABLE_START\" TEXT," + // 12: cableStart
+ "\"CABLE_END\" TEXT," + // 13: cableEnd
+ "\"HAS_JOINT\" TEXT," + // 14: hasJoint
+ "\"JOINT_CREATOR\" TEXT," + // 15: jointCreator
+ "\"IMAGE_PATH\" TEXT," + // 16: imagePath
+ "\"MEMO1\" TEXT," + // 17: memo1
+ "\"MEMO2\" TEXT," + // 18: memo2
+ "\"MEMO3\" TEXT);"); // 19: memo3
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"SMALL_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, SmallMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(2, markerId);
+ }
+
+ String locationNumber = entity.getLocationNumber();
+ if (locationNumber != null) {
+ stmt.bindString(3, locationNumber);
+ }
+
+ String locationName = entity.getLocationName();
+ if (locationName != null) {
+ stmt.bindString(4, locationName);
+ }
+
+ String electricMarkerId = entity.getElectricMarkerId();
+ if (electricMarkerId != null) {
+ stmt.bindString(5, electricMarkerId);
+ }
+
+ String cableName = entity.getCableName();
+ if (cableName != null) {
+ stmt.bindString(6, cableName);
+ }
+
+ String cableNumber = entity.getCableNumber();
+ if (cableNumber != null) {
+ stmt.bindString(7, cableNumber);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String voltageLevel = entity.getVoltageLevel();
+ if (voltageLevel != null) {
+ stmt.bindString(9, voltageLevel);
+ }
+
+ String cableType = entity.getCableType();
+ if (cableType != null) {
+ stmt.bindString(10, cableType);
+ }
+
+ String cableSpec = entity.getCableSpec();
+ if (cableSpec != null) {
+ stmt.bindString(11, cableSpec);
+ }
+
+ String cableBrand = entity.getCableBrand();
+ if (cableBrand != null) {
+ stmt.bindString(12, cableBrand);
+ }
+
+ String cableStart = entity.getCableStart();
+ if (cableStart != null) {
+ stmt.bindString(13, cableStart);
+ }
+
+ String cableEnd = entity.getCableEnd();
+ if (cableEnd != null) {
+ stmt.bindString(14, cableEnd);
+ }
+
+ String hasJoint = entity.getHasJoint();
+ if (hasJoint != null) {
+ stmt.bindString(15, hasJoint);
+ }
+
+ String jointCreator = entity.getJointCreator();
+ if (jointCreator != null) {
+ stmt.bindString(16, jointCreator);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(17, imagePath);
+ }
+
+ String memo1 = entity.getMemo1();
+ if (memo1 != null) {
+ stmt.bindString(18, memo1);
+ }
+
+ String memo2 = entity.getMemo2();
+ if (memo2 != null) {
+ stmt.bindString(19, memo2);
+ }
+
+ String memo3 = entity.getMemo3();
+ if (memo3 != null) {
+ stmt.bindString(20, memo3);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, SmallMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(2, markerId);
+ }
+
+ String locationNumber = entity.getLocationNumber();
+ if (locationNumber != null) {
+ stmt.bindString(3, locationNumber);
+ }
+
+ String locationName = entity.getLocationName();
+ if (locationName != null) {
+ stmt.bindString(4, locationName);
+ }
+
+ String electricMarkerId = entity.getElectricMarkerId();
+ if (electricMarkerId != null) {
+ stmt.bindString(5, electricMarkerId);
+ }
+
+ String cableName = entity.getCableName();
+ if (cableName != null) {
+ stmt.bindString(6, cableName);
+ }
+
+ String cableNumber = entity.getCableNumber();
+ if (cableNumber != null) {
+ stmt.bindString(7, cableNumber);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String voltageLevel = entity.getVoltageLevel();
+ if (voltageLevel != null) {
+ stmt.bindString(9, voltageLevel);
+ }
+
+ String cableType = entity.getCableType();
+ if (cableType != null) {
+ stmt.bindString(10, cableType);
+ }
+
+ String cableSpec = entity.getCableSpec();
+ if (cableSpec != null) {
+ stmt.bindString(11, cableSpec);
+ }
+
+ String cableBrand = entity.getCableBrand();
+ if (cableBrand != null) {
+ stmt.bindString(12, cableBrand);
+ }
+
+ String cableStart = entity.getCableStart();
+ if (cableStart != null) {
+ stmt.bindString(13, cableStart);
+ }
+
+ String cableEnd = entity.getCableEnd();
+ if (cableEnd != null) {
+ stmt.bindString(14, cableEnd);
+ }
+
+ String hasJoint = entity.getHasJoint();
+ if (hasJoint != null) {
+ stmt.bindString(15, hasJoint);
+ }
+
+ String jointCreator = entity.getJointCreator();
+ if (jointCreator != null) {
+ stmt.bindString(16, jointCreator);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(17, imagePath);
+ }
+
+ String memo1 = entity.getMemo1();
+ if (memo1 != null) {
+ stmt.bindString(18, memo1);
+ }
+
+ String memo2 = entity.getMemo2();
+ if (memo2 != null) {
+ stmt.bindString(19, memo2);
+ }
+
+ String memo3 = entity.getMemo3();
+ if (memo3 != null) {
+ stmt.bindString(20, memo3);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public SmallMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ SmallMarkerLocalBean entity = new SmallMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // locationNumber
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // locationName
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // electricMarkerId
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // cableName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // cableNumber
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // voltageLevel
+ cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // cableType
+ cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // cableSpec
+ cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // cableBrand
+ cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // cableStart
+ cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // cableEnd
+ cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // hasJoint
+ cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // jointCreator
+ cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // imagePath
+ cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // memo1
+ cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // memo2
+ cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19) // memo3
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, SmallMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setMarkerId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setLocationNumber(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setLocationName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setElectricMarkerId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCableName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setCableNumber(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setVoltageLevel(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ entity.setCableType(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
+ entity.setCableSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
+ entity.setCableBrand(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
+ entity.setCableStart(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
+ entity.setCableEnd(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
+ entity.setHasJoint(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
+ entity.setJointCreator(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
+ entity.setImagePath(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
+ entity.setMemo1(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
+ entity.setMemo2(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
+ entity.setMemo3(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(SmallMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(SmallMarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(SmallMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java
deleted file mode 100644
index 802ffb0..0000000
--- a/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java
+++ /dev/null
@@ -1,241 +0,0 @@
-package com.casic.electric.detector.greendao;
-
-import android.database.Cursor;
-import android.database.sqlite.SQLiteStatement;
-
-import com.casic.electric.detector.bean.TaskBean;
-
-import org.greenrobot.greendao.AbstractDao;
-import org.greenrobot.greendao.Property;
-import org.greenrobot.greendao.database.Database;
-import org.greenrobot.greendao.database.DatabaseStatement;
-import org.greenrobot.greendao.internal.DaoConfig;
-
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-/**
- * DAO for table "TASK_BEAN".
-*/
-public class TaskBeanDao extends AbstractDao
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property TaskId = new Property(1, String.class, "taskId", false, "TASK_ID");
- public final static Property TaskCode = new Property(2, String.class, "taskCode", false, "TASK_CODE");
- public final static Property MarkerId = new Property(3, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerRealId = new Property(4, String.class, "markerRealId", false, "MARKER_REAL_ID");
- public final static Property Scanner = new Property(5, String.class, "scanner", false, "SCANNER");
- public final static Property Lng = new Property(6, String.class, "lng", false, "LNG");
- public final static Property Lat = new Property(7, String.class, "lat", false, "LAT");
- public final static Property State = new Property(8, String.class, "state", false, "STATE");
- public final static Property Desc = new Property(9, String.class, "desc", false, "DESC");
- }
-
-
- public TaskBeanDao(DaoConfig config) {
- super(config);
- }
-
- public TaskBeanDao(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 + "\"TASK_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"TASK_ID\" TEXT," + // 1: taskId
- "\"TASK_CODE\" TEXT," + // 2: taskCode
- "\"MARKER_ID\" TEXT," + // 3: markerId
- "\"MARKER_REAL_ID\" TEXT," + // 4: markerRealId
- "\"SCANNER\" TEXT," + // 5: scanner
- "\"LNG\" TEXT," + // 6: lng
- "\"LAT\" TEXT," + // 7: lat
- "\"STATE\" TEXT," + // 8: state
- "\"DESC\" TEXT);"); // 9: desc
- }
-
- /** Drops the underlying database table. */
- public static void dropTable(Database db, boolean ifExists) {
- String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_BEAN\"";
- db.execSQL(sql);
- }
-
- @Override
- protected final void bindValues(DatabaseStatement stmt, TaskBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(2, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(3, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(4, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(5, markerRealId);
- }
-
- String scanner = entity.getScanner();
- if (scanner != null) {
- stmt.bindString(6, scanner);
- }
-
- String lng = entity.getLng();
- if (lng != null) {
- stmt.bindString(7, lng);
- }
-
- String lat = entity.getLat();
- if (lat != null) {
- stmt.bindString(8, lat);
- }
-
- String state = entity.getState();
- if (state != null) {
- stmt.bindString(9, state);
- }
-
- String desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(10, desc);
- }
- }
-
- @Override
- protected final void bindValues(SQLiteStatement stmt, TaskBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(2, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(3, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(4, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(5, markerRealId);
- }
-
- String scanner = entity.getScanner();
- if (scanner != null) {
- stmt.bindString(6, scanner);
- }
-
- String lng = entity.getLng();
- if (lng != null) {
- stmt.bindString(7, lng);
- }
-
- String lat = entity.getLat();
- if (lat != null) {
- stmt.bindString(8, lat);
- }
-
- String state = entity.getState();
- if (state != null) {
- stmt.bindString(9, state);
- }
-
- String desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(10, desc);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public TaskBean readEntity(Cursor cursor, int offset) {
- TaskBean entity = new TaskBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskId
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskCode
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // markerId
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // markerRealId
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // scanner
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // lng
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // lat
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // state
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9) // desc
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, TaskBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setTaskId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setTaskCode(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setMarkerId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setMarkerRealId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setScanner(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setLng(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLat(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setState(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setDesc(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(TaskBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(TaskBean entity) {
- if(entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(TaskBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java
new file mode 100644
index 0000000..330af6b
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java
@@ -0,0 +1,227 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.TaskLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "TASK_LOCAL_BEAN".
+*/
+public class TaskLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskCode = new Property(1, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property Description = new Property(2, String.class, "description", false, "DESCRIPTION");
+ public final static Property CreateTime = new Property(3, String.class, "createTime", false, "CREATE_TIME");
+ public final static Property Status = new Property(4, String.class, "status", false, "STATUS");
+ public final static Property CreateUserName = new Property(5, String.class, "createUserName", false, "CREATE_USER_NAME");
+ public final static Property StartTime = new Property(6, String.class, "startTime", false, "START_TIME");
+ public final static Property EndTime = new Property(7, String.class, "endTime", false, "END_TIME");
+ public final static Property IsFreeTask = new Property(8, String.class, "isFreeTask", false, "IS_FREE_TASK");
+ }
+
+
+ public TaskLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskLocalBeanDao(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 + "\"TASK_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_CODE\" TEXT," + // 1: taskCode
+ "\"DESCRIPTION\" TEXT," + // 2: description
+ "\"CREATE_TIME\" TEXT," + // 3: createTime
+ "\"STATUS\" TEXT," + // 4: status
+ "\"CREATE_USER_NAME\" TEXT," + // 5: createUserName
+ "\"START_TIME\" TEXT," + // 6: startTime
+ "\"END_TIME\" TEXT," + // 7: endTime
+ "\"IS_FREE_TASK\" TEXT);"); // 8: isFreeTask
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+
+ String isFreeTask = entity.getIsFreeTask();
+ if (isFreeTask != null) {
+ stmt.bindString(9, isFreeTask);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+
+ String isFreeTask = entity.getIsFreeTask();
+ if (isFreeTask != null) {
+ stmt.bindString(9, isFreeTask);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskLocalBean readEntity(Cursor cursor, int offset) {
+ TaskLocalBean entity = new TaskLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskCode
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // description
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // createTime
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // status
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // createUserName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // startTime
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // endTime
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8) // isFreeTask
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskCode(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setDescription(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setCreateTime(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setStatus(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCreateUserName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setStartTime(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setEndTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setIsFreeTask(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskMarkerLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskMarkerLocalBeanDao.java
new file mode 100644
index 0000000..344c129
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/TaskMarkerLocalBeanDao.java
@@ -0,0 +1,197 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.TaskMarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "TASK_MARKER_LOCAL_BEAN".
+*/
+public class TaskMarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskId = new Property(1, String.class, "taskId", false, "TASK_ID");
+ public final static Property TaskCode = new Property(2, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property MarkerId = new Property(3, String.class, "markerId", false, "MARKER_ID");
+ public final static Property Lng = new Property(4, double.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(5, double.class, "lat", false, "LAT");
+ public final static Property IsDetected = new Property(6, String.class, "isDetected", false, "IS_DETECTED");
+ public final static Property DetectedTime = new Property(7, String.class, "detectedTime", false, "DETECTED_TIME");
+ }
+
+
+ public TaskMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskMarkerLocalBeanDao(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 + "\"TASK_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_ID\" TEXT," + // 1: taskId
+ "\"TASK_CODE\" TEXT," + // 2: taskCode
+ "\"MARKER_ID\" TEXT," + // 3: markerId
+ "\"LNG\" REAL NOT NULL ," + // 4: lng
+ "\"LAT\" REAL NOT NULL ," + // 5: lat
+ "\"IS_DETECTED\" TEXT," + // 6: isDetected
+ "\"DETECTED_TIME\" TEXT);"); // 7: detectedTime
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ TaskMarkerLocalBean entity = new TaskMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskCode
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // markerId
+ cursor.getDouble(offset + 4), // lng
+ cursor.getDouble(offset + 5), // lat
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // isDetected
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // detectedTime
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setTaskCode(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setMarkerId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setLng(cursor.getDouble(offset + 4));
+ entity.setLat(cursor.getDouble(offset + 5));
+ entity.setIsDetected(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setDetectedTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskMarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 167cf0c..93ec3d6 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -1,21 +1,21 @@
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property MarkerObjType = new Property(1, String.class, "markerObjType", false, "MARKER_OBJ_TYPE");
- public final static Property MarkerNumber = new Property(2, String.class, "markerNumber", false, "MARKER_NUMBER");
- public final static Property ObjectName = new Property(3, String.class, "objectName", false, "OBJECT_NAME");
- public final static Property VoltageLevel = new Property(4, String.class, "voltageLevel", false, "VOLTAGE_LEVEL");
- public final static Property TransformerModel = new Property(5, String.class, "transformerModel", false, "TRANSFORMER_MODEL");
- public final static Property HoleCount = new Property(6, String.class, "holeCount", false, "HOLE_COUNT");
- public final static Property Capacity = new Property(7, String.class, "capacity", false, "CAPACITY");
- public final static Property WellCoverMaterial = new Property(8, String.class, "wellCoverMaterial", false, "WELL_COVER_MATERIAL");
- public final static Property CoverDepth = new Property(9, String.class, "coverDepth", false, "COVER_DEPTH");
- public final static Property TransformerSpec = new Property(10, String.class, "transformerSpec", false, "TRANSFORMER_SPEC");
- public final static Property InlineName = new Property(11, String.class, "inlineName", false, "INLINE_NAME");
- public final static Property Size = new Property(12, String.class, "size", false, "SIZE");
- public final static Property BottomDepth = new Property(13, String.class, "bottomDepth", false, "BOTTOM_DEPTH");
- public final static Property Height = new Property(14, String.class, "height", false, "HEIGHT");
- public final static Property CrossPipeLine = new Property(15, String.class, "crossPipeLine", false, "CROSS_PIPE_LINE");
- public final static Property InlineCount = new Property(16, String.class, "inlineCount", false, "INLINE_COUNT");
- public final static Property LineNumber = new Property(17, String.class, "lineNumber", false, "LINE_NUMBER");
- public final static Property JointCount = new Property(18, String.class, "jointCount", false, "JOINT_COUNT");
- public final static Property OutlineCount = new Property(19, String.class, "outlineCount", false, "OUTLINE_COUNT");
- public final static Property RemainingChannels = new Property(20, String.class, "remainingChannels", false, "REMAINING_CHANNELS");
- public final static Property CabinetType = new Property(21, String.class, "cabinetType", false, "CABINET_TYPE");
- public final static Property TieCable1 = new Property(22, String.class, "tieCable1", false, "TIE_CABLE1");
- public final static Property TieCable2 = new Property(23, String.class, "tieCable2", false, "TIE_CABLE2");
- public final static Property CasingMaterial = new Property(24, String.class, "casingMaterial", false, "CASING_MATERIAL");
- public final static Property CasingSpec = new Property(25, String.class, "casingSpec", false, "CASING_SPEC");
- public final static Property ConstructTime = new Property(26, String.class, "constructTime", false, "CONSTRUCT_TIME");
- public final static Property InspectionUnit = new Property(27, String.class, "inspectionUnit", false, "INSPECTION_UNIT");
- public final static Property Area = new Property(28, String.class, "area", false, "AREA");
- public final static Property Road = new Property(29, String.class, "road", false, "ROAD");
- public final static Property Memo1 = new Property(30, String.class, "memo1", false, "MEMO1");
- public final static Property Memo2 = new Property(31, String.class, "memo2", false, "MEMO2");
- public final static Property Memo3 = new Property(32, String.class, "memo3", false, "MEMO3");
- public final static Property MarkerId = new Property(33, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerType = new Property(34, String.class, "markerType", false, "MARKER_TYPE");
- public final static Property Owner = new Property(35, String.class, "owner", false, "OWNER");
- public final static Property MarkerDepth = new Property(36, String.class, "markerDepth", false, "MARKER_DEPTH");
- public final static Property ElectricTagCount = new Property(37, String.class, "electricTagCount", false, "ELECTRIC_TAG_COUNT");
- public final static Property InstalledTime = new Property(38, String.class, "installedTime", false, "INSTALLED_TIME");
- public final static Property Longitude = new Property(39, String.class, "longitude", false, "LONGITUDE");
- public final static Property Latitude = new Property(40, String.class, "latitude", false, "LATITUDE");
- public final static Property MarkerMemo1 = new Property(41, String.class, "markerMemo1", false, "MARKER_MEMO1");
- public final static Property MarkerMemo2 = new Property(42, String.class, "markerMemo2", false, "MARKER_MEMO2");
- public final static Property MarkerMemo3 = new Property(43, String.class, "markerMemo3", false, "MARKER_MEMO3");
- public final static Property ImagePath = new Property(44, String.class, "imagePath", false, "IMAGE_PATH");
- }
-
-
- public LabelBeanDao(DaoConfig config) {
- super(config);
- }
-
- public LabelBeanDao(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 + "\"LABEL_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"MARKER_OBJ_TYPE\" TEXT," + // 1: markerObjType
- "\"MARKER_NUMBER\" TEXT," + // 2: markerNumber
- "\"OBJECT_NAME\" TEXT," + // 3: objectName
- "\"VOLTAGE_LEVEL\" TEXT," + // 4: voltageLevel
- "\"TRANSFORMER_MODEL\" TEXT," + // 5: transformerModel
- "\"HOLE_COUNT\" TEXT," + // 6: holeCount
- "\"CAPACITY\" TEXT," + // 7: capacity
- "\"WELL_COVER_MATERIAL\" TEXT," + // 8: wellCoverMaterial
- "\"COVER_DEPTH\" TEXT," + // 9: coverDepth
- "\"TRANSFORMER_SPEC\" TEXT," + // 10: transformerSpec
- "\"INLINE_NAME\" TEXT," + // 11: inlineName
- "\"SIZE\" TEXT," + // 12: size
- "\"BOTTOM_DEPTH\" TEXT," + // 13: bottomDepth
- "\"HEIGHT\" TEXT," + // 14: height
- "\"CROSS_PIPE_LINE\" TEXT," + // 15: crossPipeLine
- "\"INLINE_COUNT\" TEXT," + // 16: inlineCount
- "\"LINE_NUMBER\" TEXT," + // 17: lineNumber
- "\"JOINT_COUNT\" TEXT," + // 18: jointCount
- "\"OUTLINE_COUNT\" TEXT," + // 19: outlineCount
- "\"REMAINING_CHANNELS\" TEXT," + // 20: remainingChannels
- "\"CABINET_TYPE\" TEXT," + // 21: cabinetType
- "\"TIE_CABLE1\" TEXT," + // 22: tieCable1
- "\"TIE_CABLE2\" TEXT," + // 23: tieCable2
- "\"CASING_MATERIAL\" TEXT," + // 24: casingMaterial
- "\"CASING_SPEC\" TEXT," + // 25: casingSpec
- "\"CONSTRUCT_TIME\" TEXT," + // 26: constructTime
- "\"INSPECTION_UNIT\" TEXT," + // 27: inspectionUnit
- "\"AREA\" TEXT," + // 28: area
- "\"ROAD\" TEXT," + // 29: road
- "\"MEMO1\" TEXT," + // 30: memo1
- "\"MEMO2\" TEXT," + // 31: memo2
- "\"MEMO3\" TEXT," + // 32: memo3
- "\"MARKER_ID\" TEXT," + // 33: markerId
- "\"MARKER_TYPE\" TEXT," + // 34: markerType
- "\"OWNER\" TEXT," + // 35: owner
- "\"MARKER_DEPTH\" TEXT," + // 36: markerDepth
- "\"ELECTRIC_TAG_COUNT\" TEXT," + // 37: electricTagCount
- "\"INSTALLED_TIME\" TEXT," + // 38: installedTime
- "\"LONGITUDE\" TEXT," + // 39: longitude
- "\"LATITUDE\" TEXT," + // 40: latitude
- "\"MARKER_MEMO1\" TEXT," + // 41: markerMemo1
- "\"MARKER_MEMO2\" TEXT," + // 42: markerMemo2
- "\"MARKER_MEMO3\" TEXT," + // 43: markerMemo3
- "\"IMAGE_PATH\" TEXT);"); // 44: imagePath
- }
-
- /** Drops the underlying database table. */
- public static void dropTable(Database db, boolean ifExists) {
- String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"LABEL_BEAN\"";
- db.execSQL(sql);
- }
-
- @Override
- protected final void bindValues(DatabaseStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- protected final void bindValues(SQLiteStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public LabelBean readEntity(Cursor cursor, int offset) {
- LabelBean entity = new LabelBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerObjType
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // markerNumber
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // objectName
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // voltageLevel
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // transformerModel
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // holeCount
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // capacity
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // wellCoverMaterial
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // coverDepth
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // transformerSpec
- cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // inlineName
- cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // size
- cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // bottomDepth
- cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // height
- cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // crossPipeLine
- cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // inlineCount
- cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lineNumber
- cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // jointCount
- cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // outlineCount
- cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // remainingChannels
- cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // cabinetType
- cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // tieCable1
- cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // tieCable2
- cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // casingMaterial
- cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // casingSpec
- cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26), // constructTime
- cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27), // inspectionUnit
- cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28), // area
- cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29), // road
- cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30), // memo1
- cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31), // memo2
- cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32), // memo3
- cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33), // markerId
- cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34), // markerType
- cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35), // owner
- cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36), // markerDepth
- cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37), // electricTagCount
- cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38), // installedTime
- cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39), // longitude
- cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40), // latitude
- cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41), // markerMemo1
- cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42), // markerMemo2
- cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43), // markerMemo3
- cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44) // imagePath
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, LabelBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setMarkerObjType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setMarkerNumber(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setObjectName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setVoltageLevel(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setTransformerModel(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setHoleCount(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setCapacity(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setWellCoverMaterial(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setCoverDepth(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- entity.setTransformerSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
- entity.setInlineName(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
- entity.setSize(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
- entity.setBottomDepth(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
- entity.setHeight(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
- entity.setCrossPipeLine(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
- entity.setInlineCount(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
- entity.setLineNumber(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
- entity.setJointCount(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
- entity.setOutlineCount(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
- entity.setRemainingChannels(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
- entity.setCabinetType(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
- entity.setTieCable1(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
- entity.setTieCable2(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
- entity.setCasingMaterial(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
- entity.setCasingSpec(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
- entity.setConstructTime(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
- entity.setInspectionUnit(cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27));
- entity.setArea(cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28));
- entity.setRoad(cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29));
- entity.setMemo1(cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30));
- entity.setMemo2(cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31));
- entity.setMemo3(cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32));
- entity.setMarkerId(cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33));
- entity.setMarkerType(cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34));
- entity.setOwner(cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35));
- entity.setMarkerDepth(cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36));
- entity.setElectricTagCount(cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37));
- entity.setInstalledTime(cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38));
- entity.setLongitude(cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39));
- entity.setLatitude(cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40));
- entity.setMarkerMemo1(cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41));
- entity.setMarkerMemo2(cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42));
- entity.setMarkerMemo3(cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43));
- entity.setImagePath(cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(LabelBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(LabelBean entity) {
- if(entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(LabelBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java
new file mode 100644
index 0000000..9f2afa5
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java
@@ -0,0 +1,479 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.MarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "MARKER_LOCAL_BEAN".
+*/
+public class MarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property PipelineType = new Property(1, String.class, "pipelineType", false, "PIPELINE_TYPE");
+ public final static Property PipelineDiameter = new Property(2, String.class, "pipelineDiameter", false, "PIPELINE_DIAMETER");
+ public final static Property PipelineMaterial = new Property(3, String.class, "pipelineMaterial", false, "PIPELINE_MATERIAL");
+ public final static Property BuryMethod = new Property(4, String.class, "buryMethod", false, "BURY_METHOD");
+ public final static Property BuryDepth = new Property(5, String.class, "buryDepth", false, "BURY_DEPTH");
+ public final static Property Area = new Property(6, String.class, "area", false, "AREA");
+ public final static Property Line = new Property(7, String.class, "line", false, "LINE");
+ public final static Property Road = new Property(8, String.class, "road", false, "ROAD");
+ public final static Property ConstructTime = new Property(9, String.class, "constructTime", false, "CONSTRUCT_TIME");
+ public final static Property Owner = new Property(10, String.class, "owner", false, "OWNER");
+ public final static Property ObjectId = new Property(11, String.class, "objectId", false, "OBJECT_ID");
+ public final static Property MarkerId = new Property(12, String.class, "markerId", false, "MARKER_ID");
+ public final static Property MarkerType = new Property(13, String.class, "markerType", false, "MARKER_TYPE");
+ public final static Property MarkerDepth = new Property(14, String.class, "markerDepth", false, "MARKER_DEPTH");
+ public final static Property InstallationDept = new Property(15, String.class, "installationDept", false, "INSTALLATION_DEPT");
+ public final static Property Lng = new Property(16, String.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(17, String.class, "lat", false, "LAT");
+ public final static Property UpdateTime = new Property(18, String.class, "updateTime", false, "UPDATE_TIME");
+ public final static Property Remark = new Property(19, String.class, "remark", false, "REMARK");
+ public final static Property UnderlyingPipelineType = new Property(20, String.class, "underlyingPipelineType", false, "UNDERLYING_PIPELINE_TYPE");
+ public final static Property UnderlyingPipelineDepth = new Property(21, String.class, "underlyingPipelineDepth", false, "UNDERLYING_PIPELINE_DEPTH");
+ public final static Property UnderlyingPipelineDiameter = new Property(22, String.class, "underlyingPipelineDiameter", false, "UNDERLYING_PIPELINE_DIAMETER");
+ public final static Property UnderlyingPipelineMaterial = new Property(23, String.class, "underlyingPipelineMaterial", false, "UNDERLYING_PIPELINE_MATERIAL");
+ public final static Property ObjectType = new Property(24, String.class, "objectType", false, "OBJECT_TYPE");
+ public final static Property Color = new Property(25, String.class, "color", false, "COLOR");
+ public final static Property ImagePath = new Property(26, String.class, "imagePath", false, "IMAGE_PATH");
+ }
+
+
+ public MarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public MarkerLocalBeanDao(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 + "\"MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
+ "\"PIPELINE_TYPE\" TEXT," + // 1: pipelineType
+ "\"PIPELINE_DIAMETER\" TEXT," + // 2: pipelineDiameter
+ "\"PIPELINE_MATERIAL\" TEXT," + // 3: pipelineMaterial
+ "\"BURY_METHOD\" TEXT," + // 4: buryMethod
+ "\"BURY_DEPTH\" TEXT," + // 5: buryDepth
+ "\"AREA\" TEXT," + // 6: area
+ "\"LINE\" TEXT," + // 7: line
+ "\"ROAD\" TEXT," + // 8: road
+ "\"CONSTRUCT_TIME\" TEXT," + // 9: constructTime
+ "\"OWNER\" TEXT," + // 10: owner
+ "\"OBJECT_ID\" TEXT," + // 11: objectId
+ "\"MARKER_ID\" TEXT," + // 12: markerId
+ "\"MARKER_TYPE\" TEXT," + // 13: markerType
+ "\"MARKER_DEPTH\" TEXT," + // 14: markerDepth
+ "\"INSTALLATION_DEPT\" TEXT," + // 15: installationDept
+ "\"LNG\" TEXT," + // 16: lng
+ "\"LAT\" TEXT," + // 17: lat
+ "\"UPDATE_TIME\" TEXT," + // 18: updateTime
+ "\"REMARK\" TEXT," + // 19: remark
+ "\"UNDERLYING_PIPELINE_TYPE\" TEXT," + // 20: underlyingPipelineType
+ "\"UNDERLYING_PIPELINE_DEPTH\" TEXT," + // 21: underlyingPipelineDepth
+ "\"UNDERLYING_PIPELINE_DIAMETER\" TEXT," + // 22: underlyingPipelineDiameter
+ "\"UNDERLYING_PIPELINE_MATERIAL\" TEXT," + // 23: underlyingPipelineMaterial
+ "\"OBJECT_TYPE\" TEXT," + // 24: objectType
+ "\"COLOR\" TEXT," + // 25: color
+ "\"IMAGE_PATH\" TEXT);"); // 26: imagePath
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, MarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String pipelineType = entity.getPipelineType();
+ if (pipelineType != null) {
+ stmt.bindString(2, pipelineType);
+ }
+
+ String pipelineDiameter = entity.getPipelineDiameter();
+ if (pipelineDiameter != null) {
+ stmt.bindString(3, pipelineDiameter);
+ }
+
+ String pipelineMaterial = entity.getPipelineMaterial();
+ if (pipelineMaterial != null) {
+ stmt.bindString(4, pipelineMaterial);
+ }
+
+ String buryMethod = entity.getBuryMethod();
+ if (buryMethod != null) {
+ stmt.bindString(5, buryMethod);
+ }
+
+ String buryDepth = entity.getBuryDepth();
+ if (buryDepth != null) {
+ stmt.bindString(6, buryDepth);
+ }
+
+ String area = entity.getArea();
+ if (area != null) {
+ stmt.bindString(7, area);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String road = entity.getRoad();
+ if (road != null) {
+ stmt.bindString(9, road);
+ }
+
+ String constructTime = entity.getConstructTime();
+ if (constructTime != null) {
+ stmt.bindString(10, constructTime);
+ }
+
+ String owner = entity.getOwner();
+ if (owner != null) {
+ stmt.bindString(11, owner);
+ }
+
+ String objectId = entity.getObjectId();
+ if (objectId != null) {
+ stmt.bindString(12, objectId);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(13, markerId);
+ }
+
+ String markerType = entity.getMarkerType();
+ if (markerType != null) {
+ stmt.bindString(14, markerType);
+ }
+
+ String markerDepth = entity.getMarkerDepth();
+ if (markerDepth != null) {
+ stmt.bindString(15, markerDepth);
+ }
+
+ String installationDept = entity.getInstallationDept();
+ if (installationDept != null) {
+ stmt.bindString(16, installationDept);
+ }
+
+ String lng = entity.getLng();
+ if (lng != null) {
+ stmt.bindString(17, lng);
+ }
+
+ String lat = entity.getLat();
+ if (lat != null) {
+ stmt.bindString(18, lat);
+ }
+
+ String updateTime = entity.getUpdateTime();
+ if (updateTime != null) {
+ stmt.bindString(19, updateTime);
+ }
+
+ String remark = entity.getRemark();
+ if (remark != null) {
+ stmt.bindString(20, remark);
+ }
+
+ String underlyingPipelineType = entity.getUnderlyingPipelineType();
+ if (underlyingPipelineType != null) {
+ stmt.bindString(21, underlyingPipelineType);
+ }
+
+ String underlyingPipelineDepth = entity.getUnderlyingPipelineDepth();
+ if (underlyingPipelineDepth != null) {
+ stmt.bindString(22, underlyingPipelineDepth);
+ }
+
+ String underlyingPipelineDiameter = entity.getUnderlyingPipelineDiameter();
+ if (underlyingPipelineDiameter != null) {
+ stmt.bindString(23, underlyingPipelineDiameter);
+ }
+
+ String underlyingPipelineMaterial = entity.getUnderlyingPipelineMaterial();
+ if (underlyingPipelineMaterial != null) {
+ stmt.bindString(24, underlyingPipelineMaterial);
+ }
+
+ String objectType = entity.getObjectType();
+ if (objectType != null) {
+ stmt.bindString(25, objectType);
+ }
+
+ String color = entity.getColor();
+ if (color != null) {
+ stmt.bindString(26, color);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(27, imagePath);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, MarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String pipelineType = entity.getPipelineType();
+ if (pipelineType != null) {
+ stmt.bindString(2, pipelineType);
+ }
+
+ String pipelineDiameter = entity.getPipelineDiameter();
+ if (pipelineDiameter != null) {
+ stmt.bindString(3, pipelineDiameter);
+ }
+
+ String pipelineMaterial = entity.getPipelineMaterial();
+ if (pipelineMaterial != null) {
+ stmt.bindString(4, pipelineMaterial);
+ }
+
+ String buryMethod = entity.getBuryMethod();
+ if (buryMethod != null) {
+ stmt.bindString(5, buryMethod);
+ }
+
+ String buryDepth = entity.getBuryDepth();
+ if (buryDepth != null) {
+ stmt.bindString(6, buryDepth);
+ }
+
+ String area = entity.getArea();
+ if (area != null) {
+ stmt.bindString(7, area);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String road = entity.getRoad();
+ if (road != null) {
+ stmt.bindString(9, road);
+ }
+
+ String constructTime = entity.getConstructTime();
+ if (constructTime != null) {
+ stmt.bindString(10, constructTime);
+ }
+
+ String owner = entity.getOwner();
+ if (owner != null) {
+ stmt.bindString(11, owner);
+ }
+
+ String objectId = entity.getObjectId();
+ if (objectId != null) {
+ stmt.bindString(12, objectId);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(13, markerId);
+ }
+
+ String markerType = entity.getMarkerType();
+ if (markerType != null) {
+ stmt.bindString(14, markerType);
+ }
+
+ String markerDepth = entity.getMarkerDepth();
+ if (markerDepth != null) {
+ stmt.bindString(15, markerDepth);
+ }
+
+ String installationDept = entity.getInstallationDept();
+ if (installationDept != null) {
+ stmt.bindString(16, installationDept);
+ }
+
+ String lng = entity.getLng();
+ if (lng != null) {
+ stmt.bindString(17, lng);
+ }
+
+ String lat = entity.getLat();
+ if (lat != null) {
+ stmt.bindString(18, lat);
+ }
+
+ String updateTime = entity.getUpdateTime();
+ if (updateTime != null) {
+ stmt.bindString(19, updateTime);
+ }
+
+ String remark = entity.getRemark();
+ if (remark != null) {
+ stmt.bindString(20, remark);
+ }
+
+ String underlyingPipelineType = entity.getUnderlyingPipelineType();
+ if (underlyingPipelineType != null) {
+ stmt.bindString(21, underlyingPipelineType);
+ }
+
+ String underlyingPipelineDepth = entity.getUnderlyingPipelineDepth();
+ if (underlyingPipelineDepth != null) {
+ stmt.bindString(22, underlyingPipelineDepth);
+ }
+
+ String underlyingPipelineDiameter = entity.getUnderlyingPipelineDiameter();
+ if (underlyingPipelineDiameter != null) {
+ stmt.bindString(23, underlyingPipelineDiameter);
+ }
+
+ String underlyingPipelineMaterial = entity.getUnderlyingPipelineMaterial();
+ if (underlyingPipelineMaterial != null) {
+ stmt.bindString(24, underlyingPipelineMaterial);
+ }
+
+ String objectType = entity.getObjectType();
+ if (objectType != null) {
+ stmt.bindString(25, objectType);
+ }
+
+ String color = entity.getColor();
+ if (color != null) {
+ stmt.bindString(26, color);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(27, imagePath);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public MarkerLocalBean readEntity(Cursor cursor, int offset) {
+ MarkerLocalBean entity = new MarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // pipelineType
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // pipelineDiameter
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // pipelineMaterial
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // buryMethod
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // buryDepth
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // area
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // road
+ cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // constructTime
+ cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // owner
+ cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // objectId
+ cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // markerId
+ cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // markerType
+ cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // markerDepth
+ cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // installationDept
+ cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // lng
+ cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lat
+ cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // updateTime
+ cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // remark
+ cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // underlyingPipelineType
+ cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // underlyingPipelineDepth
+ cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // underlyingPipelineDiameter
+ cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // underlyingPipelineMaterial
+ cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // objectType
+ cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // color
+ cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26) // imagePath
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, MarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setPipelineType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setPipelineDiameter(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setPipelineMaterial(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setBuryMethod(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setBuryDepth(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setArea(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setRoad(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ entity.setConstructTime(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
+ entity.setOwner(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
+ entity.setObjectId(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
+ entity.setMarkerId(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
+ entity.setMarkerType(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
+ entity.setMarkerDepth(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
+ entity.setInstallationDept(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
+ entity.setLng(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
+ entity.setLat(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
+ entity.setUpdateTime(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
+ entity.setRemark(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
+ entity.setUnderlyingPipelineType(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
+ entity.setUnderlyingPipelineDepth(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
+ entity.setUnderlyingPipelineDiameter(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
+ entity.setUnderlyingPipelineMaterial(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
+ entity.setObjectType(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
+ entity.setColor(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
+ entity.setImagePath(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(MarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(MarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(MarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
index 18b1b7b..9d99b8d 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
@@ -3,7 +3,7 @@
import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;
-import com.casic.electric.detector.bean.SmallLabelBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.Property;
@@ -12,10 +12,11 @@
import org.greenrobot.greendao.internal.DaoConfig;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-/**
+
+/**
* DAO for table "SMALL_LABEL_BEAN".
-*/
-public class SmallLabelBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property MarkerId = new Property(1, String.class, "markerId", false, "MARKER_ID");
+ public final static Property LocationNumber = new Property(2, String.class, "locationNumber", false, "LOCATION_NUMBER");
+ public final static Property LocationName = new Property(3, String.class, "locationName", false, "LOCATION_NAME");
+ public final static Property ElectricMarkerId = new Property(4, String.class, "electricMarkerId", false, "ELECTRIC_MARKER_ID");
+ public final static Property CableName = new Property(5, String.class, "cableName", false, "CABLE_NAME");
+ public final static Property CableNumber = new Property(6, String.class, "cableNumber", false, "CABLE_NUMBER");
+ public final static Property Line = new Property(7, String.class, "line", false, "LINE");
+ public final static Property VoltageLevel = new Property(8, String.class, "voltageLevel", false, "VOLTAGE_LEVEL");
+ public final static Property CableType = new Property(9, String.class, "cableType", false, "CABLE_TYPE");
+ public final static Property CableSpec = new Property(10, String.class, "cableSpec", false, "CABLE_SPEC");
+ public final static Property CableBrand = new Property(11, String.class, "cableBrand", false, "CABLE_BRAND");
+ public final static Property CableStart = new Property(12, String.class, "cableStart", false, "CABLE_START");
+ public final static Property CableEnd = new Property(13, String.class, "cableEnd", false, "CABLE_END");
+ public final static Property HasJoint = new Property(14, String.class, "hasJoint", false, "HAS_JOINT");
+ public final static Property JointCreator = new Property(15, String.class, "jointCreator", false, "JOINT_CREATOR");
+ public final static Property ImagePath = new Property(16, String.class, "imagePath", false, "IMAGE_PATH");
+ public final static Property Memo1 = new Property(17, String.class, "memo1", false, "MEMO1");
+ public final static Property Memo2 = new Property(18, String.class, "memo2", false, "MEMO2");
+ public final static Property Memo3 = new Property(19, String.class, "memo3", false, "MEMO3");
+ }
+
+
+ public SmallMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public SmallMarkerLocalBeanDao(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 + "\"SMALL_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
+ "\"MARKER_ID\" TEXT," + // 1: markerId
+ "\"LOCATION_NUMBER\" TEXT," + // 2: locationNumber
+ "\"LOCATION_NAME\" TEXT," + // 3: locationName
+ "\"ELECTRIC_MARKER_ID\" TEXT," + // 4: electricMarkerId
+ "\"CABLE_NAME\" TEXT," + // 5: cableName
+ "\"CABLE_NUMBER\" TEXT," + // 6: cableNumber
+ "\"LINE\" TEXT," + // 7: line
+ "\"VOLTAGE_LEVEL\" TEXT," + // 8: voltageLevel
+ "\"CABLE_TYPE\" TEXT," + // 9: cableType
+ "\"CABLE_SPEC\" TEXT," + // 10: cableSpec
+ "\"CABLE_BRAND\" TEXT," + // 11: cableBrand
+ "\"CABLE_START\" TEXT," + // 12: cableStart
+ "\"CABLE_END\" TEXT," + // 13: cableEnd
+ "\"HAS_JOINT\" TEXT," + // 14: hasJoint
+ "\"JOINT_CREATOR\" TEXT," + // 15: jointCreator
+ "\"IMAGE_PATH\" TEXT," + // 16: imagePath
+ "\"MEMO1\" TEXT," + // 17: memo1
+ "\"MEMO2\" TEXT," + // 18: memo2
+ "\"MEMO3\" TEXT);"); // 19: memo3
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"SMALL_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, SmallMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(2, markerId);
+ }
+
+ String locationNumber = entity.getLocationNumber();
+ if (locationNumber != null) {
+ stmt.bindString(3, locationNumber);
+ }
+
+ String locationName = entity.getLocationName();
+ if (locationName != null) {
+ stmt.bindString(4, locationName);
+ }
+
+ String electricMarkerId = entity.getElectricMarkerId();
+ if (electricMarkerId != null) {
+ stmt.bindString(5, electricMarkerId);
+ }
+
+ String cableName = entity.getCableName();
+ if (cableName != null) {
+ stmt.bindString(6, cableName);
+ }
+
+ String cableNumber = entity.getCableNumber();
+ if (cableNumber != null) {
+ stmt.bindString(7, cableNumber);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String voltageLevel = entity.getVoltageLevel();
+ if (voltageLevel != null) {
+ stmt.bindString(9, voltageLevel);
+ }
+
+ String cableType = entity.getCableType();
+ if (cableType != null) {
+ stmt.bindString(10, cableType);
+ }
+
+ String cableSpec = entity.getCableSpec();
+ if (cableSpec != null) {
+ stmt.bindString(11, cableSpec);
+ }
+
+ String cableBrand = entity.getCableBrand();
+ if (cableBrand != null) {
+ stmt.bindString(12, cableBrand);
+ }
+
+ String cableStart = entity.getCableStart();
+ if (cableStart != null) {
+ stmt.bindString(13, cableStart);
+ }
+
+ String cableEnd = entity.getCableEnd();
+ if (cableEnd != null) {
+ stmt.bindString(14, cableEnd);
+ }
+
+ String hasJoint = entity.getHasJoint();
+ if (hasJoint != null) {
+ stmt.bindString(15, hasJoint);
+ }
+
+ String jointCreator = entity.getJointCreator();
+ if (jointCreator != null) {
+ stmt.bindString(16, jointCreator);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(17, imagePath);
+ }
+
+ String memo1 = entity.getMemo1();
+ if (memo1 != null) {
+ stmt.bindString(18, memo1);
+ }
+
+ String memo2 = entity.getMemo2();
+ if (memo2 != null) {
+ stmt.bindString(19, memo2);
+ }
+
+ String memo3 = entity.getMemo3();
+ if (memo3 != null) {
+ stmt.bindString(20, memo3);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, SmallMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(2, markerId);
+ }
+
+ String locationNumber = entity.getLocationNumber();
+ if (locationNumber != null) {
+ stmt.bindString(3, locationNumber);
+ }
+
+ String locationName = entity.getLocationName();
+ if (locationName != null) {
+ stmt.bindString(4, locationName);
+ }
+
+ String electricMarkerId = entity.getElectricMarkerId();
+ if (electricMarkerId != null) {
+ stmt.bindString(5, electricMarkerId);
+ }
+
+ String cableName = entity.getCableName();
+ if (cableName != null) {
+ stmt.bindString(6, cableName);
+ }
+
+ String cableNumber = entity.getCableNumber();
+ if (cableNumber != null) {
+ stmt.bindString(7, cableNumber);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String voltageLevel = entity.getVoltageLevel();
+ if (voltageLevel != null) {
+ stmt.bindString(9, voltageLevel);
+ }
+
+ String cableType = entity.getCableType();
+ if (cableType != null) {
+ stmt.bindString(10, cableType);
+ }
+
+ String cableSpec = entity.getCableSpec();
+ if (cableSpec != null) {
+ stmt.bindString(11, cableSpec);
+ }
+
+ String cableBrand = entity.getCableBrand();
+ if (cableBrand != null) {
+ stmt.bindString(12, cableBrand);
+ }
+
+ String cableStart = entity.getCableStart();
+ if (cableStart != null) {
+ stmt.bindString(13, cableStart);
+ }
+
+ String cableEnd = entity.getCableEnd();
+ if (cableEnd != null) {
+ stmt.bindString(14, cableEnd);
+ }
+
+ String hasJoint = entity.getHasJoint();
+ if (hasJoint != null) {
+ stmt.bindString(15, hasJoint);
+ }
+
+ String jointCreator = entity.getJointCreator();
+ if (jointCreator != null) {
+ stmt.bindString(16, jointCreator);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(17, imagePath);
+ }
+
+ String memo1 = entity.getMemo1();
+ if (memo1 != null) {
+ stmt.bindString(18, memo1);
+ }
+
+ String memo2 = entity.getMemo2();
+ if (memo2 != null) {
+ stmt.bindString(19, memo2);
+ }
+
+ String memo3 = entity.getMemo3();
+ if (memo3 != null) {
+ stmt.bindString(20, memo3);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public SmallMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ SmallMarkerLocalBean entity = new SmallMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // locationNumber
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // locationName
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // electricMarkerId
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // cableName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // cableNumber
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // voltageLevel
+ cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // cableType
+ cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // cableSpec
+ cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // cableBrand
+ cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // cableStart
+ cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // cableEnd
+ cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // hasJoint
+ cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // jointCreator
+ cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // imagePath
+ cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // memo1
+ cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // memo2
+ cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19) // memo3
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, SmallMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setMarkerId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setLocationNumber(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setLocationName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setElectricMarkerId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCableName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setCableNumber(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setVoltageLevel(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ entity.setCableType(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
+ entity.setCableSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
+ entity.setCableBrand(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
+ entity.setCableStart(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
+ entity.setCableEnd(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
+ entity.setHasJoint(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
+ entity.setJointCreator(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
+ entity.setImagePath(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
+ entity.setMemo1(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
+ entity.setMemo2(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
+ entity.setMemo3(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(SmallMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(SmallMarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(SmallMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java
deleted file mode 100644
index 802ffb0..0000000
--- a/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java
+++ /dev/null
@@ -1,241 +0,0 @@
-package com.casic.electric.detector.greendao;
-
-import android.database.Cursor;
-import android.database.sqlite.SQLiteStatement;
-
-import com.casic.electric.detector.bean.TaskBean;
-
-import org.greenrobot.greendao.AbstractDao;
-import org.greenrobot.greendao.Property;
-import org.greenrobot.greendao.database.Database;
-import org.greenrobot.greendao.database.DatabaseStatement;
-import org.greenrobot.greendao.internal.DaoConfig;
-
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-/**
- * DAO for table "TASK_BEAN".
-*/
-public class TaskBeanDao extends AbstractDao
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property TaskId = new Property(1, String.class, "taskId", false, "TASK_ID");
- public final static Property TaskCode = new Property(2, String.class, "taskCode", false, "TASK_CODE");
- public final static Property MarkerId = new Property(3, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerRealId = new Property(4, String.class, "markerRealId", false, "MARKER_REAL_ID");
- public final static Property Scanner = new Property(5, String.class, "scanner", false, "SCANNER");
- public final static Property Lng = new Property(6, String.class, "lng", false, "LNG");
- public final static Property Lat = new Property(7, String.class, "lat", false, "LAT");
- public final static Property State = new Property(8, String.class, "state", false, "STATE");
- public final static Property Desc = new Property(9, String.class, "desc", false, "DESC");
- }
-
-
- public TaskBeanDao(DaoConfig config) {
- super(config);
- }
-
- public TaskBeanDao(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 + "\"TASK_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"TASK_ID\" TEXT," + // 1: taskId
- "\"TASK_CODE\" TEXT," + // 2: taskCode
- "\"MARKER_ID\" TEXT," + // 3: markerId
- "\"MARKER_REAL_ID\" TEXT," + // 4: markerRealId
- "\"SCANNER\" TEXT," + // 5: scanner
- "\"LNG\" TEXT," + // 6: lng
- "\"LAT\" TEXT," + // 7: lat
- "\"STATE\" TEXT," + // 8: state
- "\"DESC\" TEXT);"); // 9: desc
- }
-
- /** Drops the underlying database table. */
- public static void dropTable(Database db, boolean ifExists) {
- String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_BEAN\"";
- db.execSQL(sql);
- }
-
- @Override
- protected final void bindValues(DatabaseStatement stmt, TaskBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(2, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(3, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(4, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(5, markerRealId);
- }
-
- String scanner = entity.getScanner();
- if (scanner != null) {
- stmt.bindString(6, scanner);
- }
-
- String lng = entity.getLng();
- if (lng != null) {
- stmt.bindString(7, lng);
- }
-
- String lat = entity.getLat();
- if (lat != null) {
- stmt.bindString(8, lat);
- }
-
- String state = entity.getState();
- if (state != null) {
- stmt.bindString(9, state);
- }
-
- String desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(10, desc);
- }
- }
-
- @Override
- protected final void bindValues(SQLiteStatement stmt, TaskBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(2, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(3, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(4, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(5, markerRealId);
- }
-
- String scanner = entity.getScanner();
- if (scanner != null) {
- stmt.bindString(6, scanner);
- }
-
- String lng = entity.getLng();
- if (lng != null) {
- stmt.bindString(7, lng);
- }
-
- String lat = entity.getLat();
- if (lat != null) {
- stmt.bindString(8, lat);
- }
-
- String state = entity.getState();
- if (state != null) {
- stmt.bindString(9, state);
- }
-
- String desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(10, desc);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public TaskBean readEntity(Cursor cursor, int offset) {
- TaskBean entity = new TaskBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskId
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskCode
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // markerId
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // markerRealId
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // scanner
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // lng
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // lat
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // state
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9) // desc
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, TaskBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setTaskId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setTaskCode(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setMarkerId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setMarkerRealId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setScanner(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setLng(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLat(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setState(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setDesc(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(TaskBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(TaskBean entity) {
- if(entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(TaskBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java
new file mode 100644
index 0000000..330af6b
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java
@@ -0,0 +1,227 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.TaskLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "TASK_LOCAL_BEAN".
+*/
+public class TaskLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskCode = new Property(1, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property Description = new Property(2, String.class, "description", false, "DESCRIPTION");
+ public final static Property CreateTime = new Property(3, String.class, "createTime", false, "CREATE_TIME");
+ public final static Property Status = new Property(4, String.class, "status", false, "STATUS");
+ public final static Property CreateUserName = new Property(5, String.class, "createUserName", false, "CREATE_USER_NAME");
+ public final static Property StartTime = new Property(6, String.class, "startTime", false, "START_TIME");
+ public final static Property EndTime = new Property(7, String.class, "endTime", false, "END_TIME");
+ public final static Property IsFreeTask = new Property(8, String.class, "isFreeTask", false, "IS_FREE_TASK");
+ }
+
+
+ public TaskLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskLocalBeanDao(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 + "\"TASK_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_CODE\" TEXT," + // 1: taskCode
+ "\"DESCRIPTION\" TEXT," + // 2: description
+ "\"CREATE_TIME\" TEXT," + // 3: createTime
+ "\"STATUS\" TEXT," + // 4: status
+ "\"CREATE_USER_NAME\" TEXT," + // 5: createUserName
+ "\"START_TIME\" TEXT," + // 6: startTime
+ "\"END_TIME\" TEXT," + // 7: endTime
+ "\"IS_FREE_TASK\" TEXT);"); // 8: isFreeTask
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+
+ String isFreeTask = entity.getIsFreeTask();
+ if (isFreeTask != null) {
+ stmt.bindString(9, isFreeTask);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+
+ String isFreeTask = entity.getIsFreeTask();
+ if (isFreeTask != null) {
+ stmt.bindString(9, isFreeTask);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskLocalBean readEntity(Cursor cursor, int offset) {
+ TaskLocalBean entity = new TaskLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskCode
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // description
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // createTime
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // status
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // createUserName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // startTime
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // endTime
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8) // isFreeTask
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskCode(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setDescription(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setCreateTime(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setStatus(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCreateUserName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setStartTime(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setEndTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setIsFreeTask(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskMarkerLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskMarkerLocalBeanDao.java
new file mode 100644
index 0000000..344c129
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/TaskMarkerLocalBeanDao.java
@@ -0,0 +1,197 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.TaskMarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "TASK_MARKER_LOCAL_BEAN".
+*/
+public class TaskMarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskId = new Property(1, String.class, "taskId", false, "TASK_ID");
+ public final static Property TaskCode = new Property(2, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property MarkerId = new Property(3, String.class, "markerId", false, "MARKER_ID");
+ public final static Property Lng = new Property(4, double.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(5, double.class, "lat", false, "LAT");
+ public final static Property IsDetected = new Property(6, String.class, "isDetected", false, "IS_DETECTED");
+ public final static Property DetectedTime = new Property(7, String.class, "detectedTime", false, "DETECTED_TIME");
+ }
+
+
+ public TaskMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskMarkerLocalBeanDao(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 + "\"TASK_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_ID\" TEXT," + // 1: taskId
+ "\"TASK_CODE\" TEXT," + // 2: taskCode
+ "\"MARKER_ID\" TEXT," + // 3: markerId
+ "\"LNG\" REAL NOT NULL ," + // 4: lng
+ "\"LAT\" REAL NOT NULL ," + // 5: lat
+ "\"IS_DETECTED\" TEXT," + // 6: isDetected
+ "\"DETECTED_TIME\" TEXT);"); // 7: detectedTime
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ TaskMarkerLocalBean entity = new TaskMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskCode
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // markerId
+ cursor.getDouble(offset + 4), // lng
+ cursor.getDouble(offset + 5), // lat
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // isDetected
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // detectedTime
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setTaskCode(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setMarkerId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setLng(cursor.getDouble(offset + 4));
+ entity.setLat(cursor.getDouble(offset + 5));
+ entity.setIsDetected(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setDetectedTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskMarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/model/TaskDetailLocalModel.java b/app/src/main/java/com/casic/electric/detector/model/TaskDetailLocalModel.java
new file mode 100644
index 0000000..a7c993c
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/model/TaskDetailLocalModel.java
@@ -0,0 +1,147 @@
+package com.casic.electric.detector.model;
+
+import java.util.List;
+
+/**
+ * Task本地库数据模型类,包含Task里面的Marker
+ */
+public class TaskDetailLocalModel {
+ private String taskId;//任务ID
+ private String taskCode;//任务编号
+ private String description;//任务名称
+ private String createTime;//任务创建的时间
+ private String status;//任务状态
+ private String createUserName;//任务创建者名称
+ private String startTime;//任务被开始执行的时间
+ private String endTime;//任务执行结束的时间
+ private String isFreeTask;//是否自由巡检。1-是,0-否
+ private List
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property MarkerObjType = new Property(1, String.class, "markerObjType", false, "MARKER_OBJ_TYPE");
- public final static Property MarkerNumber = new Property(2, String.class, "markerNumber", false, "MARKER_NUMBER");
- public final static Property ObjectName = new Property(3, String.class, "objectName", false, "OBJECT_NAME");
- public final static Property VoltageLevel = new Property(4, String.class, "voltageLevel", false, "VOLTAGE_LEVEL");
- public final static Property TransformerModel = new Property(5, String.class, "transformerModel", false, "TRANSFORMER_MODEL");
- public final static Property HoleCount = new Property(6, String.class, "holeCount", false, "HOLE_COUNT");
- public final static Property Capacity = new Property(7, String.class, "capacity", false, "CAPACITY");
- public final static Property WellCoverMaterial = new Property(8, String.class, "wellCoverMaterial", false, "WELL_COVER_MATERIAL");
- public final static Property CoverDepth = new Property(9, String.class, "coverDepth", false, "COVER_DEPTH");
- public final static Property TransformerSpec = new Property(10, String.class, "transformerSpec", false, "TRANSFORMER_SPEC");
- public final static Property InlineName = new Property(11, String.class, "inlineName", false, "INLINE_NAME");
- public final static Property Size = new Property(12, String.class, "size", false, "SIZE");
- public final static Property BottomDepth = new Property(13, String.class, "bottomDepth", false, "BOTTOM_DEPTH");
- public final static Property Height = new Property(14, String.class, "height", false, "HEIGHT");
- public final static Property CrossPipeLine = new Property(15, String.class, "crossPipeLine", false, "CROSS_PIPE_LINE");
- public final static Property InlineCount = new Property(16, String.class, "inlineCount", false, "INLINE_COUNT");
- public final static Property LineNumber = new Property(17, String.class, "lineNumber", false, "LINE_NUMBER");
- public final static Property JointCount = new Property(18, String.class, "jointCount", false, "JOINT_COUNT");
- public final static Property OutlineCount = new Property(19, String.class, "outlineCount", false, "OUTLINE_COUNT");
- public final static Property RemainingChannels = new Property(20, String.class, "remainingChannels", false, "REMAINING_CHANNELS");
- public final static Property CabinetType = new Property(21, String.class, "cabinetType", false, "CABINET_TYPE");
- public final static Property TieCable1 = new Property(22, String.class, "tieCable1", false, "TIE_CABLE1");
- public final static Property TieCable2 = new Property(23, String.class, "tieCable2", false, "TIE_CABLE2");
- public final static Property CasingMaterial = new Property(24, String.class, "casingMaterial", false, "CASING_MATERIAL");
- public final static Property CasingSpec = new Property(25, String.class, "casingSpec", false, "CASING_SPEC");
- public final static Property ConstructTime = new Property(26, String.class, "constructTime", false, "CONSTRUCT_TIME");
- public final static Property InspectionUnit = new Property(27, String.class, "inspectionUnit", false, "INSPECTION_UNIT");
- public final static Property Area = new Property(28, String.class, "area", false, "AREA");
- public final static Property Road = new Property(29, String.class, "road", false, "ROAD");
- public final static Property Memo1 = new Property(30, String.class, "memo1", false, "MEMO1");
- public final static Property Memo2 = new Property(31, String.class, "memo2", false, "MEMO2");
- public final static Property Memo3 = new Property(32, String.class, "memo3", false, "MEMO3");
- public final static Property MarkerId = new Property(33, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerType = new Property(34, String.class, "markerType", false, "MARKER_TYPE");
- public final static Property Owner = new Property(35, String.class, "owner", false, "OWNER");
- public final static Property MarkerDepth = new Property(36, String.class, "markerDepth", false, "MARKER_DEPTH");
- public final static Property ElectricTagCount = new Property(37, String.class, "electricTagCount", false, "ELECTRIC_TAG_COUNT");
- public final static Property InstalledTime = new Property(38, String.class, "installedTime", false, "INSTALLED_TIME");
- public final static Property Longitude = new Property(39, String.class, "longitude", false, "LONGITUDE");
- public final static Property Latitude = new Property(40, String.class, "latitude", false, "LATITUDE");
- public final static Property MarkerMemo1 = new Property(41, String.class, "markerMemo1", false, "MARKER_MEMO1");
- public final static Property MarkerMemo2 = new Property(42, String.class, "markerMemo2", false, "MARKER_MEMO2");
- public final static Property MarkerMemo3 = new Property(43, String.class, "markerMemo3", false, "MARKER_MEMO3");
- public final static Property ImagePath = new Property(44, String.class, "imagePath", false, "IMAGE_PATH");
- }
-
-
- public LabelBeanDao(DaoConfig config) {
- super(config);
- }
-
- public LabelBeanDao(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 + "\"LABEL_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"MARKER_OBJ_TYPE\" TEXT," + // 1: markerObjType
- "\"MARKER_NUMBER\" TEXT," + // 2: markerNumber
- "\"OBJECT_NAME\" TEXT," + // 3: objectName
- "\"VOLTAGE_LEVEL\" TEXT," + // 4: voltageLevel
- "\"TRANSFORMER_MODEL\" TEXT," + // 5: transformerModel
- "\"HOLE_COUNT\" TEXT," + // 6: holeCount
- "\"CAPACITY\" TEXT," + // 7: capacity
- "\"WELL_COVER_MATERIAL\" TEXT," + // 8: wellCoverMaterial
- "\"COVER_DEPTH\" TEXT," + // 9: coverDepth
- "\"TRANSFORMER_SPEC\" TEXT," + // 10: transformerSpec
- "\"INLINE_NAME\" TEXT," + // 11: inlineName
- "\"SIZE\" TEXT," + // 12: size
- "\"BOTTOM_DEPTH\" TEXT," + // 13: bottomDepth
- "\"HEIGHT\" TEXT," + // 14: height
- "\"CROSS_PIPE_LINE\" TEXT," + // 15: crossPipeLine
- "\"INLINE_COUNT\" TEXT," + // 16: inlineCount
- "\"LINE_NUMBER\" TEXT," + // 17: lineNumber
- "\"JOINT_COUNT\" TEXT," + // 18: jointCount
- "\"OUTLINE_COUNT\" TEXT," + // 19: outlineCount
- "\"REMAINING_CHANNELS\" TEXT," + // 20: remainingChannels
- "\"CABINET_TYPE\" TEXT," + // 21: cabinetType
- "\"TIE_CABLE1\" TEXT," + // 22: tieCable1
- "\"TIE_CABLE2\" TEXT," + // 23: tieCable2
- "\"CASING_MATERIAL\" TEXT," + // 24: casingMaterial
- "\"CASING_SPEC\" TEXT," + // 25: casingSpec
- "\"CONSTRUCT_TIME\" TEXT," + // 26: constructTime
- "\"INSPECTION_UNIT\" TEXT," + // 27: inspectionUnit
- "\"AREA\" TEXT," + // 28: area
- "\"ROAD\" TEXT," + // 29: road
- "\"MEMO1\" TEXT," + // 30: memo1
- "\"MEMO2\" TEXT," + // 31: memo2
- "\"MEMO3\" TEXT," + // 32: memo3
- "\"MARKER_ID\" TEXT," + // 33: markerId
- "\"MARKER_TYPE\" TEXT," + // 34: markerType
- "\"OWNER\" TEXT," + // 35: owner
- "\"MARKER_DEPTH\" TEXT," + // 36: markerDepth
- "\"ELECTRIC_TAG_COUNT\" TEXT," + // 37: electricTagCount
- "\"INSTALLED_TIME\" TEXT," + // 38: installedTime
- "\"LONGITUDE\" TEXT," + // 39: longitude
- "\"LATITUDE\" TEXT," + // 40: latitude
- "\"MARKER_MEMO1\" TEXT," + // 41: markerMemo1
- "\"MARKER_MEMO2\" TEXT," + // 42: markerMemo2
- "\"MARKER_MEMO3\" TEXT," + // 43: markerMemo3
- "\"IMAGE_PATH\" TEXT);"); // 44: imagePath
- }
-
- /** Drops the underlying database table. */
- public static void dropTable(Database db, boolean ifExists) {
- String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"LABEL_BEAN\"";
- db.execSQL(sql);
- }
-
- @Override
- protected final void bindValues(DatabaseStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- protected final void bindValues(SQLiteStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public LabelBean readEntity(Cursor cursor, int offset) {
- LabelBean entity = new LabelBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerObjType
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // markerNumber
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // objectName
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // voltageLevel
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // transformerModel
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // holeCount
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // capacity
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // wellCoverMaterial
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // coverDepth
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // transformerSpec
- cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // inlineName
- cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // size
- cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // bottomDepth
- cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // height
- cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // crossPipeLine
- cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // inlineCount
- cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lineNumber
- cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // jointCount
- cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // outlineCount
- cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // remainingChannels
- cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // cabinetType
- cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // tieCable1
- cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // tieCable2
- cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // casingMaterial
- cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // casingSpec
- cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26), // constructTime
- cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27), // inspectionUnit
- cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28), // area
- cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29), // road
- cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30), // memo1
- cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31), // memo2
- cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32), // memo3
- cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33), // markerId
- cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34), // markerType
- cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35), // owner
- cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36), // markerDepth
- cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37), // electricTagCount
- cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38), // installedTime
- cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39), // longitude
- cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40), // latitude
- cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41), // markerMemo1
- cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42), // markerMemo2
- cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43), // markerMemo3
- cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44) // imagePath
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, LabelBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setMarkerObjType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setMarkerNumber(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setObjectName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setVoltageLevel(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setTransformerModel(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setHoleCount(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setCapacity(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setWellCoverMaterial(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setCoverDepth(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- entity.setTransformerSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
- entity.setInlineName(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
- entity.setSize(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
- entity.setBottomDepth(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
- entity.setHeight(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
- entity.setCrossPipeLine(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
- entity.setInlineCount(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
- entity.setLineNumber(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
- entity.setJointCount(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
- entity.setOutlineCount(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
- entity.setRemainingChannels(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
- entity.setCabinetType(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
- entity.setTieCable1(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
- entity.setTieCable2(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
- entity.setCasingMaterial(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
- entity.setCasingSpec(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
- entity.setConstructTime(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
- entity.setInspectionUnit(cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27));
- entity.setArea(cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28));
- entity.setRoad(cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29));
- entity.setMemo1(cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30));
- entity.setMemo2(cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31));
- entity.setMemo3(cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32));
- entity.setMarkerId(cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33));
- entity.setMarkerType(cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34));
- entity.setOwner(cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35));
- entity.setMarkerDepth(cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36));
- entity.setElectricTagCount(cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37));
- entity.setInstalledTime(cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38));
- entity.setLongitude(cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39));
- entity.setLatitude(cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40));
- entity.setMarkerMemo1(cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41));
- entity.setMarkerMemo2(cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42));
- entity.setMarkerMemo3(cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43));
- entity.setImagePath(cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(LabelBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(LabelBean entity) {
- if(entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(LabelBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java
new file mode 100644
index 0000000..9f2afa5
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java
@@ -0,0 +1,479 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.MarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "MARKER_LOCAL_BEAN".
+*/
+public class MarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property PipelineType = new Property(1, String.class, "pipelineType", false, "PIPELINE_TYPE");
+ public final static Property PipelineDiameter = new Property(2, String.class, "pipelineDiameter", false, "PIPELINE_DIAMETER");
+ public final static Property PipelineMaterial = new Property(3, String.class, "pipelineMaterial", false, "PIPELINE_MATERIAL");
+ public final static Property BuryMethod = new Property(4, String.class, "buryMethod", false, "BURY_METHOD");
+ public final static Property BuryDepth = new Property(5, String.class, "buryDepth", false, "BURY_DEPTH");
+ public final static Property Area = new Property(6, String.class, "area", false, "AREA");
+ public final static Property Line = new Property(7, String.class, "line", false, "LINE");
+ public final static Property Road = new Property(8, String.class, "road", false, "ROAD");
+ public final static Property ConstructTime = new Property(9, String.class, "constructTime", false, "CONSTRUCT_TIME");
+ public final static Property Owner = new Property(10, String.class, "owner", false, "OWNER");
+ public final static Property ObjectId = new Property(11, String.class, "objectId", false, "OBJECT_ID");
+ public final static Property MarkerId = new Property(12, String.class, "markerId", false, "MARKER_ID");
+ public final static Property MarkerType = new Property(13, String.class, "markerType", false, "MARKER_TYPE");
+ public final static Property MarkerDepth = new Property(14, String.class, "markerDepth", false, "MARKER_DEPTH");
+ public final static Property InstallationDept = new Property(15, String.class, "installationDept", false, "INSTALLATION_DEPT");
+ public final static Property Lng = new Property(16, String.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(17, String.class, "lat", false, "LAT");
+ public final static Property UpdateTime = new Property(18, String.class, "updateTime", false, "UPDATE_TIME");
+ public final static Property Remark = new Property(19, String.class, "remark", false, "REMARK");
+ public final static Property UnderlyingPipelineType = new Property(20, String.class, "underlyingPipelineType", false, "UNDERLYING_PIPELINE_TYPE");
+ public final static Property UnderlyingPipelineDepth = new Property(21, String.class, "underlyingPipelineDepth", false, "UNDERLYING_PIPELINE_DEPTH");
+ public final static Property UnderlyingPipelineDiameter = new Property(22, String.class, "underlyingPipelineDiameter", false, "UNDERLYING_PIPELINE_DIAMETER");
+ public final static Property UnderlyingPipelineMaterial = new Property(23, String.class, "underlyingPipelineMaterial", false, "UNDERLYING_PIPELINE_MATERIAL");
+ public final static Property ObjectType = new Property(24, String.class, "objectType", false, "OBJECT_TYPE");
+ public final static Property Color = new Property(25, String.class, "color", false, "COLOR");
+ public final static Property ImagePath = new Property(26, String.class, "imagePath", false, "IMAGE_PATH");
+ }
+
+
+ public MarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public MarkerLocalBeanDao(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 + "\"MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
+ "\"PIPELINE_TYPE\" TEXT," + // 1: pipelineType
+ "\"PIPELINE_DIAMETER\" TEXT," + // 2: pipelineDiameter
+ "\"PIPELINE_MATERIAL\" TEXT," + // 3: pipelineMaterial
+ "\"BURY_METHOD\" TEXT," + // 4: buryMethod
+ "\"BURY_DEPTH\" TEXT," + // 5: buryDepth
+ "\"AREA\" TEXT," + // 6: area
+ "\"LINE\" TEXT," + // 7: line
+ "\"ROAD\" TEXT," + // 8: road
+ "\"CONSTRUCT_TIME\" TEXT," + // 9: constructTime
+ "\"OWNER\" TEXT," + // 10: owner
+ "\"OBJECT_ID\" TEXT," + // 11: objectId
+ "\"MARKER_ID\" TEXT," + // 12: markerId
+ "\"MARKER_TYPE\" TEXT," + // 13: markerType
+ "\"MARKER_DEPTH\" TEXT," + // 14: markerDepth
+ "\"INSTALLATION_DEPT\" TEXT," + // 15: installationDept
+ "\"LNG\" TEXT," + // 16: lng
+ "\"LAT\" TEXT," + // 17: lat
+ "\"UPDATE_TIME\" TEXT," + // 18: updateTime
+ "\"REMARK\" TEXT," + // 19: remark
+ "\"UNDERLYING_PIPELINE_TYPE\" TEXT," + // 20: underlyingPipelineType
+ "\"UNDERLYING_PIPELINE_DEPTH\" TEXT," + // 21: underlyingPipelineDepth
+ "\"UNDERLYING_PIPELINE_DIAMETER\" TEXT," + // 22: underlyingPipelineDiameter
+ "\"UNDERLYING_PIPELINE_MATERIAL\" TEXT," + // 23: underlyingPipelineMaterial
+ "\"OBJECT_TYPE\" TEXT," + // 24: objectType
+ "\"COLOR\" TEXT," + // 25: color
+ "\"IMAGE_PATH\" TEXT);"); // 26: imagePath
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, MarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String pipelineType = entity.getPipelineType();
+ if (pipelineType != null) {
+ stmt.bindString(2, pipelineType);
+ }
+
+ String pipelineDiameter = entity.getPipelineDiameter();
+ if (pipelineDiameter != null) {
+ stmt.bindString(3, pipelineDiameter);
+ }
+
+ String pipelineMaterial = entity.getPipelineMaterial();
+ if (pipelineMaterial != null) {
+ stmt.bindString(4, pipelineMaterial);
+ }
+
+ String buryMethod = entity.getBuryMethod();
+ if (buryMethod != null) {
+ stmt.bindString(5, buryMethod);
+ }
+
+ String buryDepth = entity.getBuryDepth();
+ if (buryDepth != null) {
+ stmt.bindString(6, buryDepth);
+ }
+
+ String area = entity.getArea();
+ if (area != null) {
+ stmt.bindString(7, area);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String road = entity.getRoad();
+ if (road != null) {
+ stmt.bindString(9, road);
+ }
+
+ String constructTime = entity.getConstructTime();
+ if (constructTime != null) {
+ stmt.bindString(10, constructTime);
+ }
+
+ String owner = entity.getOwner();
+ if (owner != null) {
+ stmt.bindString(11, owner);
+ }
+
+ String objectId = entity.getObjectId();
+ if (objectId != null) {
+ stmt.bindString(12, objectId);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(13, markerId);
+ }
+
+ String markerType = entity.getMarkerType();
+ if (markerType != null) {
+ stmt.bindString(14, markerType);
+ }
+
+ String markerDepth = entity.getMarkerDepth();
+ if (markerDepth != null) {
+ stmt.bindString(15, markerDepth);
+ }
+
+ String installationDept = entity.getInstallationDept();
+ if (installationDept != null) {
+ stmt.bindString(16, installationDept);
+ }
+
+ String lng = entity.getLng();
+ if (lng != null) {
+ stmt.bindString(17, lng);
+ }
+
+ String lat = entity.getLat();
+ if (lat != null) {
+ stmt.bindString(18, lat);
+ }
+
+ String updateTime = entity.getUpdateTime();
+ if (updateTime != null) {
+ stmt.bindString(19, updateTime);
+ }
+
+ String remark = entity.getRemark();
+ if (remark != null) {
+ stmt.bindString(20, remark);
+ }
+
+ String underlyingPipelineType = entity.getUnderlyingPipelineType();
+ if (underlyingPipelineType != null) {
+ stmt.bindString(21, underlyingPipelineType);
+ }
+
+ String underlyingPipelineDepth = entity.getUnderlyingPipelineDepth();
+ if (underlyingPipelineDepth != null) {
+ stmt.bindString(22, underlyingPipelineDepth);
+ }
+
+ String underlyingPipelineDiameter = entity.getUnderlyingPipelineDiameter();
+ if (underlyingPipelineDiameter != null) {
+ stmt.bindString(23, underlyingPipelineDiameter);
+ }
+
+ String underlyingPipelineMaterial = entity.getUnderlyingPipelineMaterial();
+ if (underlyingPipelineMaterial != null) {
+ stmt.bindString(24, underlyingPipelineMaterial);
+ }
+
+ String objectType = entity.getObjectType();
+ if (objectType != null) {
+ stmt.bindString(25, objectType);
+ }
+
+ String color = entity.getColor();
+ if (color != null) {
+ stmt.bindString(26, color);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(27, imagePath);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, MarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String pipelineType = entity.getPipelineType();
+ if (pipelineType != null) {
+ stmt.bindString(2, pipelineType);
+ }
+
+ String pipelineDiameter = entity.getPipelineDiameter();
+ if (pipelineDiameter != null) {
+ stmt.bindString(3, pipelineDiameter);
+ }
+
+ String pipelineMaterial = entity.getPipelineMaterial();
+ if (pipelineMaterial != null) {
+ stmt.bindString(4, pipelineMaterial);
+ }
+
+ String buryMethod = entity.getBuryMethod();
+ if (buryMethod != null) {
+ stmt.bindString(5, buryMethod);
+ }
+
+ String buryDepth = entity.getBuryDepth();
+ if (buryDepth != null) {
+ stmt.bindString(6, buryDepth);
+ }
+
+ String area = entity.getArea();
+ if (area != null) {
+ stmt.bindString(7, area);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String road = entity.getRoad();
+ if (road != null) {
+ stmt.bindString(9, road);
+ }
+
+ String constructTime = entity.getConstructTime();
+ if (constructTime != null) {
+ stmt.bindString(10, constructTime);
+ }
+
+ String owner = entity.getOwner();
+ if (owner != null) {
+ stmt.bindString(11, owner);
+ }
+
+ String objectId = entity.getObjectId();
+ if (objectId != null) {
+ stmt.bindString(12, objectId);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(13, markerId);
+ }
+
+ String markerType = entity.getMarkerType();
+ if (markerType != null) {
+ stmt.bindString(14, markerType);
+ }
+
+ String markerDepth = entity.getMarkerDepth();
+ if (markerDepth != null) {
+ stmt.bindString(15, markerDepth);
+ }
+
+ String installationDept = entity.getInstallationDept();
+ if (installationDept != null) {
+ stmt.bindString(16, installationDept);
+ }
+
+ String lng = entity.getLng();
+ if (lng != null) {
+ stmt.bindString(17, lng);
+ }
+
+ String lat = entity.getLat();
+ if (lat != null) {
+ stmt.bindString(18, lat);
+ }
+
+ String updateTime = entity.getUpdateTime();
+ if (updateTime != null) {
+ stmt.bindString(19, updateTime);
+ }
+
+ String remark = entity.getRemark();
+ if (remark != null) {
+ stmt.bindString(20, remark);
+ }
+
+ String underlyingPipelineType = entity.getUnderlyingPipelineType();
+ if (underlyingPipelineType != null) {
+ stmt.bindString(21, underlyingPipelineType);
+ }
+
+ String underlyingPipelineDepth = entity.getUnderlyingPipelineDepth();
+ if (underlyingPipelineDepth != null) {
+ stmt.bindString(22, underlyingPipelineDepth);
+ }
+
+ String underlyingPipelineDiameter = entity.getUnderlyingPipelineDiameter();
+ if (underlyingPipelineDiameter != null) {
+ stmt.bindString(23, underlyingPipelineDiameter);
+ }
+
+ String underlyingPipelineMaterial = entity.getUnderlyingPipelineMaterial();
+ if (underlyingPipelineMaterial != null) {
+ stmt.bindString(24, underlyingPipelineMaterial);
+ }
+
+ String objectType = entity.getObjectType();
+ if (objectType != null) {
+ stmt.bindString(25, objectType);
+ }
+
+ String color = entity.getColor();
+ if (color != null) {
+ stmt.bindString(26, color);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(27, imagePath);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public MarkerLocalBean readEntity(Cursor cursor, int offset) {
+ MarkerLocalBean entity = new MarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // pipelineType
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // pipelineDiameter
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // pipelineMaterial
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // buryMethod
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // buryDepth
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // area
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // road
+ cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // constructTime
+ cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // owner
+ cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // objectId
+ cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // markerId
+ cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // markerType
+ cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // markerDepth
+ cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // installationDept
+ cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // lng
+ cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lat
+ cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // updateTime
+ cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // remark
+ cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // underlyingPipelineType
+ cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // underlyingPipelineDepth
+ cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // underlyingPipelineDiameter
+ cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // underlyingPipelineMaterial
+ cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // objectType
+ cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // color
+ cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26) // imagePath
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, MarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setPipelineType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setPipelineDiameter(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setPipelineMaterial(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setBuryMethod(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setBuryDepth(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setArea(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setRoad(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ entity.setConstructTime(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
+ entity.setOwner(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
+ entity.setObjectId(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
+ entity.setMarkerId(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
+ entity.setMarkerType(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
+ entity.setMarkerDepth(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
+ entity.setInstallationDept(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
+ entity.setLng(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
+ entity.setLat(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
+ entity.setUpdateTime(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
+ entity.setRemark(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
+ entity.setUnderlyingPipelineType(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
+ entity.setUnderlyingPipelineDepth(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
+ entity.setUnderlyingPipelineDiameter(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
+ entity.setUnderlyingPipelineMaterial(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
+ entity.setObjectType(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
+ entity.setColor(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
+ entity.setImagePath(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(MarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(MarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(MarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
index 18b1b7b..9d99b8d 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
@@ -3,7 +3,7 @@
import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;
-import com.casic.electric.detector.bean.SmallLabelBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.Property;
@@ -12,10 +12,11 @@
import org.greenrobot.greendao.internal.DaoConfig;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-/**
+
+/**
* DAO for table "SMALL_LABEL_BEAN".
-*/
-public class SmallLabelBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property MarkerId = new Property(1, String.class, "markerId", false, "MARKER_ID");
+ public final static Property LocationNumber = new Property(2, String.class, "locationNumber", false, "LOCATION_NUMBER");
+ public final static Property LocationName = new Property(3, String.class, "locationName", false, "LOCATION_NAME");
+ public final static Property ElectricMarkerId = new Property(4, String.class, "electricMarkerId", false, "ELECTRIC_MARKER_ID");
+ public final static Property CableName = new Property(5, String.class, "cableName", false, "CABLE_NAME");
+ public final static Property CableNumber = new Property(6, String.class, "cableNumber", false, "CABLE_NUMBER");
+ public final static Property Line = new Property(7, String.class, "line", false, "LINE");
+ public final static Property VoltageLevel = new Property(8, String.class, "voltageLevel", false, "VOLTAGE_LEVEL");
+ public final static Property CableType = new Property(9, String.class, "cableType", false, "CABLE_TYPE");
+ public final static Property CableSpec = new Property(10, String.class, "cableSpec", false, "CABLE_SPEC");
+ public final static Property CableBrand = new Property(11, String.class, "cableBrand", false, "CABLE_BRAND");
+ public final static Property CableStart = new Property(12, String.class, "cableStart", false, "CABLE_START");
+ public final static Property CableEnd = new Property(13, String.class, "cableEnd", false, "CABLE_END");
+ public final static Property HasJoint = new Property(14, String.class, "hasJoint", false, "HAS_JOINT");
+ public final static Property JointCreator = new Property(15, String.class, "jointCreator", false, "JOINT_CREATOR");
+ public final static Property ImagePath = new Property(16, String.class, "imagePath", false, "IMAGE_PATH");
+ public final static Property Memo1 = new Property(17, String.class, "memo1", false, "MEMO1");
+ public final static Property Memo2 = new Property(18, String.class, "memo2", false, "MEMO2");
+ public final static Property Memo3 = new Property(19, String.class, "memo3", false, "MEMO3");
+ }
+
+
+ public SmallMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public SmallMarkerLocalBeanDao(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 + "\"SMALL_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
+ "\"MARKER_ID\" TEXT," + // 1: markerId
+ "\"LOCATION_NUMBER\" TEXT," + // 2: locationNumber
+ "\"LOCATION_NAME\" TEXT," + // 3: locationName
+ "\"ELECTRIC_MARKER_ID\" TEXT," + // 4: electricMarkerId
+ "\"CABLE_NAME\" TEXT," + // 5: cableName
+ "\"CABLE_NUMBER\" TEXT," + // 6: cableNumber
+ "\"LINE\" TEXT," + // 7: line
+ "\"VOLTAGE_LEVEL\" TEXT," + // 8: voltageLevel
+ "\"CABLE_TYPE\" TEXT," + // 9: cableType
+ "\"CABLE_SPEC\" TEXT," + // 10: cableSpec
+ "\"CABLE_BRAND\" TEXT," + // 11: cableBrand
+ "\"CABLE_START\" TEXT," + // 12: cableStart
+ "\"CABLE_END\" TEXT," + // 13: cableEnd
+ "\"HAS_JOINT\" TEXT," + // 14: hasJoint
+ "\"JOINT_CREATOR\" TEXT," + // 15: jointCreator
+ "\"IMAGE_PATH\" TEXT," + // 16: imagePath
+ "\"MEMO1\" TEXT," + // 17: memo1
+ "\"MEMO2\" TEXT," + // 18: memo2
+ "\"MEMO3\" TEXT);"); // 19: memo3
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"SMALL_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, SmallMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(2, markerId);
+ }
+
+ String locationNumber = entity.getLocationNumber();
+ if (locationNumber != null) {
+ stmt.bindString(3, locationNumber);
+ }
+
+ String locationName = entity.getLocationName();
+ if (locationName != null) {
+ stmt.bindString(4, locationName);
+ }
+
+ String electricMarkerId = entity.getElectricMarkerId();
+ if (electricMarkerId != null) {
+ stmt.bindString(5, electricMarkerId);
+ }
+
+ String cableName = entity.getCableName();
+ if (cableName != null) {
+ stmt.bindString(6, cableName);
+ }
+
+ String cableNumber = entity.getCableNumber();
+ if (cableNumber != null) {
+ stmt.bindString(7, cableNumber);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String voltageLevel = entity.getVoltageLevel();
+ if (voltageLevel != null) {
+ stmt.bindString(9, voltageLevel);
+ }
+
+ String cableType = entity.getCableType();
+ if (cableType != null) {
+ stmt.bindString(10, cableType);
+ }
+
+ String cableSpec = entity.getCableSpec();
+ if (cableSpec != null) {
+ stmt.bindString(11, cableSpec);
+ }
+
+ String cableBrand = entity.getCableBrand();
+ if (cableBrand != null) {
+ stmt.bindString(12, cableBrand);
+ }
+
+ String cableStart = entity.getCableStart();
+ if (cableStart != null) {
+ stmt.bindString(13, cableStart);
+ }
+
+ String cableEnd = entity.getCableEnd();
+ if (cableEnd != null) {
+ stmt.bindString(14, cableEnd);
+ }
+
+ String hasJoint = entity.getHasJoint();
+ if (hasJoint != null) {
+ stmt.bindString(15, hasJoint);
+ }
+
+ String jointCreator = entity.getJointCreator();
+ if (jointCreator != null) {
+ stmt.bindString(16, jointCreator);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(17, imagePath);
+ }
+
+ String memo1 = entity.getMemo1();
+ if (memo1 != null) {
+ stmt.bindString(18, memo1);
+ }
+
+ String memo2 = entity.getMemo2();
+ if (memo2 != null) {
+ stmt.bindString(19, memo2);
+ }
+
+ String memo3 = entity.getMemo3();
+ if (memo3 != null) {
+ stmt.bindString(20, memo3);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, SmallMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(2, markerId);
+ }
+
+ String locationNumber = entity.getLocationNumber();
+ if (locationNumber != null) {
+ stmt.bindString(3, locationNumber);
+ }
+
+ String locationName = entity.getLocationName();
+ if (locationName != null) {
+ stmt.bindString(4, locationName);
+ }
+
+ String electricMarkerId = entity.getElectricMarkerId();
+ if (electricMarkerId != null) {
+ stmt.bindString(5, electricMarkerId);
+ }
+
+ String cableName = entity.getCableName();
+ if (cableName != null) {
+ stmt.bindString(6, cableName);
+ }
+
+ String cableNumber = entity.getCableNumber();
+ if (cableNumber != null) {
+ stmt.bindString(7, cableNumber);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String voltageLevel = entity.getVoltageLevel();
+ if (voltageLevel != null) {
+ stmt.bindString(9, voltageLevel);
+ }
+
+ String cableType = entity.getCableType();
+ if (cableType != null) {
+ stmt.bindString(10, cableType);
+ }
+
+ String cableSpec = entity.getCableSpec();
+ if (cableSpec != null) {
+ stmt.bindString(11, cableSpec);
+ }
+
+ String cableBrand = entity.getCableBrand();
+ if (cableBrand != null) {
+ stmt.bindString(12, cableBrand);
+ }
+
+ String cableStart = entity.getCableStart();
+ if (cableStart != null) {
+ stmt.bindString(13, cableStart);
+ }
+
+ String cableEnd = entity.getCableEnd();
+ if (cableEnd != null) {
+ stmt.bindString(14, cableEnd);
+ }
+
+ String hasJoint = entity.getHasJoint();
+ if (hasJoint != null) {
+ stmt.bindString(15, hasJoint);
+ }
+
+ String jointCreator = entity.getJointCreator();
+ if (jointCreator != null) {
+ stmt.bindString(16, jointCreator);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(17, imagePath);
+ }
+
+ String memo1 = entity.getMemo1();
+ if (memo1 != null) {
+ stmt.bindString(18, memo1);
+ }
+
+ String memo2 = entity.getMemo2();
+ if (memo2 != null) {
+ stmt.bindString(19, memo2);
+ }
+
+ String memo3 = entity.getMemo3();
+ if (memo3 != null) {
+ stmt.bindString(20, memo3);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public SmallMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ SmallMarkerLocalBean entity = new SmallMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // locationNumber
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // locationName
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // electricMarkerId
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // cableName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // cableNumber
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // voltageLevel
+ cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // cableType
+ cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // cableSpec
+ cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // cableBrand
+ cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // cableStart
+ cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // cableEnd
+ cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // hasJoint
+ cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // jointCreator
+ cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // imagePath
+ cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // memo1
+ cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // memo2
+ cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19) // memo3
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, SmallMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setMarkerId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setLocationNumber(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setLocationName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setElectricMarkerId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCableName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setCableNumber(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setVoltageLevel(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ entity.setCableType(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
+ entity.setCableSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
+ entity.setCableBrand(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
+ entity.setCableStart(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
+ entity.setCableEnd(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
+ entity.setHasJoint(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
+ entity.setJointCreator(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
+ entity.setImagePath(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
+ entity.setMemo1(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
+ entity.setMemo2(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
+ entity.setMemo3(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(SmallMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(SmallMarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(SmallMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java
deleted file mode 100644
index 802ffb0..0000000
--- a/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java
+++ /dev/null
@@ -1,241 +0,0 @@
-package com.casic.electric.detector.greendao;
-
-import android.database.Cursor;
-import android.database.sqlite.SQLiteStatement;
-
-import com.casic.electric.detector.bean.TaskBean;
-
-import org.greenrobot.greendao.AbstractDao;
-import org.greenrobot.greendao.Property;
-import org.greenrobot.greendao.database.Database;
-import org.greenrobot.greendao.database.DatabaseStatement;
-import org.greenrobot.greendao.internal.DaoConfig;
-
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-/**
- * DAO for table "TASK_BEAN".
-*/
-public class TaskBeanDao extends AbstractDao
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property TaskId = new Property(1, String.class, "taskId", false, "TASK_ID");
- public final static Property TaskCode = new Property(2, String.class, "taskCode", false, "TASK_CODE");
- public final static Property MarkerId = new Property(3, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerRealId = new Property(4, String.class, "markerRealId", false, "MARKER_REAL_ID");
- public final static Property Scanner = new Property(5, String.class, "scanner", false, "SCANNER");
- public final static Property Lng = new Property(6, String.class, "lng", false, "LNG");
- public final static Property Lat = new Property(7, String.class, "lat", false, "LAT");
- public final static Property State = new Property(8, String.class, "state", false, "STATE");
- public final static Property Desc = new Property(9, String.class, "desc", false, "DESC");
- }
-
-
- public TaskBeanDao(DaoConfig config) {
- super(config);
- }
-
- public TaskBeanDao(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 + "\"TASK_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"TASK_ID\" TEXT," + // 1: taskId
- "\"TASK_CODE\" TEXT," + // 2: taskCode
- "\"MARKER_ID\" TEXT," + // 3: markerId
- "\"MARKER_REAL_ID\" TEXT," + // 4: markerRealId
- "\"SCANNER\" TEXT," + // 5: scanner
- "\"LNG\" TEXT," + // 6: lng
- "\"LAT\" TEXT," + // 7: lat
- "\"STATE\" TEXT," + // 8: state
- "\"DESC\" TEXT);"); // 9: desc
- }
-
- /** Drops the underlying database table. */
- public static void dropTable(Database db, boolean ifExists) {
- String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_BEAN\"";
- db.execSQL(sql);
- }
-
- @Override
- protected final void bindValues(DatabaseStatement stmt, TaskBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(2, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(3, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(4, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(5, markerRealId);
- }
-
- String scanner = entity.getScanner();
- if (scanner != null) {
- stmt.bindString(6, scanner);
- }
-
- String lng = entity.getLng();
- if (lng != null) {
- stmt.bindString(7, lng);
- }
-
- String lat = entity.getLat();
- if (lat != null) {
- stmt.bindString(8, lat);
- }
-
- String state = entity.getState();
- if (state != null) {
- stmt.bindString(9, state);
- }
-
- String desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(10, desc);
- }
- }
-
- @Override
- protected final void bindValues(SQLiteStatement stmt, TaskBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(2, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(3, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(4, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(5, markerRealId);
- }
-
- String scanner = entity.getScanner();
- if (scanner != null) {
- stmt.bindString(6, scanner);
- }
-
- String lng = entity.getLng();
- if (lng != null) {
- stmt.bindString(7, lng);
- }
-
- String lat = entity.getLat();
- if (lat != null) {
- stmt.bindString(8, lat);
- }
-
- String state = entity.getState();
- if (state != null) {
- stmt.bindString(9, state);
- }
-
- String desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(10, desc);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public TaskBean readEntity(Cursor cursor, int offset) {
- TaskBean entity = new TaskBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskId
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskCode
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // markerId
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // markerRealId
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // scanner
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // lng
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // lat
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // state
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9) // desc
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, TaskBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setTaskId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setTaskCode(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setMarkerId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setMarkerRealId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setScanner(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setLng(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLat(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setState(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setDesc(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(TaskBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(TaskBean entity) {
- if(entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(TaskBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java
new file mode 100644
index 0000000..330af6b
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java
@@ -0,0 +1,227 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.TaskLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "TASK_LOCAL_BEAN".
+*/
+public class TaskLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskCode = new Property(1, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property Description = new Property(2, String.class, "description", false, "DESCRIPTION");
+ public final static Property CreateTime = new Property(3, String.class, "createTime", false, "CREATE_TIME");
+ public final static Property Status = new Property(4, String.class, "status", false, "STATUS");
+ public final static Property CreateUserName = new Property(5, String.class, "createUserName", false, "CREATE_USER_NAME");
+ public final static Property StartTime = new Property(6, String.class, "startTime", false, "START_TIME");
+ public final static Property EndTime = new Property(7, String.class, "endTime", false, "END_TIME");
+ public final static Property IsFreeTask = new Property(8, String.class, "isFreeTask", false, "IS_FREE_TASK");
+ }
+
+
+ public TaskLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskLocalBeanDao(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 + "\"TASK_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_CODE\" TEXT," + // 1: taskCode
+ "\"DESCRIPTION\" TEXT," + // 2: description
+ "\"CREATE_TIME\" TEXT," + // 3: createTime
+ "\"STATUS\" TEXT," + // 4: status
+ "\"CREATE_USER_NAME\" TEXT," + // 5: createUserName
+ "\"START_TIME\" TEXT," + // 6: startTime
+ "\"END_TIME\" TEXT," + // 7: endTime
+ "\"IS_FREE_TASK\" TEXT);"); // 8: isFreeTask
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+
+ String isFreeTask = entity.getIsFreeTask();
+ if (isFreeTask != null) {
+ stmt.bindString(9, isFreeTask);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+
+ String isFreeTask = entity.getIsFreeTask();
+ if (isFreeTask != null) {
+ stmt.bindString(9, isFreeTask);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskLocalBean readEntity(Cursor cursor, int offset) {
+ TaskLocalBean entity = new TaskLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskCode
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // description
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // createTime
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // status
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // createUserName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // startTime
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // endTime
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8) // isFreeTask
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskCode(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setDescription(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setCreateTime(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setStatus(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCreateUserName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setStartTime(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setEndTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setIsFreeTask(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskMarkerLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskMarkerLocalBeanDao.java
new file mode 100644
index 0000000..344c129
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/TaskMarkerLocalBeanDao.java
@@ -0,0 +1,197 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.TaskMarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "TASK_MARKER_LOCAL_BEAN".
+*/
+public class TaskMarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskId = new Property(1, String.class, "taskId", false, "TASK_ID");
+ public final static Property TaskCode = new Property(2, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property MarkerId = new Property(3, String.class, "markerId", false, "MARKER_ID");
+ public final static Property Lng = new Property(4, double.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(5, double.class, "lat", false, "LAT");
+ public final static Property IsDetected = new Property(6, String.class, "isDetected", false, "IS_DETECTED");
+ public final static Property DetectedTime = new Property(7, String.class, "detectedTime", false, "DETECTED_TIME");
+ }
+
+
+ public TaskMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskMarkerLocalBeanDao(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 + "\"TASK_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_ID\" TEXT," + // 1: taskId
+ "\"TASK_CODE\" TEXT," + // 2: taskCode
+ "\"MARKER_ID\" TEXT," + // 3: markerId
+ "\"LNG\" REAL NOT NULL ," + // 4: lng
+ "\"LAT\" REAL NOT NULL ," + // 5: lat
+ "\"IS_DETECTED\" TEXT," + // 6: isDetected
+ "\"DETECTED_TIME\" TEXT);"); // 7: detectedTime
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ TaskMarkerLocalBean entity = new TaskMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskCode
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // markerId
+ cursor.getDouble(offset + 4), // lng
+ cursor.getDouble(offset + 5), // lat
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // isDetected
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // detectedTime
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setTaskCode(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setMarkerId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setLng(cursor.getDouble(offset + 4));
+ entity.setLat(cursor.getDouble(offset + 5));
+ entity.setIsDetected(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setDetectedTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskMarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/model/TaskDetailLocalModel.java b/app/src/main/java/com/casic/electric/detector/model/TaskDetailLocalModel.java
new file mode 100644
index 0000000..a7c993c
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/model/TaskDetailLocalModel.java
@@ -0,0 +1,147 @@
+package com.casic.electric.detector.model;
+
+import java.util.List;
+
+/**
+ * Task本地库数据模型类,包含Task里面的Marker
+ */
+public class TaskDetailLocalModel {
+ private String taskId;//任务ID
+ private String taskCode;//任务编号
+ private String description;//任务名称
+ private String createTime;//任务创建的时间
+ private String status;//任务状态
+ private String createUserName;//任务创建者名称
+ private String startTime;//任务被开始执行的时间
+ private String endTime;//任务执行结束的时间
+ private String isFreeTask;//是否自由巡检。1-是,0-否
+ private List
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property MarkerObjType = new Property(1, String.class, "markerObjType", false, "MARKER_OBJ_TYPE");
- public final static Property MarkerNumber = new Property(2, String.class, "markerNumber", false, "MARKER_NUMBER");
- public final static Property ObjectName = new Property(3, String.class, "objectName", false, "OBJECT_NAME");
- public final static Property VoltageLevel = new Property(4, String.class, "voltageLevel", false, "VOLTAGE_LEVEL");
- public final static Property TransformerModel = new Property(5, String.class, "transformerModel", false, "TRANSFORMER_MODEL");
- public final static Property HoleCount = new Property(6, String.class, "holeCount", false, "HOLE_COUNT");
- public final static Property Capacity = new Property(7, String.class, "capacity", false, "CAPACITY");
- public final static Property WellCoverMaterial = new Property(8, String.class, "wellCoverMaterial", false, "WELL_COVER_MATERIAL");
- public final static Property CoverDepth = new Property(9, String.class, "coverDepth", false, "COVER_DEPTH");
- public final static Property TransformerSpec = new Property(10, String.class, "transformerSpec", false, "TRANSFORMER_SPEC");
- public final static Property InlineName = new Property(11, String.class, "inlineName", false, "INLINE_NAME");
- public final static Property Size = new Property(12, String.class, "size", false, "SIZE");
- public final static Property BottomDepth = new Property(13, String.class, "bottomDepth", false, "BOTTOM_DEPTH");
- public final static Property Height = new Property(14, String.class, "height", false, "HEIGHT");
- public final static Property CrossPipeLine = new Property(15, String.class, "crossPipeLine", false, "CROSS_PIPE_LINE");
- public final static Property InlineCount = new Property(16, String.class, "inlineCount", false, "INLINE_COUNT");
- public final static Property LineNumber = new Property(17, String.class, "lineNumber", false, "LINE_NUMBER");
- public final static Property JointCount = new Property(18, String.class, "jointCount", false, "JOINT_COUNT");
- public final static Property OutlineCount = new Property(19, String.class, "outlineCount", false, "OUTLINE_COUNT");
- public final static Property RemainingChannels = new Property(20, String.class, "remainingChannels", false, "REMAINING_CHANNELS");
- public final static Property CabinetType = new Property(21, String.class, "cabinetType", false, "CABINET_TYPE");
- public final static Property TieCable1 = new Property(22, String.class, "tieCable1", false, "TIE_CABLE1");
- public final static Property TieCable2 = new Property(23, String.class, "tieCable2", false, "TIE_CABLE2");
- public final static Property CasingMaterial = new Property(24, String.class, "casingMaterial", false, "CASING_MATERIAL");
- public final static Property CasingSpec = new Property(25, String.class, "casingSpec", false, "CASING_SPEC");
- public final static Property ConstructTime = new Property(26, String.class, "constructTime", false, "CONSTRUCT_TIME");
- public final static Property InspectionUnit = new Property(27, String.class, "inspectionUnit", false, "INSPECTION_UNIT");
- public final static Property Area = new Property(28, String.class, "area", false, "AREA");
- public final static Property Road = new Property(29, String.class, "road", false, "ROAD");
- public final static Property Memo1 = new Property(30, String.class, "memo1", false, "MEMO1");
- public final static Property Memo2 = new Property(31, String.class, "memo2", false, "MEMO2");
- public final static Property Memo3 = new Property(32, String.class, "memo3", false, "MEMO3");
- public final static Property MarkerId = new Property(33, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerType = new Property(34, String.class, "markerType", false, "MARKER_TYPE");
- public final static Property Owner = new Property(35, String.class, "owner", false, "OWNER");
- public final static Property MarkerDepth = new Property(36, String.class, "markerDepth", false, "MARKER_DEPTH");
- public final static Property ElectricTagCount = new Property(37, String.class, "electricTagCount", false, "ELECTRIC_TAG_COUNT");
- public final static Property InstalledTime = new Property(38, String.class, "installedTime", false, "INSTALLED_TIME");
- public final static Property Longitude = new Property(39, String.class, "longitude", false, "LONGITUDE");
- public final static Property Latitude = new Property(40, String.class, "latitude", false, "LATITUDE");
- public final static Property MarkerMemo1 = new Property(41, String.class, "markerMemo1", false, "MARKER_MEMO1");
- public final static Property MarkerMemo2 = new Property(42, String.class, "markerMemo2", false, "MARKER_MEMO2");
- public final static Property MarkerMemo3 = new Property(43, String.class, "markerMemo3", false, "MARKER_MEMO3");
- public final static Property ImagePath = new Property(44, String.class, "imagePath", false, "IMAGE_PATH");
- }
-
-
- public LabelBeanDao(DaoConfig config) {
- super(config);
- }
-
- public LabelBeanDao(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 + "\"LABEL_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"MARKER_OBJ_TYPE\" TEXT," + // 1: markerObjType
- "\"MARKER_NUMBER\" TEXT," + // 2: markerNumber
- "\"OBJECT_NAME\" TEXT," + // 3: objectName
- "\"VOLTAGE_LEVEL\" TEXT," + // 4: voltageLevel
- "\"TRANSFORMER_MODEL\" TEXT," + // 5: transformerModel
- "\"HOLE_COUNT\" TEXT," + // 6: holeCount
- "\"CAPACITY\" TEXT," + // 7: capacity
- "\"WELL_COVER_MATERIAL\" TEXT," + // 8: wellCoverMaterial
- "\"COVER_DEPTH\" TEXT," + // 9: coverDepth
- "\"TRANSFORMER_SPEC\" TEXT," + // 10: transformerSpec
- "\"INLINE_NAME\" TEXT," + // 11: inlineName
- "\"SIZE\" TEXT," + // 12: size
- "\"BOTTOM_DEPTH\" TEXT," + // 13: bottomDepth
- "\"HEIGHT\" TEXT," + // 14: height
- "\"CROSS_PIPE_LINE\" TEXT," + // 15: crossPipeLine
- "\"INLINE_COUNT\" TEXT," + // 16: inlineCount
- "\"LINE_NUMBER\" TEXT," + // 17: lineNumber
- "\"JOINT_COUNT\" TEXT," + // 18: jointCount
- "\"OUTLINE_COUNT\" TEXT," + // 19: outlineCount
- "\"REMAINING_CHANNELS\" TEXT," + // 20: remainingChannels
- "\"CABINET_TYPE\" TEXT," + // 21: cabinetType
- "\"TIE_CABLE1\" TEXT," + // 22: tieCable1
- "\"TIE_CABLE2\" TEXT," + // 23: tieCable2
- "\"CASING_MATERIAL\" TEXT," + // 24: casingMaterial
- "\"CASING_SPEC\" TEXT," + // 25: casingSpec
- "\"CONSTRUCT_TIME\" TEXT," + // 26: constructTime
- "\"INSPECTION_UNIT\" TEXT," + // 27: inspectionUnit
- "\"AREA\" TEXT," + // 28: area
- "\"ROAD\" TEXT," + // 29: road
- "\"MEMO1\" TEXT," + // 30: memo1
- "\"MEMO2\" TEXT," + // 31: memo2
- "\"MEMO3\" TEXT," + // 32: memo3
- "\"MARKER_ID\" TEXT," + // 33: markerId
- "\"MARKER_TYPE\" TEXT," + // 34: markerType
- "\"OWNER\" TEXT," + // 35: owner
- "\"MARKER_DEPTH\" TEXT," + // 36: markerDepth
- "\"ELECTRIC_TAG_COUNT\" TEXT," + // 37: electricTagCount
- "\"INSTALLED_TIME\" TEXT," + // 38: installedTime
- "\"LONGITUDE\" TEXT," + // 39: longitude
- "\"LATITUDE\" TEXT," + // 40: latitude
- "\"MARKER_MEMO1\" TEXT," + // 41: markerMemo1
- "\"MARKER_MEMO2\" TEXT," + // 42: markerMemo2
- "\"MARKER_MEMO3\" TEXT," + // 43: markerMemo3
- "\"IMAGE_PATH\" TEXT);"); // 44: imagePath
- }
-
- /** Drops the underlying database table. */
- public static void dropTable(Database db, boolean ifExists) {
- String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"LABEL_BEAN\"";
- db.execSQL(sql);
- }
-
- @Override
- protected final void bindValues(DatabaseStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- protected final void bindValues(SQLiteStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public LabelBean readEntity(Cursor cursor, int offset) {
- LabelBean entity = new LabelBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerObjType
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // markerNumber
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // objectName
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // voltageLevel
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // transformerModel
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // holeCount
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // capacity
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // wellCoverMaterial
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // coverDepth
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // transformerSpec
- cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // inlineName
- cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // size
- cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // bottomDepth
- cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // height
- cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // crossPipeLine
- cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // inlineCount
- cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lineNumber
- cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // jointCount
- cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // outlineCount
- cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // remainingChannels
- cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // cabinetType
- cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // tieCable1
- cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // tieCable2
- cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // casingMaterial
- cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // casingSpec
- cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26), // constructTime
- cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27), // inspectionUnit
- cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28), // area
- cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29), // road
- cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30), // memo1
- cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31), // memo2
- cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32), // memo3
- cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33), // markerId
- cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34), // markerType
- cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35), // owner
- cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36), // markerDepth
- cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37), // electricTagCount
- cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38), // installedTime
- cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39), // longitude
- cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40), // latitude
- cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41), // markerMemo1
- cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42), // markerMemo2
- cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43), // markerMemo3
- cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44) // imagePath
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, LabelBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setMarkerObjType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setMarkerNumber(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setObjectName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setVoltageLevel(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setTransformerModel(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setHoleCount(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setCapacity(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setWellCoverMaterial(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setCoverDepth(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- entity.setTransformerSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
- entity.setInlineName(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
- entity.setSize(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
- entity.setBottomDepth(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
- entity.setHeight(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
- entity.setCrossPipeLine(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
- entity.setInlineCount(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
- entity.setLineNumber(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
- entity.setJointCount(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
- entity.setOutlineCount(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
- entity.setRemainingChannels(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
- entity.setCabinetType(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
- entity.setTieCable1(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
- entity.setTieCable2(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
- entity.setCasingMaterial(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
- entity.setCasingSpec(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
- entity.setConstructTime(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
- entity.setInspectionUnit(cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27));
- entity.setArea(cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28));
- entity.setRoad(cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29));
- entity.setMemo1(cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30));
- entity.setMemo2(cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31));
- entity.setMemo3(cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32));
- entity.setMarkerId(cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33));
- entity.setMarkerType(cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34));
- entity.setOwner(cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35));
- entity.setMarkerDepth(cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36));
- entity.setElectricTagCount(cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37));
- entity.setInstalledTime(cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38));
- entity.setLongitude(cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39));
- entity.setLatitude(cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40));
- entity.setMarkerMemo1(cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41));
- entity.setMarkerMemo2(cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42));
- entity.setMarkerMemo3(cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43));
- entity.setImagePath(cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(LabelBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(LabelBean entity) {
- if(entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(LabelBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java
new file mode 100644
index 0000000..9f2afa5
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java
@@ -0,0 +1,479 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.MarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "MARKER_LOCAL_BEAN".
+*/
+public class MarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property PipelineType = new Property(1, String.class, "pipelineType", false, "PIPELINE_TYPE");
+ public final static Property PipelineDiameter = new Property(2, String.class, "pipelineDiameter", false, "PIPELINE_DIAMETER");
+ public final static Property PipelineMaterial = new Property(3, String.class, "pipelineMaterial", false, "PIPELINE_MATERIAL");
+ public final static Property BuryMethod = new Property(4, String.class, "buryMethod", false, "BURY_METHOD");
+ public final static Property BuryDepth = new Property(5, String.class, "buryDepth", false, "BURY_DEPTH");
+ public final static Property Area = new Property(6, String.class, "area", false, "AREA");
+ public final static Property Line = new Property(7, String.class, "line", false, "LINE");
+ public final static Property Road = new Property(8, String.class, "road", false, "ROAD");
+ public final static Property ConstructTime = new Property(9, String.class, "constructTime", false, "CONSTRUCT_TIME");
+ public final static Property Owner = new Property(10, String.class, "owner", false, "OWNER");
+ public final static Property ObjectId = new Property(11, String.class, "objectId", false, "OBJECT_ID");
+ public final static Property MarkerId = new Property(12, String.class, "markerId", false, "MARKER_ID");
+ public final static Property MarkerType = new Property(13, String.class, "markerType", false, "MARKER_TYPE");
+ public final static Property MarkerDepth = new Property(14, String.class, "markerDepth", false, "MARKER_DEPTH");
+ public final static Property InstallationDept = new Property(15, String.class, "installationDept", false, "INSTALLATION_DEPT");
+ public final static Property Lng = new Property(16, String.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(17, String.class, "lat", false, "LAT");
+ public final static Property UpdateTime = new Property(18, String.class, "updateTime", false, "UPDATE_TIME");
+ public final static Property Remark = new Property(19, String.class, "remark", false, "REMARK");
+ public final static Property UnderlyingPipelineType = new Property(20, String.class, "underlyingPipelineType", false, "UNDERLYING_PIPELINE_TYPE");
+ public final static Property UnderlyingPipelineDepth = new Property(21, String.class, "underlyingPipelineDepth", false, "UNDERLYING_PIPELINE_DEPTH");
+ public final static Property UnderlyingPipelineDiameter = new Property(22, String.class, "underlyingPipelineDiameter", false, "UNDERLYING_PIPELINE_DIAMETER");
+ public final static Property UnderlyingPipelineMaterial = new Property(23, String.class, "underlyingPipelineMaterial", false, "UNDERLYING_PIPELINE_MATERIAL");
+ public final static Property ObjectType = new Property(24, String.class, "objectType", false, "OBJECT_TYPE");
+ public final static Property Color = new Property(25, String.class, "color", false, "COLOR");
+ public final static Property ImagePath = new Property(26, String.class, "imagePath", false, "IMAGE_PATH");
+ }
+
+
+ public MarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public MarkerLocalBeanDao(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 + "\"MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
+ "\"PIPELINE_TYPE\" TEXT," + // 1: pipelineType
+ "\"PIPELINE_DIAMETER\" TEXT," + // 2: pipelineDiameter
+ "\"PIPELINE_MATERIAL\" TEXT," + // 3: pipelineMaterial
+ "\"BURY_METHOD\" TEXT," + // 4: buryMethod
+ "\"BURY_DEPTH\" TEXT," + // 5: buryDepth
+ "\"AREA\" TEXT," + // 6: area
+ "\"LINE\" TEXT," + // 7: line
+ "\"ROAD\" TEXT," + // 8: road
+ "\"CONSTRUCT_TIME\" TEXT," + // 9: constructTime
+ "\"OWNER\" TEXT," + // 10: owner
+ "\"OBJECT_ID\" TEXT," + // 11: objectId
+ "\"MARKER_ID\" TEXT," + // 12: markerId
+ "\"MARKER_TYPE\" TEXT," + // 13: markerType
+ "\"MARKER_DEPTH\" TEXT," + // 14: markerDepth
+ "\"INSTALLATION_DEPT\" TEXT," + // 15: installationDept
+ "\"LNG\" TEXT," + // 16: lng
+ "\"LAT\" TEXT," + // 17: lat
+ "\"UPDATE_TIME\" TEXT," + // 18: updateTime
+ "\"REMARK\" TEXT," + // 19: remark
+ "\"UNDERLYING_PIPELINE_TYPE\" TEXT," + // 20: underlyingPipelineType
+ "\"UNDERLYING_PIPELINE_DEPTH\" TEXT," + // 21: underlyingPipelineDepth
+ "\"UNDERLYING_PIPELINE_DIAMETER\" TEXT," + // 22: underlyingPipelineDiameter
+ "\"UNDERLYING_PIPELINE_MATERIAL\" TEXT," + // 23: underlyingPipelineMaterial
+ "\"OBJECT_TYPE\" TEXT," + // 24: objectType
+ "\"COLOR\" TEXT," + // 25: color
+ "\"IMAGE_PATH\" TEXT);"); // 26: imagePath
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, MarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String pipelineType = entity.getPipelineType();
+ if (pipelineType != null) {
+ stmt.bindString(2, pipelineType);
+ }
+
+ String pipelineDiameter = entity.getPipelineDiameter();
+ if (pipelineDiameter != null) {
+ stmt.bindString(3, pipelineDiameter);
+ }
+
+ String pipelineMaterial = entity.getPipelineMaterial();
+ if (pipelineMaterial != null) {
+ stmt.bindString(4, pipelineMaterial);
+ }
+
+ String buryMethod = entity.getBuryMethod();
+ if (buryMethod != null) {
+ stmt.bindString(5, buryMethod);
+ }
+
+ String buryDepth = entity.getBuryDepth();
+ if (buryDepth != null) {
+ stmt.bindString(6, buryDepth);
+ }
+
+ String area = entity.getArea();
+ if (area != null) {
+ stmt.bindString(7, area);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String road = entity.getRoad();
+ if (road != null) {
+ stmt.bindString(9, road);
+ }
+
+ String constructTime = entity.getConstructTime();
+ if (constructTime != null) {
+ stmt.bindString(10, constructTime);
+ }
+
+ String owner = entity.getOwner();
+ if (owner != null) {
+ stmt.bindString(11, owner);
+ }
+
+ String objectId = entity.getObjectId();
+ if (objectId != null) {
+ stmt.bindString(12, objectId);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(13, markerId);
+ }
+
+ String markerType = entity.getMarkerType();
+ if (markerType != null) {
+ stmt.bindString(14, markerType);
+ }
+
+ String markerDepth = entity.getMarkerDepth();
+ if (markerDepth != null) {
+ stmt.bindString(15, markerDepth);
+ }
+
+ String installationDept = entity.getInstallationDept();
+ if (installationDept != null) {
+ stmt.bindString(16, installationDept);
+ }
+
+ String lng = entity.getLng();
+ if (lng != null) {
+ stmt.bindString(17, lng);
+ }
+
+ String lat = entity.getLat();
+ if (lat != null) {
+ stmt.bindString(18, lat);
+ }
+
+ String updateTime = entity.getUpdateTime();
+ if (updateTime != null) {
+ stmt.bindString(19, updateTime);
+ }
+
+ String remark = entity.getRemark();
+ if (remark != null) {
+ stmt.bindString(20, remark);
+ }
+
+ String underlyingPipelineType = entity.getUnderlyingPipelineType();
+ if (underlyingPipelineType != null) {
+ stmt.bindString(21, underlyingPipelineType);
+ }
+
+ String underlyingPipelineDepth = entity.getUnderlyingPipelineDepth();
+ if (underlyingPipelineDepth != null) {
+ stmt.bindString(22, underlyingPipelineDepth);
+ }
+
+ String underlyingPipelineDiameter = entity.getUnderlyingPipelineDiameter();
+ if (underlyingPipelineDiameter != null) {
+ stmt.bindString(23, underlyingPipelineDiameter);
+ }
+
+ String underlyingPipelineMaterial = entity.getUnderlyingPipelineMaterial();
+ if (underlyingPipelineMaterial != null) {
+ stmt.bindString(24, underlyingPipelineMaterial);
+ }
+
+ String objectType = entity.getObjectType();
+ if (objectType != null) {
+ stmt.bindString(25, objectType);
+ }
+
+ String color = entity.getColor();
+ if (color != null) {
+ stmt.bindString(26, color);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(27, imagePath);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, MarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String pipelineType = entity.getPipelineType();
+ if (pipelineType != null) {
+ stmt.bindString(2, pipelineType);
+ }
+
+ String pipelineDiameter = entity.getPipelineDiameter();
+ if (pipelineDiameter != null) {
+ stmt.bindString(3, pipelineDiameter);
+ }
+
+ String pipelineMaterial = entity.getPipelineMaterial();
+ if (pipelineMaterial != null) {
+ stmt.bindString(4, pipelineMaterial);
+ }
+
+ String buryMethod = entity.getBuryMethod();
+ if (buryMethod != null) {
+ stmt.bindString(5, buryMethod);
+ }
+
+ String buryDepth = entity.getBuryDepth();
+ if (buryDepth != null) {
+ stmt.bindString(6, buryDepth);
+ }
+
+ String area = entity.getArea();
+ if (area != null) {
+ stmt.bindString(7, area);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String road = entity.getRoad();
+ if (road != null) {
+ stmt.bindString(9, road);
+ }
+
+ String constructTime = entity.getConstructTime();
+ if (constructTime != null) {
+ stmt.bindString(10, constructTime);
+ }
+
+ String owner = entity.getOwner();
+ if (owner != null) {
+ stmt.bindString(11, owner);
+ }
+
+ String objectId = entity.getObjectId();
+ if (objectId != null) {
+ stmt.bindString(12, objectId);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(13, markerId);
+ }
+
+ String markerType = entity.getMarkerType();
+ if (markerType != null) {
+ stmt.bindString(14, markerType);
+ }
+
+ String markerDepth = entity.getMarkerDepth();
+ if (markerDepth != null) {
+ stmt.bindString(15, markerDepth);
+ }
+
+ String installationDept = entity.getInstallationDept();
+ if (installationDept != null) {
+ stmt.bindString(16, installationDept);
+ }
+
+ String lng = entity.getLng();
+ if (lng != null) {
+ stmt.bindString(17, lng);
+ }
+
+ String lat = entity.getLat();
+ if (lat != null) {
+ stmt.bindString(18, lat);
+ }
+
+ String updateTime = entity.getUpdateTime();
+ if (updateTime != null) {
+ stmt.bindString(19, updateTime);
+ }
+
+ String remark = entity.getRemark();
+ if (remark != null) {
+ stmt.bindString(20, remark);
+ }
+
+ String underlyingPipelineType = entity.getUnderlyingPipelineType();
+ if (underlyingPipelineType != null) {
+ stmt.bindString(21, underlyingPipelineType);
+ }
+
+ String underlyingPipelineDepth = entity.getUnderlyingPipelineDepth();
+ if (underlyingPipelineDepth != null) {
+ stmt.bindString(22, underlyingPipelineDepth);
+ }
+
+ String underlyingPipelineDiameter = entity.getUnderlyingPipelineDiameter();
+ if (underlyingPipelineDiameter != null) {
+ stmt.bindString(23, underlyingPipelineDiameter);
+ }
+
+ String underlyingPipelineMaterial = entity.getUnderlyingPipelineMaterial();
+ if (underlyingPipelineMaterial != null) {
+ stmt.bindString(24, underlyingPipelineMaterial);
+ }
+
+ String objectType = entity.getObjectType();
+ if (objectType != null) {
+ stmt.bindString(25, objectType);
+ }
+
+ String color = entity.getColor();
+ if (color != null) {
+ stmt.bindString(26, color);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(27, imagePath);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public MarkerLocalBean readEntity(Cursor cursor, int offset) {
+ MarkerLocalBean entity = new MarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // pipelineType
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // pipelineDiameter
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // pipelineMaterial
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // buryMethod
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // buryDepth
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // area
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // road
+ cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // constructTime
+ cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // owner
+ cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // objectId
+ cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // markerId
+ cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // markerType
+ cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // markerDepth
+ cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // installationDept
+ cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // lng
+ cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lat
+ cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // updateTime
+ cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // remark
+ cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // underlyingPipelineType
+ cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // underlyingPipelineDepth
+ cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // underlyingPipelineDiameter
+ cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // underlyingPipelineMaterial
+ cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // objectType
+ cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // color
+ cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26) // imagePath
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, MarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setPipelineType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setPipelineDiameter(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setPipelineMaterial(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setBuryMethod(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setBuryDepth(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setArea(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setRoad(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ entity.setConstructTime(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
+ entity.setOwner(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
+ entity.setObjectId(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
+ entity.setMarkerId(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
+ entity.setMarkerType(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
+ entity.setMarkerDepth(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
+ entity.setInstallationDept(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
+ entity.setLng(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
+ entity.setLat(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
+ entity.setUpdateTime(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
+ entity.setRemark(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
+ entity.setUnderlyingPipelineType(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
+ entity.setUnderlyingPipelineDepth(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
+ entity.setUnderlyingPipelineDiameter(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
+ entity.setUnderlyingPipelineMaterial(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
+ entity.setObjectType(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
+ entity.setColor(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
+ entity.setImagePath(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(MarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(MarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(MarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
index 18b1b7b..9d99b8d 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
@@ -3,7 +3,7 @@
import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;
-import com.casic.electric.detector.bean.SmallLabelBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.Property;
@@ -12,10 +12,11 @@
import org.greenrobot.greendao.internal.DaoConfig;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-/**
+
+/**
* DAO for table "SMALL_LABEL_BEAN".
-*/
-public class SmallLabelBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property MarkerId = new Property(1, String.class, "markerId", false, "MARKER_ID");
+ public final static Property LocationNumber = new Property(2, String.class, "locationNumber", false, "LOCATION_NUMBER");
+ public final static Property LocationName = new Property(3, String.class, "locationName", false, "LOCATION_NAME");
+ public final static Property ElectricMarkerId = new Property(4, String.class, "electricMarkerId", false, "ELECTRIC_MARKER_ID");
+ public final static Property CableName = new Property(5, String.class, "cableName", false, "CABLE_NAME");
+ public final static Property CableNumber = new Property(6, String.class, "cableNumber", false, "CABLE_NUMBER");
+ public final static Property Line = new Property(7, String.class, "line", false, "LINE");
+ public final static Property VoltageLevel = new Property(8, String.class, "voltageLevel", false, "VOLTAGE_LEVEL");
+ public final static Property CableType = new Property(9, String.class, "cableType", false, "CABLE_TYPE");
+ public final static Property CableSpec = new Property(10, String.class, "cableSpec", false, "CABLE_SPEC");
+ public final static Property CableBrand = new Property(11, String.class, "cableBrand", false, "CABLE_BRAND");
+ public final static Property CableStart = new Property(12, String.class, "cableStart", false, "CABLE_START");
+ public final static Property CableEnd = new Property(13, String.class, "cableEnd", false, "CABLE_END");
+ public final static Property HasJoint = new Property(14, String.class, "hasJoint", false, "HAS_JOINT");
+ public final static Property JointCreator = new Property(15, String.class, "jointCreator", false, "JOINT_CREATOR");
+ public final static Property ImagePath = new Property(16, String.class, "imagePath", false, "IMAGE_PATH");
+ public final static Property Memo1 = new Property(17, String.class, "memo1", false, "MEMO1");
+ public final static Property Memo2 = new Property(18, String.class, "memo2", false, "MEMO2");
+ public final static Property Memo3 = new Property(19, String.class, "memo3", false, "MEMO3");
+ }
+
+
+ public SmallMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public SmallMarkerLocalBeanDao(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 + "\"SMALL_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
+ "\"MARKER_ID\" TEXT," + // 1: markerId
+ "\"LOCATION_NUMBER\" TEXT," + // 2: locationNumber
+ "\"LOCATION_NAME\" TEXT," + // 3: locationName
+ "\"ELECTRIC_MARKER_ID\" TEXT," + // 4: electricMarkerId
+ "\"CABLE_NAME\" TEXT," + // 5: cableName
+ "\"CABLE_NUMBER\" TEXT," + // 6: cableNumber
+ "\"LINE\" TEXT," + // 7: line
+ "\"VOLTAGE_LEVEL\" TEXT," + // 8: voltageLevel
+ "\"CABLE_TYPE\" TEXT," + // 9: cableType
+ "\"CABLE_SPEC\" TEXT," + // 10: cableSpec
+ "\"CABLE_BRAND\" TEXT," + // 11: cableBrand
+ "\"CABLE_START\" TEXT," + // 12: cableStart
+ "\"CABLE_END\" TEXT," + // 13: cableEnd
+ "\"HAS_JOINT\" TEXT," + // 14: hasJoint
+ "\"JOINT_CREATOR\" TEXT," + // 15: jointCreator
+ "\"IMAGE_PATH\" TEXT," + // 16: imagePath
+ "\"MEMO1\" TEXT," + // 17: memo1
+ "\"MEMO2\" TEXT," + // 18: memo2
+ "\"MEMO3\" TEXT);"); // 19: memo3
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"SMALL_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, SmallMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(2, markerId);
+ }
+
+ String locationNumber = entity.getLocationNumber();
+ if (locationNumber != null) {
+ stmt.bindString(3, locationNumber);
+ }
+
+ String locationName = entity.getLocationName();
+ if (locationName != null) {
+ stmt.bindString(4, locationName);
+ }
+
+ String electricMarkerId = entity.getElectricMarkerId();
+ if (electricMarkerId != null) {
+ stmt.bindString(5, electricMarkerId);
+ }
+
+ String cableName = entity.getCableName();
+ if (cableName != null) {
+ stmt.bindString(6, cableName);
+ }
+
+ String cableNumber = entity.getCableNumber();
+ if (cableNumber != null) {
+ stmt.bindString(7, cableNumber);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String voltageLevel = entity.getVoltageLevel();
+ if (voltageLevel != null) {
+ stmt.bindString(9, voltageLevel);
+ }
+
+ String cableType = entity.getCableType();
+ if (cableType != null) {
+ stmt.bindString(10, cableType);
+ }
+
+ String cableSpec = entity.getCableSpec();
+ if (cableSpec != null) {
+ stmt.bindString(11, cableSpec);
+ }
+
+ String cableBrand = entity.getCableBrand();
+ if (cableBrand != null) {
+ stmt.bindString(12, cableBrand);
+ }
+
+ String cableStart = entity.getCableStart();
+ if (cableStart != null) {
+ stmt.bindString(13, cableStart);
+ }
+
+ String cableEnd = entity.getCableEnd();
+ if (cableEnd != null) {
+ stmt.bindString(14, cableEnd);
+ }
+
+ String hasJoint = entity.getHasJoint();
+ if (hasJoint != null) {
+ stmt.bindString(15, hasJoint);
+ }
+
+ String jointCreator = entity.getJointCreator();
+ if (jointCreator != null) {
+ stmt.bindString(16, jointCreator);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(17, imagePath);
+ }
+
+ String memo1 = entity.getMemo1();
+ if (memo1 != null) {
+ stmt.bindString(18, memo1);
+ }
+
+ String memo2 = entity.getMemo2();
+ if (memo2 != null) {
+ stmt.bindString(19, memo2);
+ }
+
+ String memo3 = entity.getMemo3();
+ if (memo3 != null) {
+ stmt.bindString(20, memo3);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, SmallMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(2, markerId);
+ }
+
+ String locationNumber = entity.getLocationNumber();
+ if (locationNumber != null) {
+ stmt.bindString(3, locationNumber);
+ }
+
+ String locationName = entity.getLocationName();
+ if (locationName != null) {
+ stmt.bindString(4, locationName);
+ }
+
+ String electricMarkerId = entity.getElectricMarkerId();
+ if (electricMarkerId != null) {
+ stmt.bindString(5, electricMarkerId);
+ }
+
+ String cableName = entity.getCableName();
+ if (cableName != null) {
+ stmt.bindString(6, cableName);
+ }
+
+ String cableNumber = entity.getCableNumber();
+ if (cableNumber != null) {
+ stmt.bindString(7, cableNumber);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String voltageLevel = entity.getVoltageLevel();
+ if (voltageLevel != null) {
+ stmt.bindString(9, voltageLevel);
+ }
+
+ String cableType = entity.getCableType();
+ if (cableType != null) {
+ stmt.bindString(10, cableType);
+ }
+
+ String cableSpec = entity.getCableSpec();
+ if (cableSpec != null) {
+ stmt.bindString(11, cableSpec);
+ }
+
+ String cableBrand = entity.getCableBrand();
+ if (cableBrand != null) {
+ stmt.bindString(12, cableBrand);
+ }
+
+ String cableStart = entity.getCableStart();
+ if (cableStart != null) {
+ stmt.bindString(13, cableStart);
+ }
+
+ String cableEnd = entity.getCableEnd();
+ if (cableEnd != null) {
+ stmt.bindString(14, cableEnd);
+ }
+
+ String hasJoint = entity.getHasJoint();
+ if (hasJoint != null) {
+ stmt.bindString(15, hasJoint);
+ }
+
+ String jointCreator = entity.getJointCreator();
+ if (jointCreator != null) {
+ stmt.bindString(16, jointCreator);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(17, imagePath);
+ }
+
+ String memo1 = entity.getMemo1();
+ if (memo1 != null) {
+ stmt.bindString(18, memo1);
+ }
+
+ String memo2 = entity.getMemo2();
+ if (memo2 != null) {
+ stmt.bindString(19, memo2);
+ }
+
+ String memo3 = entity.getMemo3();
+ if (memo3 != null) {
+ stmt.bindString(20, memo3);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public SmallMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ SmallMarkerLocalBean entity = new SmallMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // locationNumber
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // locationName
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // electricMarkerId
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // cableName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // cableNumber
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // voltageLevel
+ cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // cableType
+ cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // cableSpec
+ cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // cableBrand
+ cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // cableStart
+ cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // cableEnd
+ cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // hasJoint
+ cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // jointCreator
+ cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // imagePath
+ cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // memo1
+ cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // memo2
+ cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19) // memo3
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, SmallMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setMarkerId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setLocationNumber(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setLocationName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setElectricMarkerId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCableName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setCableNumber(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setVoltageLevel(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ entity.setCableType(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
+ entity.setCableSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
+ entity.setCableBrand(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
+ entity.setCableStart(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
+ entity.setCableEnd(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
+ entity.setHasJoint(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
+ entity.setJointCreator(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
+ entity.setImagePath(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
+ entity.setMemo1(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
+ entity.setMemo2(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
+ entity.setMemo3(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(SmallMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(SmallMarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(SmallMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java
deleted file mode 100644
index 802ffb0..0000000
--- a/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java
+++ /dev/null
@@ -1,241 +0,0 @@
-package com.casic.electric.detector.greendao;
-
-import android.database.Cursor;
-import android.database.sqlite.SQLiteStatement;
-
-import com.casic.electric.detector.bean.TaskBean;
-
-import org.greenrobot.greendao.AbstractDao;
-import org.greenrobot.greendao.Property;
-import org.greenrobot.greendao.database.Database;
-import org.greenrobot.greendao.database.DatabaseStatement;
-import org.greenrobot.greendao.internal.DaoConfig;
-
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-/**
- * DAO for table "TASK_BEAN".
-*/
-public class TaskBeanDao extends AbstractDao
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property TaskId = new Property(1, String.class, "taskId", false, "TASK_ID");
- public final static Property TaskCode = new Property(2, String.class, "taskCode", false, "TASK_CODE");
- public final static Property MarkerId = new Property(3, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerRealId = new Property(4, String.class, "markerRealId", false, "MARKER_REAL_ID");
- public final static Property Scanner = new Property(5, String.class, "scanner", false, "SCANNER");
- public final static Property Lng = new Property(6, String.class, "lng", false, "LNG");
- public final static Property Lat = new Property(7, String.class, "lat", false, "LAT");
- public final static Property State = new Property(8, String.class, "state", false, "STATE");
- public final static Property Desc = new Property(9, String.class, "desc", false, "DESC");
- }
-
-
- public TaskBeanDao(DaoConfig config) {
- super(config);
- }
-
- public TaskBeanDao(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 + "\"TASK_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"TASK_ID\" TEXT," + // 1: taskId
- "\"TASK_CODE\" TEXT," + // 2: taskCode
- "\"MARKER_ID\" TEXT," + // 3: markerId
- "\"MARKER_REAL_ID\" TEXT," + // 4: markerRealId
- "\"SCANNER\" TEXT," + // 5: scanner
- "\"LNG\" TEXT," + // 6: lng
- "\"LAT\" TEXT," + // 7: lat
- "\"STATE\" TEXT," + // 8: state
- "\"DESC\" TEXT);"); // 9: desc
- }
-
- /** Drops the underlying database table. */
- public static void dropTable(Database db, boolean ifExists) {
- String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_BEAN\"";
- db.execSQL(sql);
- }
-
- @Override
- protected final void bindValues(DatabaseStatement stmt, TaskBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(2, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(3, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(4, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(5, markerRealId);
- }
-
- String scanner = entity.getScanner();
- if (scanner != null) {
- stmt.bindString(6, scanner);
- }
-
- String lng = entity.getLng();
- if (lng != null) {
- stmt.bindString(7, lng);
- }
-
- String lat = entity.getLat();
- if (lat != null) {
- stmt.bindString(8, lat);
- }
-
- String state = entity.getState();
- if (state != null) {
- stmt.bindString(9, state);
- }
-
- String desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(10, desc);
- }
- }
-
- @Override
- protected final void bindValues(SQLiteStatement stmt, TaskBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(2, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(3, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(4, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(5, markerRealId);
- }
-
- String scanner = entity.getScanner();
- if (scanner != null) {
- stmt.bindString(6, scanner);
- }
-
- String lng = entity.getLng();
- if (lng != null) {
- stmt.bindString(7, lng);
- }
-
- String lat = entity.getLat();
- if (lat != null) {
- stmt.bindString(8, lat);
- }
-
- String state = entity.getState();
- if (state != null) {
- stmt.bindString(9, state);
- }
-
- String desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(10, desc);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public TaskBean readEntity(Cursor cursor, int offset) {
- TaskBean entity = new TaskBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskId
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskCode
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // markerId
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // markerRealId
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // scanner
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // lng
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // lat
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // state
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9) // desc
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, TaskBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setTaskId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setTaskCode(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setMarkerId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setMarkerRealId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setScanner(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setLng(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLat(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setState(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setDesc(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(TaskBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(TaskBean entity) {
- if(entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(TaskBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java
new file mode 100644
index 0000000..330af6b
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java
@@ -0,0 +1,227 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.TaskLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "TASK_LOCAL_BEAN".
+*/
+public class TaskLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskCode = new Property(1, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property Description = new Property(2, String.class, "description", false, "DESCRIPTION");
+ public final static Property CreateTime = new Property(3, String.class, "createTime", false, "CREATE_TIME");
+ public final static Property Status = new Property(4, String.class, "status", false, "STATUS");
+ public final static Property CreateUserName = new Property(5, String.class, "createUserName", false, "CREATE_USER_NAME");
+ public final static Property StartTime = new Property(6, String.class, "startTime", false, "START_TIME");
+ public final static Property EndTime = new Property(7, String.class, "endTime", false, "END_TIME");
+ public final static Property IsFreeTask = new Property(8, String.class, "isFreeTask", false, "IS_FREE_TASK");
+ }
+
+
+ public TaskLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskLocalBeanDao(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 + "\"TASK_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_CODE\" TEXT," + // 1: taskCode
+ "\"DESCRIPTION\" TEXT," + // 2: description
+ "\"CREATE_TIME\" TEXT," + // 3: createTime
+ "\"STATUS\" TEXT," + // 4: status
+ "\"CREATE_USER_NAME\" TEXT," + // 5: createUserName
+ "\"START_TIME\" TEXT," + // 6: startTime
+ "\"END_TIME\" TEXT," + // 7: endTime
+ "\"IS_FREE_TASK\" TEXT);"); // 8: isFreeTask
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+
+ String isFreeTask = entity.getIsFreeTask();
+ if (isFreeTask != null) {
+ stmt.bindString(9, isFreeTask);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+
+ String isFreeTask = entity.getIsFreeTask();
+ if (isFreeTask != null) {
+ stmt.bindString(9, isFreeTask);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskLocalBean readEntity(Cursor cursor, int offset) {
+ TaskLocalBean entity = new TaskLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskCode
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // description
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // createTime
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // status
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // createUserName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // startTime
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // endTime
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8) // isFreeTask
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskCode(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setDescription(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setCreateTime(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setStatus(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCreateUserName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setStartTime(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setEndTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setIsFreeTask(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskMarkerLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskMarkerLocalBeanDao.java
new file mode 100644
index 0000000..344c129
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/TaskMarkerLocalBeanDao.java
@@ -0,0 +1,197 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.TaskMarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "TASK_MARKER_LOCAL_BEAN".
+*/
+public class TaskMarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskId = new Property(1, String.class, "taskId", false, "TASK_ID");
+ public final static Property TaskCode = new Property(2, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property MarkerId = new Property(3, String.class, "markerId", false, "MARKER_ID");
+ public final static Property Lng = new Property(4, double.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(5, double.class, "lat", false, "LAT");
+ public final static Property IsDetected = new Property(6, String.class, "isDetected", false, "IS_DETECTED");
+ public final static Property DetectedTime = new Property(7, String.class, "detectedTime", false, "DETECTED_TIME");
+ }
+
+
+ public TaskMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskMarkerLocalBeanDao(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 + "\"TASK_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_ID\" TEXT," + // 1: taskId
+ "\"TASK_CODE\" TEXT," + // 2: taskCode
+ "\"MARKER_ID\" TEXT," + // 3: markerId
+ "\"LNG\" REAL NOT NULL ," + // 4: lng
+ "\"LAT\" REAL NOT NULL ," + // 5: lat
+ "\"IS_DETECTED\" TEXT," + // 6: isDetected
+ "\"DETECTED_TIME\" TEXT);"); // 7: detectedTime
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ TaskMarkerLocalBean entity = new TaskMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskCode
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // markerId
+ cursor.getDouble(offset + 4), // lng
+ cursor.getDouble(offset + 5), // lat
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // isDetected
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // detectedTime
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setTaskCode(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setMarkerId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setLng(cursor.getDouble(offset + 4));
+ entity.setLat(cursor.getDouble(offset + 5));
+ entity.setIsDetected(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setDetectedTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskMarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/model/TaskDetailLocalModel.java b/app/src/main/java/com/casic/electric/detector/model/TaskDetailLocalModel.java
new file mode 100644
index 0000000..a7c993c
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/model/TaskDetailLocalModel.java
@@ -0,0 +1,147 @@
+package com.casic.electric.detector.model;
+
+import java.util.List;
+
+/**
+ * Task本地库数据模型类,包含Task里面的Marker
+ */
+public class TaskDetailLocalModel {
+ private String taskId;//任务ID
+ private String taskCode;//任务编号
+ private String description;//任务名称
+ private String createTime;//任务创建的时间
+ private String status;//任务状态
+ private String createUserName;//任务创建者名称
+ private String startTime;//任务被开始执行的时间
+ private String endTime;//任务执行结束的时间
+ private String isFreeTask;//是否自由巡检。1-是,0-否
+ private List
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property MarkerObjType = new Property(1, String.class, "markerObjType", false, "MARKER_OBJ_TYPE");
- public final static Property MarkerNumber = new Property(2, String.class, "markerNumber", false, "MARKER_NUMBER");
- public final static Property ObjectName = new Property(3, String.class, "objectName", false, "OBJECT_NAME");
- public final static Property VoltageLevel = new Property(4, String.class, "voltageLevel", false, "VOLTAGE_LEVEL");
- public final static Property TransformerModel = new Property(5, String.class, "transformerModel", false, "TRANSFORMER_MODEL");
- public final static Property HoleCount = new Property(6, String.class, "holeCount", false, "HOLE_COUNT");
- public final static Property Capacity = new Property(7, String.class, "capacity", false, "CAPACITY");
- public final static Property WellCoverMaterial = new Property(8, String.class, "wellCoverMaterial", false, "WELL_COVER_MATERIAL");
- public final static Property CoverDepth = new Property(9, String.class, "coverDepth", false, "COVER_DEPTH");
- public final static Property TransformerSpec = new Property(10, String.class, "transformerSpec", false, "TRANSFORMER_SPEC");
- public final static Property InlineName = new Property(11, String.class, "inlineName", false, "INLINE_NAME");
- public final static Property Size = new Property(12, String.class, "size", false, "SIZE");
- public final static Property BottomDepth = new Property(13, String.class, "bottomDepth", false, "BOTTOM_DEPTH");
- public final static Property Height = new Property(14, String.class, "height", false, "HEIGHT");
- public final static Property CrossPipeLine = new Property(15, String.class, "crossPipeLine", false, "CROSS_PIPE_LINE");
- public final static Property InlineCount = new Property(16, String.class, "inlineCount", false, "INLINE_COUNT");
- public final static Property LineNumber = new Property(17, String.class, "lineNumber", false, "LINE_NUMBER");
- public final static Property JointCount = new Property(18, String.class, "jointCount", false, "JOINT_COUNT");
- public final static Property OutlineCount = new Property(19, String.class, "outlineCount", false, "OUTLINE_COUNT");
- public final static Property RemainingChannels = new Property(20, String.class, "remainingChannels", false, "REMAINING_CHANNELS");
- public final static Property CabinetType = new Property(21, String.class, "cabinetType", false, "CABINET_TYPE");
- public final static Property TieCable1 = new Property(22, String.class, "tieCable1", false, "TIE_CABLE1");
- public final static Property TieCable2 = new Property(23, String.class, "tieCable2", false, "TIE_CABLE2");
- public final static Property CasingMaterial = new Property(24, String.class, "casingMaterial", false, "CASING_MATERIAL");
- public final static Property CasingSpec = new Property(25, String.class, "casingSpec", false, "CASING_SPEC");
- public final static Property ConstructTime = new Property(26, String.class, "constructTime", false, "CONSTRUCT_TIME");
- public final static Property InspectionUnit = new Property(27, String.class, "inspectionUnit", false, "INSPECTION_UNIT");
- public final static Property Area = new Property(28, String.class, "area", false, "AREA");
- public final static Property Road = new Property(29, String.class, "road", false, "ROAD");
- public final static Property Memo1 = new Property(30, String.class, "memo1", false, "MEMO1");
- public final static Property Memo2 = new Property(31, String.class, "memo2", false, "MEMO2");
- public final static Property Memo3 = new Property(32, String.class, "memo3", false, "MEMO3");
- public final static Property MarkerId = new Property(33, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerType = new Property(34, String.class, "markerType", false, "MARKER_TYPE");
- public final static Property Owner = new Property(35, String.class, "owner", false, "OWNER");
- public final static Property MarkerDepth = new Property(36, String.class, "markerDepth", false, "MARKER_DEPTH");
- public final static Property ElectricTagCount = new Property(37, String.class, "electricTagCount", false, "ELECTRIC_TAG_COUNT");
- public final static Property InstalledTime = new Property(38, String.class, "installedTime", false, "INSTALLED_TIME");
- public final static Property Longitude = new Property(39, String.class, "longitude", false, "LONGITUDE");
- public final static Property Latitude = new Property(40, String.class, "latitude", false, "LATITUDE");
- public final static Property MarkerMemo1 = new Property(41, String.class, "markerMemo1", false, "MARKER_MEMO1");
- public final static Property MarkerMemo2 = new Property(42, String.class, "markerMemo2", false, "MARKER_MEMO2");
- public final static Property MarkerMemo3 = new Property(43, String.class, "markerMemo3", false, "MARKER_MEMO3");
- public final static Property ImagePath = new Property(44, String.class, "imagePath", false, "IMAGE_PATH");
- }
-
-
- public LabelBeanDao(DaoConfig config) {
- super(config);
- }
-
- public LabelBeanDao(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 + "\"LABEL_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"MARKER_OBJ_TYPE\" TEXT," + // 1: markerObjType
- "\"MARKER_NUMBER\" TEXT," + // 2: markerNumber
- "\"OBJECT_NAME\" TEXT," + // 3: objectName
- "\"VOLTAGE_LEVEL\" TEXT," + // 4: voltageLevel
- "\"TRANSFORMER_MODEL\" TEXT," + // 5: transformerModel
- "\"HOLE_COUNT\" TEXT," + // 6: holeCount
- "\"CAPACITY\" TEXT," + // 7: capacity
- "\"WELL_COVER_MATERIAL\" TEXT," + // 8: wellCoverMaterial
- "\"COVER_DEPTH\" TEXT," + // 9: coverDepth
- "\"TRANSFORMER_SPEC\" TEXT," + // 10: transformerSpec
- "\"INLINE_NAME\" TEXT," + // 11: inlineName
- "\"SIZE\" TEXT," + // 12: size
- "\"BOTTOM_DEPTH\" TEXT," + // 13: bottomDepth
- "\"HEIGHT\" TEXT," + // 14: height
- "\"CROSS_PIPE_LINE\" TEXT," + // 15: crossPipeLine
- "\"INLINE_COUNT\" TEXT," + // 16: inlineCount
- "\"LINE_NUMBER\" TEXT," + // 17: lineNumber
- "\"JOINT_COUNT\" TEXT," + // 18: jointCount
- "\"OUTLINE_COUNT\" TEXT," + // 19: outlineCount
- "\"REMAINING_CHANNELS\" TEXT," + // 20: remainingChannels
- "\"CABINET_TYPE\" TEXT," + // 21: cabinetType
- "\"TIE_CABLE1\" TEXT," + // 22: tieCable1
- "\"TIE_CABLE2\" TEXT," + // 23: tieCable2
- "\"CASING_MATERIAL\" TEXT," + // 24: casingMaterial
- "\"CASING_SPEC\" TEXT," + // 25: casingSpec
- "\"CONSTRUCT_TIME\" TEXT," + // 26: constructTime
- "\"INSPECTION_UNIT\" TEXT," + // 27: inspectionUnit
- "\"AREA\" TEXT," + // 28: area
- "\"ROAD\" TEXT," + // 29: road
- "\"MEMO1\" TEXT," + // 30: memo1
- "\"MEMO2\" TEXT," + // 31: memo2
- "\"MEMO3\" TEXT," + // 32: memo3
- "\"MARKER_ID\" TEXT," + // 33: markerId
- "\"MARKER_TYPE\" TEXT," + // 34: markerType
- "\"OWNER\" TEXT," + // 35: owner
- "\"MARKER_DEPTH\" TEXT," + // 36: markerDepth
- "\"ELECTRIC_TAG_COUNT\" TEXT," + // 37: electricTagCount
- "\"INSTALLED_TIME\" TEXT," + // 38: installedTime
- "\"LONGITUDE\" TEXT," + // 39: longitude
- "\"LATITUDE\" TEXT," + // 40: latitude
- "\"MARKER_MEMO1\" TEXT," + // 41: markerMemo1
- "\"MARKER_MEMO2\" TEXT," + // 42: markerMemo2
- "\"MARKER_MEMO3\" TEXT," + // 43: markerMemo3
- "\"IMAGE_PATH\" TEXT);"); // 44: imagePath
- }
-
- /** Drops the underlying database table. */
- public static void dropTable(Database db, boolean ifExists) {
- String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"LABEL_BEAN\"";
- db.execSQL(sql);
- }
-
- @Override
- protected final void bindValues(DatabaseStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- protected final void bindValues(SQLiteStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public LabelBean readEntity(Cursor cursor, int offset) {
- LabelBean entity = new LabelBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerObjType
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // markerNumber
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // objectName
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // voltageLevel
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // transformerModel
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // holeCount
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // capacity
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // wellCoverMaterial
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // coverDepth
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // transformerSpec
- cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // inlineName
- cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // size
- cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // bottomDepth
- cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // height
- cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // crossPipeLine
- cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // inlineCount
- cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lineNumber
- cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // jointCount
- cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // outlineCount
- cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // remainingChannels
- cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // cabinetType
- cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // tieCable1
- cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // tieCable2
- cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // casingMaterial
- cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // casingSpec
- cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26), // constructTime
- cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27), // inspectionUnit
- cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28), // area
- cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29), // road
- cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30), // memo1
- cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31), // memo2
- cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32), // memo3
- cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33), // markerId
- cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34), // markerType
- cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35), // owner
- cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36), // markerDepth
- cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37), // electricTagCount
- cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38), // installedTime
- cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39), // longitude
- cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40), // latitude
- cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41), // markerMemo1
- cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42), // markerMemo2
- cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43), // markerMemo3
- cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44) // imagePath
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, LabelBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setMarkerObjType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setMarkerNumber(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setObjectName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setVoltageLevel(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setTransformerModel(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setHoleCount(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setCapacity(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setWellCoverMaterial(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setCoverDepth(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- entity.setTransformerSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
- entity.setInlineName(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
- entity.setSize(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
- entity.setBottomDepth(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
- entity.setHeight(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
- entity.setCrossPipeLine(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
- entity.setInlineCount(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
- entity.setLineNumber(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
- entity.setJointCount(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
- entity.setOutlineCount(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
- entity.setRemainingChannels(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
- entity.setCabinetType(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
- entity.setTieCable1(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
- entity.setTieCable2(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
- entity.setCasingMaterial(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
- entity.setCasingSpec(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
- entity.setConstructTime(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
- entity.setInspectionUnit(cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27));
- entity.setArea(cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28));
- entity.setRoad(cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29));
- entity.setMemo1(cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30));
- entity.setMemo2(cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31));
- entity.setMemo3(cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32));
- entity.setMarkerId(cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33));
- entity.setMarkerType(cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34));
- entity.setOwner(cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35));
- entity.setMarkerDepth(cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36));
- entity.setElectricTagCount(cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37));
- entity.setInstalledTime(cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38));
- entity.setLongitude(cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39));
- entity.setLatitude(cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40));
- entity.setMarkerMemo1(cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41));
- entity.setMarkerMemo2(cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42));
- entity.setMarkerMemo3(cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43));
- entity.setImagePath(cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(LabelBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(LabelBean entity) {
- if(entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(LabelBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java
new file mode 100644
index 0000000..9f2afa5
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java
@@ -0,0 +1,479 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.MarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "MARKER_LOCAL_BEAN".
+*/
+public class MarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property PipelineType = new Property(1, String.class, "pipelineType", false, "PIPELINE_TYPE");
+ public final static Property PipelineDiameter = new Property(2, String.class, "pipelineDiameter", false, "PIPELINE_DIAMETER");
+ public final static Property PipelineMaterial = new Property(3, String.class, "pipelineMaterial", false, "PIPELINE_MATERIAL");
+ public final static Property BuryMethod = new Property(4, String.class, "buryMethod", false, "BURY_METHOD");
+ public final static Property BuryDepth = new Property(5, String.class, "buryDepth", false, "BURY_DEPTH");
+ public final static Property Area = new Property(6, String.class, "area", false, "AREA");
+ public final static Property Line = new Property(7, String.class, "line", false, "LINE");
+ public final static Property Road = new Property(8, String.class, "road", false, "ROAD");
+ public final static Property ConstructTime = new Property(9, String.class, "constructTime", false, "CONSTRUCT_TIME");
+ public final static Property Owner = new Property(10, String.class, "owner", false, "OWNER");
+ public final static Property ObjectId = new Property(11, String.class, "objectId", false, "OBJECT_ID");
+ public final static Property MarkerId = new Property(12, String.class, "markerId", false, "MARKER_ID");
+ public final static Property MarkerType = new Property(13, String.class, "markerType", false, "MARKER_TYPE");
+ public final static Property MarkerDepth = new Property(14, String.class, "markerDepth", false, "MARKER_DEPTH");
+ public final static Property InstallationDept = new Property(15, String.class, "installationDept", false, "INSTALLATION_DEPT");
+ public final static Property Lng = new Property(16, String.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(17, String.class, "lat", false, "LAT");
+ public final static Property UpdateTime = new Property(18, String.class, "updateTime", false, "UPDATE_TIME");
+ public final static Property Remark = new Property(19, String.class, "remark", false, "REMARK");
+ public final static Property UnderlyingPipelineType = new Property(20, String.class, "underlyingPipelineType", false, "UNDERLYING_PIPELINE_TYPE");
+ public final static Property UnderlyingPipelineDepth = new Property(21, String.class, "underlyingPipelineDepth", false, "UNDERLYING_PIPELINE_DEPTH");
+ public final static Property UnderlyingPipelineDiameter = new Property(22, String.class, "underlyingPipelineDiameter", false, "UNDERLYING_PIPELINE_DIAMETER");
+ public final static Property UnderlyingPipelineMaterial = new Property(23, String.class, "underlyingPipelineMaterial", false, "UNDERLYING_PIPELINE_MATERIAL");
+ public final static Property ObjectType = new Property(24, String.class, "objectType", false, "OBJECT_TYPE");
+ public final static Property Color = new Property(25, String.class, "color", false, "COLOR");
+ public final static Property ImagePath = new Property(26, String.class, "imagePath", false, "IMAGE_PATH");
+ }
+
+
+ public MarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public MarkerLocalBeanDao(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 + "\"MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
+ "\"PIPELINE_TYPE\" TEXT," + // 1: pipelineType
+ "\"PIPELINE_DIAMETER\" TEXT," + // 2: pipelineDiameter
+ "\"PIPELINE_MATERIAL\" TEXT," + // 3: pipelineMaterial
+ "\"BURY_METHOD\" TEXT," + // 4: buryMethod
+ "\"BURY_DEPTH\" TEXT," + // 5: buryDepth
+ "\"AREA\" TEXT," + // 6: area
+ "\"LINE\" TEXT," + // 7: line
+ "\"ROAD\" TEXT," + // 8: road
+ "\"CONSTRUCT_TIME\" TEXT," + // 9: constructTime
+ "\"OWNER\" TEXT," + // 10: owner
+ "\"OBJECT_ID\" TEXT," + // 11: objectId
+ "\"MARKER_ID\" TEXT," + // 12: markerId
+ "\"MARKER_TYPE\" TEXT," + // 13: markerType
+ "\"MARKER_DEPTH\" TEXT," + // 14: markerDepth
+ "\"INSTALLATION_DEPT\" TEXT," + // 15: installationDept
+ "\"LNG\" TEXT," + // 16: lng
+ "\"LAT\" TEXT," + // 17: lat
+ "\"UPDATE_TIME\" TEXT," + // 18: updateTime
+ "\"REMARK\" TEXT," + // 19: remark
+ "\"UNDERLYING_PIPELINE_TYPE\" TEXT," + // 20: underlyingPipelineType
+ "\"UNDERLYING_PIPELINE_DEPTH\" TEXT," + // 21: underlyingPipelineDepth
+ "\"UNDERLYING_PIPELINE_DIAMETER\" TEXT," + // 22: underlyingPipelineDiameter
+ "\"UNDERLYING_PIPELINE_MATERIAL\" TEXT," + // 23: underlyingPipelineMaterial
+ "\"OBJECT_TYPE\" TEXT," + // 24: objectType
+ "\"COLOR\" TEXT," + // 25: color
+ "\"IMAGE_PATH\" TEXT);"); // 26: imagePath
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, MarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String pipelineType = entity.getPipelineType();
+ if (pipelineType != null) {
+ stmt.bindString(2, pipelineType);
+ }
+
+ String pipelineDiameter = entity.getPipelineDiameter();
+ if (pipelineDiameter != null) {
+ stmt.bindString(3, pipelineDiameter);
+ }
+
+ String pipelineMaterial = entity.getPipelineMaterial();
+ if (pipelineMaterial != null) {
+ stmt.bindString(4, pipelineMaterial);
+ }
+
+ String buryMethod = entity.getBuryMethod();
+ if (buryMethod != null) {
+ stmt.bindString(5, buryMethod);
+ }
+
+ String buryDepth = entity.getBuryDepth();
+ if (buryDepth != null) {
+ stmt.bindString(6, buryDepth);
+ }
+
+ String area = entity.getArea();
+ if (area != null) {
+ stmt.bindString(7, area);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String road = entity.getRoad();
+ if (road != null) {
+ stmt.bindString(9, road);
+ }
+
+ String constructTime = entity.getConstructTime();
+ if (constructTime != null) {
+ stmt.bindString(10, constructTime);
+ }
+
+ String owner = entity.getOwner();
+ if (owner != null) {
+ stmt.bindString(11, owner);
+ }
+
+ String objectId = entity.getObjectId();
+ if (objectId != null) {
+ stmt.bindString(12, objectId);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(13, markerId);
+ }
+
+ String markerType = entity.getMarkerType();
+ if (markerType != null) {
+ stmt.bindString(14, markerType);
+ }
+
+ String markerDepth = entity.getMarkerDepth();
+ if (markerDepth != null) {
+ stmt.bindString(15, markerDepth);
+ }
+
+ String installationDept = entity.getInstallationDept();
+ if (installationDept != null) {
+ stmt.bindString(16, installationDept);
+ }
+
+ String lng = entity.getLng();
+ if (lng != null) {
+ stmt.bindString(17, lng);
+ }
+
+ String lat = entity.getLat();
+ if (lat != null) {
+ stmt.bindString(18, lat);
+ }
+
+ String updateTime = entity.getUpdateTime();
+ if (updateTime != null) {
+ stmt.bindString(19, updateTime);
+ }
+
+ String remark = entity.getRemark();
+ if (remark != null) {
+ stmt.bindString(20, remark);
+ }
+
+ String underlyingPipelineType = entity.getUnderlyingPipelineType();
+ if (underlyingPipelineType != null) {
+ stmt.bindString(21, underlyingPipelineType);
+ }
+
+ String underlyingPipelineDepth = entity.getUnderlyingPipelineDepth();
+ if (underlyingPipelineDepth != null) {
+ stmt.bindString(22, underlyingPipelineDepth);
+ }
+
+ String underlyingPipelineDiameter = entity.getUnderlyingPipelineDiameter();
+ if (underlyingPipelineDiameter != null) {
+ stmt.bindString(23, underlyingPipelineDiameter);
+ }
+
+ String underlyingPipelineMaterial = entity.getUnderlyingPipelineMaterial();
+ if (underlyingPipelineMaterial != null) {
+ stmt.bindString(24, underlyingPipelineMaterial);
+ }
+
+ String objectType = entity.getObjectType();
+ if (objectType != null) {
+ stmt.bindString(25, objectType);
+ }
+
+ String color = entity.getColor();
+ if (color != null) {
+ stmt.bindString(26, color);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(27, imagePath);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, MarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String pipelineType = entity.getPipelineType();
+ if (pipelineType != null) {
+ stmt.bindString(2, pipelineType);
+ }
+
+ String pipelineDiameter = entity.getPipelineDiameter();
+ if (pipelineDiameter != null) {
+ stmt.bindString(3, pipelineDiameter);
+ }
+
+ String pipelineMaterial = entity.getPipelineMaterial();
+ if (pipelineMaterial != null) {
+ stmt.bindString(4, pipelineMaterial);
+ }
+
+ String buryMethod = entity.getBuryMethod();
+ if (buryMethod != null) {
+ stmt.bindString(5, buryMethod);
+ }
+
+ String buryDepth = entity.getBuryDepth();
+ if (buryDepth != null) {
+ stmt.bindString(6, buryDepth);
+ }
+
+ String area = entity.getArea();
+ if (area != null) {
+ stmt.bindString(7, area);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String road = entity.getRoad();
+ if (road != null) {
+ stmt.bindString(9, road);
+ }
+
+ String constructTime = entity.getConstructTime();
+ if (constructTime != null) {
+ stmt.bindString(10, constructTime);
+ }
+
+ String owner = entity.getOwner();
+ if (owner != null) {
+ stmt.bindString(11, owner);
+ }
+
+ String objectId = entity.getObjectId();
+ if (objectId != null) {
+ stmt.bindString(12, objectId);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(13, markerId);
+ }
+
+ String markerType = entity.getMarkerType();
+ if (markerType != null) {
+ stmt.bindString(14, markerType);
+ }
+
+ String markerDepth = entity.getMarkerDepth();
+ if (markerDepth != null) {
+ stmt.bindString(15, markerDepth);
+ }
+
+ String installationDept = entity.getInstallationDept();
+ if (installationDept != null) {
+ stmt.bindString(16, installationDept);
+ }
+
+ String lng = entity.getLng();
+ if (lng != null) {
+ stmt.bindString(17, lng);
+ }
+
+ String lat = entity.getLat();
+ if (lat != null) {
+ stmt.bindString(18, lat);
+ }
+
+ String updateTime = entity.getUpdateTime();
+ if (updateTime != null) {
+ stmt.bindString(19, updateTime);
+ }
+
+ String remark = entity.getRemark();
+ if (remark != null) {
+ stmt.bindString(20, remark);
+ }
+
+ String underlyingPipelineType = entity.getUnderlyingPipelineType();
+ if (underlyingPipelineType != null) {
+ stmt.bindString(21, underlyingPipelineType);
+ }
+
+ String underlyingPipelineDepth = entity.getUnderlyingPipelineDepth();
+ if (underlyingPipelineDepth != null) {
+ stmt.bindString(22, underlyingPipelineDepth);
+ }
+
+ String underlyingPipelineDiameter = entity.getUnderlyingPipelineDiameter();
+ if (underlyingPipelineDiameter != null) {
+ stmt.bindString(23, underlyingPipelineDiameter);
+ }
+
+ String underlyingPipelineMaterial = entity.getUnderlyingPipelineMaterial();
+ if (underlyingPipelineMaterial != null) {
+ stmt.bindString(24, underlyingPipelineMaterial);
+ }
+
+ String objectType = entity.getObjectType();
+ if (objectType != null) {
+ stmt.bindString(25, objectType);
+ }
+
+ String color = entity.getColor();
+ if (color != null) {
+ stmt.bindString(26, color);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(27, imagePath);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public MarkerLocalBean readEntity(Cursor cursor, int offset) {
+ MarkerLocalBean entity = new MarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // pipelineType
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // pipelineDiameter
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // pipelineMaterial
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // buryMethod
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // buryDepth
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // area
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // road
+ cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // constructTime
+ cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // owner
+ cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // objectId
+ cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // markerId
+ cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // markerType
+ cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // markerDepth
+ cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // installationDept
+ cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // lng
+ cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lat
+ cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // updateTime
+ cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // remark
+ cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // underlyingPipelineType
+ cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // underlyingPipelineDepth
+ cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // underlyingPipelineDiameter
+ cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // underlyingPipelineMaterial
+ cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // objectType
+ cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // color
+ cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26) // imagePath
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, MarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setPipelineType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setPipelineDiameter(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setPipelineMaterial(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setBuryMethod(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setBuryDepth(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setArea(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setRoad(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ entity.setConstructTime(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
+ entity.setOwner(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
+ entity.setObjectId(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
+ entity.setMarkerId(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
+ entity.setMarkerType(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
+ entity.setMarkerDepth(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
+ entity.setInstallationDept(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
+ entity.setLng(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
+ entity.setLat(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
+ entity.setUpdateTime(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
+ entity.setRemark(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
+ entity.setUnderlyingPipelineType(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
+ entity.setUnderlyingPipelineDepth(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
+ entity.setUnderlyingPipelineDiameter(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
+ entity.setUnderlyingPipelineMaterial(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
+ entity.setObjectType(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
+ entity.setColor(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
+ entity.setImagePath(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(MarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(MarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(MarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
index 18b1b7b..9d99b8d 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
@@ -3,7 +3,7 @@
import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;
-import com.casic.electric.detector.bean.SmallLabelBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.Property;
@@ -12,10 +12,11 @@
import org.greenrobot.greendao.internal.DaoConfig;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-/**
+
+/**
* DAO for table "SMALL_LABEL_BEAN".
-*/
-public class SmallLabelBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property MarkerId = new Property(1, String.class, "markerId", false, "MARKER_ID");
+ public final static Property LocationNumber = new Property(2, String.class, "locationNumber", false, "LOCATION_NUMBER");
+ public final static Property LocationName = new Property(3, String.class, "locationName", false, "LOCATION_NAME");
+ public final static Property ElectricMarkerId = new Property(4, String.class, "electricMarkerId", false, "ELECTRIC_MARKER_ID");
+ public final static Property CableName = new Property(5, String.class, "cableName", false, "CABLE_NAME");
+ public final static Property CableNumber = new Property(6, String.class, "cableNumber", false, "CABLE_NUMBER");
+ public final static Property Line = new Property(7, String.class, "line", false, "LINE");
+ public final static Property VoltageLevel = new Property(8, String.class, "voltageLevel", false, "VOLTAGE_LEVEL");
+ public final static Property CableType = new Property(9, String.class, "cableType", false, "CABLE_TYPE");
+ public final static Property CableSpec = new Property(10, String.class, "cableSpec", false, "CABLE_SPEC");
+ public final static Property CableBrand = new Property(11, String.class, "cableBrand", false, "CABLE_BRAND");
+ public final static Property CableStart = new Property(12, String.class, "cableStart", false, "CABLE_START");
+ public final static Property CableEnd = new Property(13, String.class, "cableEnd", false, "CABLE_END");
+ public final static Property HasJoint = new Property(14, String.class, "hasJoint", false, "HAS_JOINT");
+ public final static Property JointCreator = new Property(15, String.class, "jointCreator", false, "JOINT_CREATOR");
+ public final static Property ImagePath = new Property(16, String.class, "imagePath", false, "IMAGE_PATH");
+ public final static Property Memo1 = new Property(17, String.class, "memo1", false, "MEMO1");
+ public final static Property Memo2 = new Property(18, String.class, "memo2", false, "MEMO2");
+ public final static Property Memo3 = new Property(19, String.class, "memo3", false, "MEMO3");
+ }
+
+
+ public SmallMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public SmallMarkerLocalBeanDao(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 + "\"SMALL_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
+ "\"MARKER_ID\" TEXT," + // 1: markerId
+ "\"LOCATION_NUMBER\" TEXT," + // 2: locationNumber
+ "\"LOCATION_NAME\" TEXT," + // 3: locationName
+ "\"ELECTRIC_MARKER_ID\" TEXT," + // 4: electricMarkerId
+ "\"CABLE_NAME\" TEXT," + // 5: cableName
+ "\"CABLE_NUMBER\" TEXT," + // 6: cableNumber
+ "\"LINE\" TEXT," + // 7: line
+ "\"VOLTAGE_LEVEL\" TEXT," + // 8: voltageLevel
+ "\"CABLE_TYPE\" TEXT," + // 9: cableType
+ "\"CABLE_SPEC\" TEXT," + // 10: cableSpec
+ "\"CABLE_BRAND\" TEXT," + // 11: cableBrand
+ "\"CABLE_START\" TEXT," + // 12: cableStart
+ "\"CABLE_END\" TEXT," + // 13: cableEnd
+ "\"HAS_JOINT\" TEXT," + // 14: hasJoint
+ "\"JOINT_CREATOR\" TEXT," + // 15: jointCreator
+ "\"IMAGE_PATH\" TEXT," + // 16: imagePath
+ "\"MEMO1\" TEXT," + // 17: memo1
+ "\"MEMO2\" TEXT," + // 18: memo2
+ "\"MEMO3\" TEXT);"); // 19: memo3
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"SMALL_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, SmallMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(2, markerId);
+ }
+
+ String locationNumber = entity.getLocationNumber();
+ if (locationNumber != null) {
+ stmt.bindString(3, locationNumber);
+ }
+
+ String locationName = entity.getLocationName();
+ if (locationName != null) {
+ stmt.bindString(4, locationName);
+ }
+
+ String electricMarkerId = entity.getElectricMarkerId();
+ if (electricMarkerId != null) {
+ stmt.bindString(5, electricMarkerId);
+ }
+
+ String cableName = entity.getCableName();
+ if (cableName != null) {
+ stmt.bindString(6, cableName);
+ }
+
+ String cableNumber = entity.getCableNumber();
+ if (cableNumber != null) {
+ stmt.bindString(7, cableNumber);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String voltageLevel = entity.getVoltageLevel();
+ if (voltageLevel != null) {
+ stmt.bindString(9, voltageLevel);
+ }
+
+ String cableType = entity.getCableType();
+ if (cableType != null) {
+ stmt.bindString(10, cableType);
+ }
+
+ String cableSpec = entity.getCableSpec();
+ if (cableSpec != null) {
+ stmt.bindString(11, cableSpec);
+ }
+
+ String cableBrand = entity.getCableBrand();
+ if (cableBrand != null) {
+ stmt.bindString(12, cableBrand);
+ }
+
+ String cableStart = entity.getCableStart();
+ if (cableStart != null) {
+ stmt.bindString(13, cableStart);
+ }
+
+ String cableEnd = entity.getCableEnd();
+ if (cableEnd != null) {
+ stmt.bindString(14, cableEnd);
+ }
+
+ String hasJoint = entity.getHasJoint();
+ if (hasJoint != null) {
+ stmt.bindString(15, hasJoint);
+ }
+
+ String jointCreator = entity.getJointCreator();
+ if (jointCreator != null) {
+ stmt.bindString(16, jointCreator);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(17, imagePath);
+ }
+
+ String memo1 = entity.getMemo1();
+ if (memo1 != null) {
+ stmt.bindString(18, memo1);
+ }
+
+ String memo2 = entity.getMemo2();
+ if (memo2 != null) {
+ stmt.bindString(19, memo2);
+ }
+
+ String memo3 = entity.getMemo3();
+ if (memo3 != null) {
+ stmt.bindString(20, memo3);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, SmallMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(2, markerId);
+ }
+
+ String locationNumber = entity.getLocationNumber();
+ if (locationNumber != null) {
+ stmt.bindString(3, locationNumber);
+ }
+
+ String locationName = entity.getLocationName();
+ if (locationName != null) {
+ stmt.bindString(4, locationName);
+ }
+
+ String electricMarkerId = entity.getElectricMarkerId();
+ if (electricMarkerId != null) {
+ stmt.bindString(5, electricMarkerId);
+ }
+
+ String cableName = entity.getCableName();
+ if (cableName != null) {
+ stmt.bindString(6, cableName);
+ }
+
+ String cableNumber = entity.getCableNumber();
+ if (cableNumber != null) {
+ stmt.bindString(7, cableNumber);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String voltageLevel = entity.getVoltageLevel();
+ if (voltageLevel != null) {
+ stmt.bindString(9, voltageLevel);
+ }
+
+ String cableType = entity.getCableType();
+ if (cableType != null) {
+ stmt.bindString(10, cableType);
+ }
+
+ String cableSpec = entity.getCableSpec();
+ if (cableSpec != null) {
+ stmt.bindString(11, cableSpec);
+ }
+
+ String cableBrand = entity.getCableBrand();
+ if (cableBrand != null) {
+ stmt.bindString(12, cableBrand);
+ }
+
+ String cableStart = entity.getCableStart();
+ if (cableStart != null) {
+ stmt.bindString(13, cableStart);
+ }
+
+ String cableEnd = entity.getCableEnd();
+ if (cableEnd != null) {
+ stmt.bindString(14, cableEnd);
+ }
+
+ String hasJoint = entity.getHasJoint();
+ if (hasJoint != null) {
+ stmt.bindString(15, hasJoint);
+ }
+
+ String jointCreator = entity.getJointCreator();
+ if (jointCreator != null) {
+ stmt.bindString(16, jointCreator);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(17, imagePath);
+ }
+
+ String memo1 = entity.getMemo1();
+ if (memo1 != null) {
+ stmt.bindString(18, memo1);
+ }
+
+ String memo2 = entity.getMemo2();
+ if (memo2 != null) {
+ stmt.bindString(19, memo2);
+ }
+
+ String memo3 = entity.getMemo3();
+ if (memo3 != null) {
+ stmt.bindString(20, memo3);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public SmallMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ SmallMarkerLocalBean entity = new SmallMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // locationNumber
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // locationName
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // electricMarkerId
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // cableName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // cableNumber
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // voltageLevel
+ cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // cableType
+ cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // cableSpec
+ cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // cableBrand
+ cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // cableStart
+ cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // cableEnd
+ cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // hasJoint
+ cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // jointCreator
+ cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // imagePath
+ cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // memo1
+ cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // memo2
+ cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19) // memo3
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, SmallMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setMarkerId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setLocationNumber(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setLocationName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setElectricMarkerId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCableName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setCableNumber(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setVoltageLevel(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ entity.setCableType(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
+ entity.setCableSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
+ entity.setCableBrand(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
+ entity.setCableStart(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
+ entity.setCableEnd(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
+ entity.setHasJoint(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
+ entity.setJointCreator(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
+ entity.setImagePath(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
+ entity.setMemo1(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
+ entity.setMemo2(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
+ entity.setMemo3(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(SmallMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(SmallMarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(SmallMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java
deleted file mode 100644
index 802ffb0..0000000
--- a/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java
+++ /dev/null
@@ -1,241 +0,0 @@
-package com.casic.electric.detector.greendao;
-
-import android.database.Cursor;
-import android.database.sqlite.SQLiteStatement;
-
-import com.casic.electric.detector.bean.TaskBean;
-
-import org.greenrobot.greendao.AbstractDao;
-import org.greenrobot.greendao.Property;
-import org.greenrobot.greendao.database.Database;
-import org.greenrobot.greendao.database.DatabaseStatement;
-import org.greenrobot.greendao.internal.DaoConfig;
-
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-/**
- * DAO for table "TASK_BEAN".
-*/
-public class TaskBeanDao extends AbstractDao
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property TaskId = new Property(1, String.class, "taskId", false, "TASK_ID");
- public final static Property TaskCode = new Property(2, String.class, "taskCode", false, "TASK_CODE");
- public final static Property MarkerId = new Property(3, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerRealId = new Property(4, String.class, "markerRealId", false, "MARKER_REAL_ID");
- public final static Property Scanner = new Property(5, String.class, "scanner", false, "SCANNER");
- public final static Property Lng = new Property(6, String.class, "lng", false, "LNG");
- public final static Property Lat = new Property(7, String.class, "lat", false, "LAT");
- public final static Property State = new Property(8, String.class, "state", false, "STATE");
- public final static Property Desc = new Property(9, String.class, "desc", false, "DESC");
- }
-
-
- public TaskBeanDao(DaoConfig config) {
- super(config);
- }
-
- public TaskBeanDao(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 + "\"TASK_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"TASK_ID\" TEXT," + // 1: taskId
- "\"TASK_CODE\" TEXT," + // 2: taskCode
- "\"MARKER_ID\" TEXT," + // 3: markerId
- "\"MARKER_REAL_ID\" TEXT," + // 4: markerRealId
- "\"SCANNER\" TEXT," + // 5: scanner
- "\"LNG\" TEXT," + // 6: lng
- "\"LAT\" TEXT," + // 7: lat
- "\"STATE\" TEXT," + // 8: state
- "\"DESC\" TEXT);"); // 9: desc
- }
-
- /** Drops the underlying database table. */
- public static void dropTable(Database db, boolean ifExists) {
- String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_BEAN\"";
- db.execSQL(sql);
- }
-
- @Override
- protected final void bindValues(DatabaseStatement stmt, TaskBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(2, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(3, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(4, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(5, markerRealId);
- }
-
- String scanner = entity.getScanner();
- if (scanner != null) {
- stmt.bindString(6, scanner);
- }
-
- String lng = entity.getLng();
- if (lng != null) {
- stmt.bindString(7, lng);
- }
-
- String lat = entity.getLat();
- if (lat != null) {
- stmt.bindString(8, lat);
- }
-
- String state = entity.getState();
- if (state != null) {
- stmt.bindString(9, state);
- }
-
- String desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(10, desc);
- }
- }
-
- @Override
- protected final void bindValues(SQLiteStatement stmt, TaskBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(2, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(3, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(4, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(5, markerRealId);
- }
-
- String scanner = entity.getScanner();
- if (scanner != null) {
- stmt.bindString(6, scanner);
- }
-
- String lng = entity.getLng();
- if (lng != null) {
- stmt.bindString(7, lng);
- }
-
- String lat = entity.getLat();
- if (lat != null) {
- stmt.bindString(8, lat);
- }
-
- String state = entity.getState();
- if (state != null) {
- stmt.bindString(9, state);
- }
-
- String desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(10, desc);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public TaskBean readEntity(Cursor cursor, int offset) {
- TaskBean entity = new TaskBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskId
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskCode
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // markerId
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // markerRealId
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // scanner
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // lng
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // lat
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // state
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9) // desc
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, TaskBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setTaskId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setTaskCode(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setMarkerId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setMarkerRealId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setScanner(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setLng(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLat(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setState(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setDesc(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(TaskBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(TaskBean entity) {
- if(entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(TaskBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java
new file mode 100644
index 0000000..330af6b
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java
@@ -0,0 +1,227 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.TaskLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "TASK_LOCAL_BEAN".
+*/
+public class TaskLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskCode = new Property(1, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property Description = new Property(2, String.class, "description", false, "DESCRIPTION");
+ public final static Property CreateTime = new Property(3, String.class, "createTime", false, "CREATE_TIME");
+ public final static Property Status = new Property(4, String.class, "status", false, "STATUS");
+ public final static Property CreateUserName = new Property(5, String.class, "createUserName", false, "CREATE_USER_NAME");
+ public final static Property StartTime = new Property(6, String.class, "startTime", false, "START_TIME");
+ public final static Property EndTime = new Property(7, String.class, "endTime", false, "END_TIME");
+ public final static Property IsFreeTask = new Property(8, String.class, "isFreeTask", false, "IS_FREE_TASK");
+ }
+
+
+ public TaskLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskLocalBeanDao(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 + "\"TASK_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_CODE\" TEXT," + // 1: taskCode
+ "\"DESCRIPTION\" TEXT," + // 2: description
+ "\"CREATE_TIME\" TEXT," + // 3: createTime
+ "\"STATUS\" TEXT," + // 4: status
+ "\"CREATE_USER_NAME\" TEXT," + // 5: createUserName
+ "\"START_TIME\" TEXT," + // 6: startTime
+ "\"END_TIME\" TEXT," + // 7: endTime
+ "\"IS_FREE_TASK\" TEXT);"); // 8: isFreeTask
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+
+ String isFreeTask = entity.getIsFreeTask();
+ if (isFreeTask != null) {
+ stmt.bindString(9, isFreeTask);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+
+ String isFreeTask = entity.getIsFreeTask();
+ if (isFreeTask != null) {
+ stmt.bindString(9, isFreeTask);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskLocalBean readEntity(Cursor cursor, int offset) {
+ TaskLocalBean entity = new TaskLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskCode
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // description
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // createTime
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // status
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // createUserName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // startTime
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // endTime
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8) // isFreeTask
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskCode(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setDescription(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setCreateTime(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setStatus(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCreateUserName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setStartTime(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setEndTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setIsFreeTask(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskMarkerLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskMarkerLocalBeanDao.java
new file mode 100644
index 0000000..344c129
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/TaskMarkerLocalBeanDao.java
@@ -0,0 +1,197 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.TaskMarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "TASK_MARKER_LOCAL_BEAN".
+*/
+public class TaskMarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskId = new Property(1, String.class, "taskId", false, "TASK_ID");
+ public final static Property TaskCode = new Property(2, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property MarkerId = new Property(3, String.class, "markerId", false, "MARKER_ID");
+ public final static Property Lng = new Property(4, double.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(5, double.class, "lat", false, "LAT");
+ public final static Property IsDetected = new Property(6, String.class, "isDetected", false, "IS_DETECTED");
+ public final static Property DetectedTime = new Property(7, String.class, "detectedTime", false, "DETECTED_TIME");
+ }
+
+
+ public TaskMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskMarkerLocalBeanDao(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 + "\"TASK_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_ID\" TEXT," + // 1: taskId
+ "\"TASK_CODE\" TEXT," + // 2: taskCode
+ "\"MARKER_ID\" TEXT," + // 3: markerId
+ "\"LNG\" REAL NOT NULL ," + // 4: lng
+ "\"LAT\" REAL NOT NULL ," + // 5: lat
+ "\"IS_DETECTED\" TEXT," + // 6: isDetected
+ "\"DETECTED_TIME\" TEXT);"); // 7: detectedTime
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ TaskMarkerLocalBean entity = new TaskMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskCode
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // markerId
+ cursor.getDouble(offset + 4), // lng
+ cursor.getDouble(offset + 5), // lat
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // isDetected
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // detectedTime
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setTaskCode(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setMarkerId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setLng(cursor.getDouble(offset + 4));
+ entity.setLat(cursor.getDouble(offset + 5));
+ entity.setIsDetected(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setDetectedTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskMarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/model/TaskDetailLocalModel.java b/app/src/main/java/com/casic/electric/detector/model/TaskDetailLocalModel.java
new file mode 100644
index 0000000..a7c993c
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/model/TaskDetailLocalModel.java
@@ -0,0 +1,147 @@
+package com.casic.electric.detector.model;
+
+import java.util.List;
+
+/**
+ * Task本地库数据模型类,包含Task里面的Marker
+ */
+public class TaskDetailLocalModel {
+ private String taskId;//任务ID
+ private String taskCode;//任务编号
+ private String description;//任务名称
+ private String createTime;//任务创建的时间
+ private String status;//任务状态
+ private String createUserName;//任务创建者名称
+ private String startTime;//任务被开始执行的时间
+ private String endTime;//任务执行结束的时间
+ private String isFreeTask;//是否自由巡检。1-是,0-否
+ private List
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property MarkerObjType = new Property(1, String.class, "markerObjType", false, "MARKER_OBJ_TYPE");
- public final static Property MarkerNumber = new Property(2, String.class, "markerNumber", false, "MARKER_NUMBER");
- public final static Property ObjectName = new Property(3, String.class, "objectName", false, "OBJECT_NAME");
- public final static Property VoltageLevel = new Property(4, String.class, "voltageLevel", false, "VOLTAGE_LEVEL");
- public final static Property TransformerModel = new Property(5, String.class, "transformerModel", false, "TRANSFORMER_MODEL");
- public final static Property HoleCount = new Property(6, String.class, "holeCount", false, "HOLE_COUNT");
- public final static Property Capacity = new Property(7, String.class, "capacity", false, "CAPACITY");
- public final static Property WellCoverMaterial = new Property(8, String.class, "wellCoverMaterial", false, "WELL_COVER_MATERIAL");
- public final static Property CoverDepth = new Property(9, String.class, "coverDepth", false, "COVER_DEPTH");
- public final static Property TransformerSpec = new Property(10, String.class, "transformerSpec", false, "TRANSFORMER_SPEC");
- public final static Property InlineName = new Property(11, String.class, "inlineName", false, "INLINE_NAME");
- public final static Property Size = new Property(12, String.class, "size", false, "SIZE");
- public final static Property BottomDepth = new Property(13, String.class, "bottomDepth", false, "BOTTOM_DEPTH");
- public final static Property Height = new Property(14, String.class, "height", false, "HEIGHT");
- public final static Property CrossPipeLine = new Property(15, String.class, "crossPipeLine", false, "CROSS_PIPE_LINE");
- public final static Property InlineCount = new Property(16, String.class, "inlineCount", false, "INLINE_COUNT");
- public final static Property LineNumber = new Property(17, String.class, "lineNumber", false, "LINE_NUMBER");
- public final static Property JointCount = new Property(18, String.class, "jointCount", false, "JOINT_COUNT");
- public final static Property OutlineCount = new Property(19, String.class, "outlineCount", false, "OUTLINE_COUNT");
- public final static Property RemainingChannels = new Property(20, String.class, "remainingChannels", false, "REMAINING_CHANNELS");
- public final static Property CabinetType = new Property(21, String.class, "cabinetType", false, "CABINET_TYPE");
- public final static Property TieCable1 = new Property(22, String.class, "tieCable1", false, "TIE_CABLE1");
- public final static Property TieCable2 = new Property(23, String.class, "tieCable2", false, "TIE_CABLE2");
- public final static Property CasingMaterial = new Property(24, String.class, "casingMaterial", false, "CASING_MATERIAL");
- public final static Property CasingSpec = new Property(25, String.class, "casingSpec", false, "CASING_SPEC");
- public final static Property ConstructTime = new Property(26, String.class, "constructTime", false, "CONSTRUCT_TIME");
- public final static Property InspectionUnit = new Property(27, String.class, "inspectionUnit", false, "INSPECTION_UNIT");
- public final static Property Area = new Property(28, String.class, "area", false, "AREA");
- public final static Property Road = new Property(29, String.class, "road", false, "ROAD");
- public final static Property Memo1 = new Property(30, String.class, "memo1", false, "MEMO1");
- public final static Property Memo2 = new Property(31, String.class, "memo2", false, "MEMO2");
- public final static Property Memo3 = new Property(32, String.class, "memo3", false, "MEMO3");
- public final static Property MarkerId = new Property(33, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerType = new Property(34, String.class, "markerType", false, "MARKER_TYPE");
- public final static Property Owner = new Property(35, String.class, "owner", false, "OWNER");
- public final static Property MarkerDepth = new Property(36, String.class, "markerDepth", false, "MARKER_DEPTH");
- public final static Property ElectricTagCount = new Property(37, String.class, "electricTagCount", false, "ELECTRIC_TAG_COUNT");
- public final static Property InstalledTime = new Property(38, String.class, "installedTime", false, "INSTALLED_TIME");
- public final static Property Longitude = new Property(39, String.class, "longitude", false, "LONGITUDE");
- public final static Property Latitude = new Property(40, String.class, "latitude", false, "LATITUDE");
- public final static Property MarkerMemo1 = new Property(41, String.class, "markerMemo1", false, "MARKER_MEMO1");
- public final static Property MarkerMemo2 = new Property(42, String.class, "markerMemo2", false, "MARKER_MEMO2");
- public final static Property MarkerMemo3 = new Property(43, String.class, "markerMemo3", false, "MARKER_MEMO3");
- public final static Property ImagePath = new Property(44, String.class, "imagePath", false, "IMAGE_PATH");
- }
-
-
- public LabelBeanDao(DaoConfig config) {
- super(config);
- }
-
- public LabelBeanDao(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 + "\"LABEL_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"MARKER_OBJ_TYPE\" TEXT," + // 1: markerObjType
- "\"MARKER_NUMBER\" TEXT," + // 2: markerNumber
- "\"OBJECT_NAME\" TEXT," + // 3: objectName
- "\"VOLTAGE_LEVEL\" TEXT," + // 4: voltageLevel
- "\"TRANSFORMER_MODEL\" TEXT," + // 5: transformerModel
- "\"HOLE_COUNT\" TEXT," + // 6: holeCount
- "\"CAPACITY\" TEXT," + // 7: capacity
- "\"WELL_COVER_MATERIAL\" TEXT," + // 8: wellCoverMaterial
- "\"COVER_DEPTH\" TEXT," + // 9: coverDepth
- "\"TRANSFORMER_SPEC\" TEXT," + // 10: transformerSpec
- "\"INLINE_NAME\" TEXT," + // 11: inlineName
- "\"SIZE\" TEXT," + // 12: size
- "\"BOTTOM_DEPTH\" TEXT," + // 13: bottomDepth
- "\"HEIGHT\" TEXT," + // 14: height
- "\"CROSS_PIPE_LINE\" TEXT," + // 15: crossPipeLine
- "\"INLINE_COUNT\" TEXT," + // 16: inlineCount
- "\"LINE_NUMBER\" TEXT," + // 17: lineNumber
- "\"JOINT_COUNT\" TEXT," + // 18: jointCount
- "\"OUTLINE_COUNT\" TEXT," + // 19: outlineCount
- "\"REMAINING_CHANNELS\" TEXT," + // 20: remainingChannels
- "\"CABINET_TYPE\" TEXT," + // 21: cabinetType
- "\"TIE_CABLE1\" TEXT," + // 22: tieCable1
- "\"TIE_CABLE2\" TEXT," + // 23: tieCable2
- "\"CASING_MATERIAL\" TEXT," + // 24: casingMaterial
- "\"CASING_SPEC\" TEXT," + // 25: casingSpec
- "\"CONSTRUCT_TIME\" TEXT," + // 26: constructTime
- "\"INSPECTION_UNIT\" TEXT," + // 27: inspectionUnit
- "\"AREA\" TEXT," + // 28: area
- "\"ROAD\" TEXT," + // 29: road
- "\"MEMO1\" TEXT," + // 30: memo1
- "\"MEMO2\" TEXT," + // 31: memo2
- "\"MEMO3\" TEXT," + // 32: memo3
- "\"MARKER_ID\" TEXT," + // 33: markerId
- "\"MARKER_TYPE\" TEXT," + // 34: markerType
- "\"OWNER\" TEXT," + // 35: owner
- "\"MARKER_DEPTH\" TEXT," + // 36: markerDepth
- "\"ELECTRIC_TAG_COUNT\" TEXT," + // 37: electricTagCount
- "\"INSTALLED_TIME\" TEXT," + // 38: installedTime
- "\"LONGITUDE\" TEXT," + // 39: longitude
- "\"LATITUDE\" TEXT," + // 40: latitude
- "\"MARKER_MEMO1\" TEXT," + // 41: markerMemo1
- "\"MARKER_MEMO2\" TEXT," + // 42: markerMemo2
- "\"MARKER_MEMO3\" TEXT," + // 43: markerMemo3
- "\"IMAGE_PATH\" TEXT);"); // 44: imagePath
- }
-
- /** Drops the underlying database table. */
- public static void dropTable(Database db, boolean ifExists) {
- String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"LABEL_BEAN\"";
- db.execSQL(sql);
- }
-
- @Override
- protected final void bindValues(DatabaseStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- protected final void bindValues(SQLiteStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public LabelBean readEntity(Cursor cursor, int offset) {
- LabelBean entity = new LabelBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerObjType
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // markerNumber
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // objectName
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // voltageLevel
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // transformerModel
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // holeCount
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // capacity
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // wellCoverMaterial
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // coverDepth
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // transformerSpec
- cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // inlineName
- cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // size
- cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // bottomDepth
- cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // height
- cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // crossPipeLine
- cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // inlineCount
- cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lineNumber
- cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // jointCount
- cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // outlineCount
- cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // remainingChannels
- cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // cabinetType
- cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // tieCable1
- cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // tieCable2
- cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // casingMaterial
- cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // casingSpec
- cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26), // constructTime
- cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27), // inspectionUnit
- cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28), // area
- cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29), // road
- cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30), // memo1
- cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31), // memo2
- cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32), // memo3
- cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33), // markerId
- cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34), // markerType
- cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35), // owner
- cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36), // markerDepth
- cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37), // electricTagCount
- cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38), // installedTime
- cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39), // longitude
- cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40), // latitude
- cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41), // markerMemo1
- cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42), // markerMemo2
- cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43), // markerMemo3
- cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44) // imagePath
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, LabelBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setMarkerObjType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setMarkerNumber(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setObjectName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setVoltageLevel(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setTransformerModel(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setHoleCount(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setCapacity(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setWellCoverMaterial(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setCoverDepth(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- entity.setTransformerSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
- entity.setInlineName(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
- entity.setSize(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
- entity.setBottomDepth(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
- entity.setHeight(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
- entity.setCrossPipeLine(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
- entity.setInlineCount(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
- entity.setLineNumber(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
- entity.setJointCount(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
- entity.setOutlineCount(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
- entity.setRemainingChannels(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
- entity.setCabinetType(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
- entity.setTieCable1(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
- entity.setTieCable2(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
- entity.setCasingMaterial(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
- entity.setCasingSpec(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
- entity.setConstructTime(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
- entity.setInspectionUnit(cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27));
- entity.setArea(cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28));
- entity.setRoad(cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29));
- entity.setMemo1(cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30));
- entity.setMemo2(cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31));
- entity.setMemo3(cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32));
- entity.setMarkerId(cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33));
- entity.setMarkerType(cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34));
- entity.setOwner(cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35));
- entity.setMarkerDepth(cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36));
- entity.setElectricTagCount(cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37));
- entity.setInstalledTime(cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38));
- entity.setLongitude(cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39));
- entity.setLatitude(cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40));
- entity.setMarkerMemo1(cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41));
- entity.setMarkerMemo2(cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42));
- entity.setMarkerMemo3(cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43));
- entity.setImagePath(cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(LabelBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(LabelBean entity) {
- if(entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(LabelBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java
new file mode 100644
index 0000000..9f2afa5
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java
@@ -0,0 +1,479 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.MarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "MARKER_LOCAL_BEAN".
+*/
+public class MarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property PipelineType = new Property(1, String.class, "pipelineType", false, "PIPELINE_TYPE");
+ public final static Property PipelineDiameter = new Property(2, String.class, "pipelineDiameter", false, "PIPELINE_DIAMETER");
+ public final static Property PipelineMaterial = new Property(3, String.class, "pipelineMaterial", false, "PIPELINE_MATERIAL");
+ public final static Property BuryMethod = new Property(4, String.class, "buryMethod", false, "BURY_METHOD");
+ public final static Property BuryDepth = new Property(5, String.class, "buryDepth", false, "BURY_DEPTH");
+ public final static Property Area = new Property(6, String.class, "area", false, "AREA");
+ public final static Property Line = new Property(7, String.class, "line", false, "LINE");
+ public final static Property Road = new Property(8, String.class, "road", false, "ROAD");
+ public final static Property ConstructTime = new Property(9, String.class, "constructTime", false, "CONSTRUCT_TIME");
+ public final static Property Owner = new Property(10, String.class, "owner", false, "OWNER");
+ public final static Property ObjectId = new Property(11, String.class, "objectId", false, "OBJECT_ID");
+ public final static Property MarkerId = new Property(12, String.class, "markerId", false, "MARKER_ID");
+ public final static Property MarkerType = new Property(13, String.class, "markerType", false, "MARKER_TYPE");
+ public final static Property MarkerDepth = new Property(14, String.class, "markerDepth", false, "MARKER_DEPTH");
+ public final static Property InstallationDept = new Property(15, String.class, "installationDept", false, "INSTALLATION_DEPT");
+ public final static Property Lng = new Property(16, String.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(17, String.class, "lat", false, "LAT");
+ public final static Property UpdateTime = new Property(18, String.class, "updateTime", false, "UPDATE_TIME");
+ public final static Property Remark = new Property(19, String.class, "remark", false, "REMARK");
+ public final static Property UnderlyingPipelineType = new Property(20, String.class, "underlyingPipelineType", false, "UNDERLYING_PIPELINE_TYPE");
+ public final static Property UnderlyingPipelineDepth = new Property(21, String.class, "underlyingPipelineDepth", false, "UNDERLYING_PIPELINE_DEPTH");
+ public final static Property UnderlyingPipelineDiameter = new Property(22, String.class, "underlyingPipelineDiameter", false, "UNDERLYING_PIPELINE_DIAMETER");
+ public final static Property UnderlyingPipelineMaterial = new Property(23, String.class, "underlyingPipelineMaterial", false, "UNDERLYING_PIPELINE_MATERIAL");
+ public final static Property ObjectType = new Property(24, String.class, "objectType", false, "OBJECT_TYPE");
+ public final static Property Color = new Property(25, String.class, "color", false, "COLOR");
+ public final static Property ImagePath = new Property(26, String.class, "imagePath", false, "IMAGE_PATH");
+ }
+
+
+ public MarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public MarkerLocalBeanDao(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 + "\"MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
+ "\"PIPELINE_TYPE\" TEXT," + // 1: pipelineType
+ "\"PIPELINE_DIAMETER\" TEXT," + // 2: pipelineDiameter
+ "\"PIPELINE_MATERIAL\" TEXT," + // 3: pipelineMaterial
+ "\"BURY_METHOD\" TEXT," + // 4: buryMethod
+ "\"BURY_DEPTH\" TEXT," + // 5: buryDepth
+ "\"AREA\" TEXT," + // 6: area
+ "\"LINE\" TEXT," + // 7: line
+ "\"ROAD\" TEXT," + // 8: road
+ "\"CONSTRUCT_TIME\" TEXT," + // 9: constructTime
+ "\"OWNER\" TEXT," + // 10: owner
+ "\"OBJECT_ID\" TEXT," + // 11: objectId
+ "\"MARKER_ID\" TEXT," + // 12: markerId
+ "\"MARKER_TYPE\" TEXT," + // 13: markerType
+ "\"MARKER_DEPTH\" TEXT," + // 14: markerDepth
+ "\"INSTALLATION_DEPT\" TEXT," + // 15: installationDept
+ "\"LNG\" TEXT," + // 16: lng
+ "\"LAT\" TEXT," + // 17: lat
+ "\"UPDATE_TIME\" TEXT," + // 18: updateTime
+ "\"REMARK\" TEXT," + // 19: remark
+ "\"UNDERLYING_PIPELINE_TYPE\" TEXT," + // 20: underlyingPipelineType
+ "\"UNDERLYING_PIPELINE_DEPTH\" TEXT," + // 21: underlyingPipelineDepth
+ "\"UNDERLYING_PIPELINE_DIAMETER\" TEXT," + // 22: underlyingPipelineDiameter
+ "\"UNDERLYING_PIPELINE_MATERIAL\" TEXT," + // 23: underlyingPipelineMaterial
+ "\"OBJECT_TYPE\" TEXT," + // 24: objectType
+ "\"COLOR\" TEXT," + // 25: color
+ "\"IMAGE_PATH\" TEXT);"); // 26: imagePath
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, MarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String pipelineType = entity.getPipelineType();
+ if (pipelineType != null) {
+ stmt.bindString(2, pipelineType);
+ }
+
+ String pipelineDiameter = entity.getPipelineDiameter();
+ if (pipelineDiameter != null) {
+ stmt.bindString(3, pipelineDiameter);
+ }
+
+ String pipelineMaterial = entity.getPipelineMaterial();
+ if (pipelineMaterial != null) {
+ stmt.bindString(4, pipelineMaterial);
+ }
+
+ String buryMethod = entity.getBuryMethod();
+ if (buryMethod != null) {
+ stmt.bindString(5, buryMethod);
+ }
+
+ String buryDepth = entity.getBuryDepth();
+ if (buryDepth != null) {
+ stmt.bindString(6, buryDepth);
+ }
+
+ String area = entity.getArea();
+ if (area != null) {
+ stmt.bindString(7, area);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String road = entity.getRoad();
+ if (road != null) {
+ stmt.bindString(9, road);
+ }
+
+ String constructTime = entity.getConstructTime();
+ if (constructTime != null) {
+ stmt.bindString(10, constructTime);
+ }
+
+ String owner = entity.getOwner();
+ if (owner != null) {
+ stmt.bindString(11, owner);
+ }
+
+ String objectId = entity.getObjectId();
+ if (objectId != null) {
+ stmt.bindString(12, objectId);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(13, markerId);
+ }
+
+ String markerType = entity.getMarkerType();
+ if (markerType != null) {
+ stmt.bindString(14, markerType);
+ }
+
+ String markerDepth = entity.getMarkerDepth();
+ if (markerDepth != null) {
+ stmt.bindString(15, markerDepth);
+ }
+
+ String installationDept = entity.getInstallationDept();
+ if (installationDept != null) {
+ stmt.bindString(16, installationDept);
+ }
+
+ String lng = entity.getLng();
+ if (lng != null) {
+ stmt.bindString(17, lng);
+ }
+
+ String lat = entity.getLat();
+ if (lat != null) {
+ stmt.bindString(18, lat);
+ }
+
+ String updateTime = entity.getUpdateTime();
+ if (updateTime != null) {
+ stmt.bindString(19, updateTime);
+ }
+
+ String remark = entity.getRemark();
+ if (remark != null) {
+ stmt.bindString(20, remark);
+ }
+
+ String underlyingPipelineType = entity.getUnderlyingPipelineType();
+ if (underlyingPipelineType != null) {
+ stmt.bindString(21, underlyingPipelineType);
+ }
+
+ String underlyingPipelineDepth = entity.getUnderlyingPipelineDepth();
+ if (underlyingPipelineDepth != null) {
+ stmt.bindString(22, underlyingPipelineDepth);
+ }
+
+ String underlyingPipelineDiameter = entity.getUnderlyingPipelineDiameter();
+ if (underlyingPipelineDiameter != null) {
+ stmt.bindString(23, underlyingPipelineDiameter);
+ }
+
+ String underlyingPipelineMaterial = entity.getUnderlyingPipelineMaterial();
+ if (underlyingPipelineMaterial != null) {
+ stmt.bindString(24, underlyingPipelineMaterial);
+ }
+
+ String objectType = entity.getObjectType();
+ if (objectType != null) {
+ stmt.bindString(25, objectType);
+ }
+
+ String color = entity.getColor();
+ if (color != null) {
+ stmt.bindString(26, color);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(27, imagePath);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, MarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String pipelineType = entity.getPipelineType();
+ if (pipelineType != null) {
+ stmt.bindString(2, pipelineType);
+ }
+
+ String pipelineDiameter = entity.getPipelineDiameter();
+ if (pipelineDiameter != null) {
+ stmt.bindString(3, pipelineDiameter);
+ }
+
+ String pipelineMaterial = entity.getPipelineMaterial();
+ if (pipelineMaterial != null) {
+ stmt.bindString(4, pipelineMaterial);
+ }
+
+ String buryMethod = entity.getBuryMethod();
+ if (buryMethod != null) {
+ stmt.bindString(5, buryMethod);
+ }
+
+ String buryDepth = entity.getBuryDepth();
+ if (buryDepth != null) {
+ stmt.bindString(6, buryDepth);
+ }
+
+ String area = entity.getArea();
+ if (area != null) {
+ stmt.bindString(7, area);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String road = entity.getRoad();
+ if (road != null) {
+ stmt.bindString(9, road);
+ }
+
+ String constructTime = entity.getConstructTime();
+ if (constructTime != null) {
+ stmt.bindString(10, constructTime);
+ }
+
+ String owner = entity.getOwner();
+ if (owner != null) {
+ stmt.bindString(11, owner);
+ }
+
+ String objectId = entity.getObjectId();
+ if (objectId != null) {
+ stmt.bindString(12, objectId);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(13, markerId);
+ }
+
+ String markerType = entity.getMarkerType();
+ if (markerType != null) {
+ stmt.bindString(14, markerType);
+ }
+
+ String markerDepth = entity.getMarkerDepth();
+ if (markerDepth != null) {
+ stmt.bindString(15, markerDepth);
+ }
+
+ String installationDept = entity.getInstallationDept();
+ if (installationDept != null) {
+ stmt.bindString(16, installationDept);
+ }
+
+ String lng = entity.getLng();
+ if (lng != null) {
+ stmt.bindString(17, lng);
+ }
+
+ String lat = entity.getLat();
+ if (lat != null) {
+ stmt.bindString(18, lat);
+ }
+
+ String updateTime = entity.getUpdateTime();
+ if (updateTime != null) {
+ stmt.bindString(19, updateTime);
+ }
+
+ String remark = entity.getRemark();
+ if (remark != null) {
+ stmt.bindString(20, remark);
+ }
+
+ String underlyingPipelineType = entity.getUnderlyingPipelineType();
+ if (underlyingPipelineType != null) {
+ stmt.bindString(21, underlyingPipelineType);
+ }
+
+ String underlyingPipelineDepth = entity.getUnderlyingPipelineDepth();
+ if (underlyingPipelineDepth != null) {
+ stmt.bindString(22, underlyingPipelineDepth);
+ }
+
+ String underlyingPipelineDiameter = entity.getUnderlyingPipelineDiameter();
+ if (underlyingPipelineDiameter != null) {
+ stmt.bindString(23, underlyingPipelineDiameter);
+ }
+
+ String underlyingPipelineMaterial = entity.getUnderlyingPipelineMaterial();
+ if (underlyingPipelineMaterial != null) {
+ stmt.bindString(24, underlyingPipelineMaterial);
+ }
+
+ String objectType = entity.getObjectType();
+ if (objectType != null) {
+ stmt.bindString(25, objectType);
+ }
+
+ String color = entity.getColor();
+ if (color != null) {
+ stmt.bindString(26, color);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(27, imagePath);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public MarkerLocalBean readEntity(Cursor cursor, int offset) {
+ MarkerLocalBean entity = new MarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // pipelineType
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // pipelineDiameter
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // pipelineMaterial
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // buryMethod
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // buryDepth
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // area
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // road
+ cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // constructTime
+ cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // owner
+ cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // objectId
+ cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // markerId
+ cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // markerType
+ cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // markerDepth
+ cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // installationDept
+ cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // lng
+ cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lat
+ cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // updateTime
+ cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // remark
+ cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // underlyingPipelineType
+ cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // underlyingPipelineDepth
+ cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // underlyingPipelineDiameter
+ cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // underlyingPipelineMaterial
+ cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // objectType
+ cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // color
+ cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26) // imagePath
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, MarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setPipelineType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setPipelineDiameter(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setPipelineMaterial(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setBuryMethod(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setBuryDepth(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setArea(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setRoad(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ entity.setConstructTime(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
+ entity.setOwner(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
+ entity.setObjectId(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
+ entity.setMarkerId(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
+ entity.setMarkerType(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
+ entity.setMarkerDepth(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
+ entity.setInstallationDept(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
+ entity.setLng(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
+ entity.setLat(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
+ entity.setUpdateTime(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
+ entity.setRemark(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
+ entity.setUnderlyingPipelineType(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
+ entity.setUnderlyingPipelineDepth(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
+ entity.setUnderlyingPipelineDiameter(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
+ entity.setUnderlyingPipelineMaterial(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
+ entity.setObjectType(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
+ entity.setColor(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
+ entity.setImagePath(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(MarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(MarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(MarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
index 18b1b7b..9d99b8d 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
@@ -3,7 +3,7 @@
import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;
-import com.casic.electric.detector.bean.SmallLabelBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.Property;
@@ -12,10 +12,11 @@
import org.greenrobot.greendao.internal.DaoConfig;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-/**
+
+/**
* DAO for table "SMALL_LABEL_BEAN".
-*/
-public class SmallLabelBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property MarkerId = new Property(1, String.class, "markerId", false, "MARKER_ID");
+ public final static Property LocationNumber = new Property(2, String.class, "locationNumber", false, "LOCATION_NUMBER");
+ public final static Property LocationName = new Property(3, String.class, "locationName", false, "LOCATION_NAME");
+ public final static Property ElectricMarkerId = new Property(4, String.class, "electricMarkerId", false, "ELECTRIC_MARKER_ID");
+ public final static Property CableName = new Property(5, String.class, "cableName", false, "CABLE_NAME");
+ public final static Property CableNumber = new Property(6, String.class, "cableNumber", false, "CABLE_NUMBER");
+ public final static Property Line = new Property(7, String.class, "line", false, "LINE");
+ public final static Property VoltageLevel = new Property(8, String.class, "voltageLevel", false, "VOLTAGE_LEVEL");
+ public final static Property CableType = new Property(9, String.class, "cableType", false, "CABLE_TYPE");
+ public final static Property CableSpec = new Property(10, String.class, "cableSpec", false, "CABLE_SPEC");
+ public final static Property CableBrand = new Property(11, String.class, "cableBrand", false, "CABLE_BRAND");
+ public final static Property CableStart = new Property(12, String.class, "cableStart", false, "CABLE_START");
+ public final static Property CableEnd = new Property(13, String.class, "cableEnd", false, "CABLE_END");
+ public final static Property HasJoint = new Property(14, String.class, "hasJoint", false, "HAS_JOINT");
+ public final static Property JointCreator = new Property(15, String.class, "jointCreator", false, "JOINT_CREATOR");
+ public final static Property ImagePath = new Property(16, String.class, "imagePath", false, "IMAGE_PATH");
+ public final static Property Memo1 = new Property(17, String.class, "memo1", false, "MEMO1");
+ public final static Property Memo2 = new Property(18, String.class, "memo2", false, "MEMO2");
+ public final static Property Memo3 = new Property(19, String.class, "memo3", false, "MEMO3");
+ }
+
+
+ public SmallMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public SmallMarkerLocalBeanDao(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 + "\"SMALL_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
+ "\"MARKER_ID\" TEXT," + // 1: markerId
+ "\"LOCATION_NUMBER\" TEXT," + // 2: locationNumber
+ "\"LOCATION_NAME\" TEXT," + // 3: locationName
+ "\"ELECTRIC_MARKER_ID\" TEXT," + // 4: electricMarkerId
+ "\"CABLE_NAME\" TEXT," + // 5: cableName
+ "\"CABLE_NUMBER\" TEXT," + // 6: cableNumber
+ "\"LINE\" TEXT," + // 7: line
+ "\"VOLTAGE_LEVEL\" TEXT," + // 8: voltageLevel
+ "\"CABLE_TYPE\" TEXT," + // 9: cableType
+ "\"CABLE_SPEC\" TEXT," + // 10: cableSpec
+ "\"CABLE_BRAND\" TEXT," + // 11: cableBrand
+ "\"CABLE_START\" TEXT," + // 12: cableStart
+ "\"CABLE_END\" TEXT," + // 13: cableEnd
+ "\"HAS_JOINT\" TEXT," + // 14: hasJoint
+ "\"JOINT_CREATOR\" TEXT," + // 15: jointCreator
+ "\"IMAGE_PATH\" TEXT," + // 16: imagePath
+ "\"MEMO1\" TEXT," + // 17: memo1
+ "\"MEMO2\" TEXT," + // 18: memo2
+ "\"MEMO3\" TEXT);"); // 19: memo3
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"SMALL_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, SmallMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(2, markerId);
+ }
+
+ String locationNumber = entity.getLocationNumber();
+ if (locationNumber != null) {
+ stmt.bindString(3, locationNumber);
+ }
+
+ String locationName = entity.getLocationName();
+ if (locationName != null) {
+ stmt.bindString(4, locationName);
+ }
+
+ String electricMarkerId = entity.getElectricMarkerId();
+ if (electricMarkerId != null) {
+ stmt.bindString(5, electricMarkerId);
+ }
+
+ String cableName = entity.getCableName();
+ if (cableName != null) {
+ stmt.bindString(6, cableName);
+ }
+
+ String cableNumber = entity.getCableNumber();
+ if (cableNumber != null) {
+ stmt.bindString(7, cableNumber);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String voltageLevel = entity.getVoltageLevel();
+ if (voltageLevel != null) {
+ stmt.bindString(9, voltageLevel);
+ }
+
+ String cableType = entity.getCableType();
+ if (cableType != null) {
+ stmt.bindString(10, cableType);
+ }
+
+ String cableSpec = entity.getCableSpec();
+ if (cableSpec != null) {
+ stmt.bindString(11, cableSpec);
+ }
+
+ String cableBrand = entity.getCableBrand();
+ if (cableBrand != null) {
+ stmt.bindString(12, cableBrand);
+ }
+
+ String cableStart = entity.getCableStart();
+ if (cableStart != null) {
+ stmt.bindString(13, cableStart);
+ }
+
+ String cableEnd = entity.getCableEnd();
+ if (cableEnd != null) {
+ stmt.bindString(14, cableEnd);
+ }
+
+ String hasJoint = entity.getHasJoint();
+ if (hasJoint != null) {
+ stmt.bindString(15, hasJoint);
+ }
+
+ String jointCreator = entity.getJointCreator();
+ if (jointCreator != null) {
+ stmt.bindString(16, jointCreator);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(17, imagePath);
+ }
+
+ String memo1 = entity.getMemo1();
+ if (memo1 != null) {
+ stmt.bindString(18, memo1);
+ }
+
+ String memo2 = entity.getMemo2();
+ if (memo2 != null) {
+ stmt.bindString(19, memo2);
+ }
+
+ String memo3 = entity.getMemo3();
+ if (memo3 != null) {
+ stmt.bindString(20, memo3);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, SmallMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(2, markerId);
+ }
+
+ String locationNumber = entity.getLocationNumber();
+ if (locationNumber != null) {
+ stmt.bindString(3, locationNumber);
+ }
+
+ String locationName = entity.getLocationName();
+ if (locationName != null) {
+ stmt.bindString(4, locationName);
+ }
+
+ String electricMarkerId = entity.getElectricMarkerId();
+ if (electricMarkerId != null) {
+ stmt.bindString(5, electricMarkerId);
+ }
+
+ String cableName = entity.getCableName();
+ if (cableName != null) {
+ stmt.bindString(6, cableName);
+ }
+
+ String cableNumber = entity.getCableNumber();
+ if (cableNumber != null) {
+ stmt.bindString(7, cableNumber);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String voltageLevel = entity.getVoltageLevel();
+ if (voltageLevel != null) {
+ stmt.bindString(9, voltageLevel);
+ }
+
+ String cableType = entity.getCableType();
+ if (cableType != null) {
+ stmt.bindString(10, cableType);
+ }
+
+ String cableSpec = entity.getCableSpec();
+ if (cableSpec != null) {
+ stmt.bindString(11, cableSpec);
+ }
+
+ String cableBrand = entity.getCableBrand();
+ if (cableBrand != null) {
+ stmt.bindString(12, cableBrand);
+ }
+
+ String cableStart = entity.getCableStart();
+ if (cableStart != null) {
+ stmt.bindString(13, cableStart);
+ }
+
+ String cableEnd = entity.getCableEnd();
+ if (cableEnd != null) {
+ stmt.bindString(14, cableEnd);
+ }
+
+ String hasJoint = entity.getHasJoint();
+ if (hasJoint != null) {
+ stmt.bindString(15, hasJoint);
+ }
+
+ String jointCreator = entity.getJointCreator();
+ if (jointCreator != null) {
+ stmt.bindString(16, jointCreator);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(17, imagePath);
+ }
+
+ String memo1 = entity.getMemo1();
+ if (memo1 != null) {
+ stmt.bindString(18, memo1);
+ }
+
+ String memo2 = entity.getMemo2();
+ if (memo2 != null) {
+ stmt.bindString(19, memo2);
+ }
+
+ String memo3 = entity.getMemo3();
+ if (memo3 != null) {
+ stmt.bindString(20, memo3);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public SmallMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ SmallMarkerLocalBean entity = new SmallMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // locationNumber
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // locationName
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // electricMarkerId
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // cableName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // cableNumber
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // voltageLevel
+ cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // cableType
+ cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // cableSpec
+ cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // cableBrand
+ cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // cableStart
+ cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // cableEnd
+ cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // hasJoint
+ cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // jointCreator
+ cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // imagePath
+ cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // memo1
+ cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // memo2
+ cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19) // memo3
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, SmallMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setMarkerId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setLocationNumber(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setLocationName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setElectricMarkerId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCableName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setCableNumber(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setVoltageLevel(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ entity.setCableType(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
+ entity.setCableSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
+ entity.setCableBrand(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
+ entity.setCableStart(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
+ entity.setCableEnd(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
+ entity.setHasJoint(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
+ entity.setJointCreator(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
+ entity.setImagePath(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
+ entity.setMemo1(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
+ entity.setMemo2(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
+ entity.setMemo3(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(SmallMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(SmallMarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(SmallMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java
deleted file mode 100644
index 802ffb0..0000000
--- a/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java
+++ /dev/null
@@ -1,241 +0,0 @@
-package com.casic.electric.detector.greendao;
-
-import android.database.Cursor;
-import android.database.sqlite.SQLiteStatement;
-
-import com.casic.electric.detector.bean.TaskBean;
-
-import org.greenrobot.greendao.AbstractDao;
-import org.greenrobot.greendao.Property;
-import org.greenrobot.greendao.database.Database;
-import org.greenrobot.greendao.database.DatabaseStatement;
-import org.greenrobot.greendao.internal.DaoConfig;
-
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-/**
- * DAO for table "TASK_BEAN".
-*/
-public class TaskBeanDao extends AbstractDao
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property TaskId = new Property(1, String.class, "taskId", false, "TASK_ID");
- public final static Property TaskCode = new Property(2, String.class, "taskCode", false, "TASK_CODE");
- public final static Property MarkerId = new Property(3, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerRealId = new Property(4, String.class, "markerRealId", false, "MARKER_REAL_ID");
- public final static Property Scanner = new Property(5, String.class, "scanner", false, "SCANNER");
- public final static Property Lng = new Property(6, String.class, "lng", false, "LNG");
- public final static Property Lat = new Property(7, String.class, "lat", false, "LAT");
- public final static Property State = new Property(8, String.class, "state", false, "STATE");
- public final static Property Desc = new Property(9, String.class, "desc", false, "DESC");
- }
-
-
- public TaskBeanDao(DaoConfig config) {
- super(config);
- }
-
- public TaskBeanDao(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 + "\"TASK_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"TASK_ID\" TEXT," + // 1: taskId
- "\"TASK_CODE\" TEXT," + // 2: taskCode
- "\"MARKER_ID\" TEXT," + // 3: markerId
- "\"MARKER_REAL_ID\" TEXT," + // 4: markerRealId
- "\"SCANNER\" TEXT," + // 5: scanner
- "\"LNG\" TEXT," + // 6: lng
- "\"LAT\" TEXT," + // 7: lat
- "\"STATE\" TEXT," + // 8: state
- "\"DESC\" TEXT);"); // 9: desc
- }
-
- /** Drops the underlying database table. */
- public static void dropTable(Database db, boolean ifExists) {
- String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_BEAN\"";
- db.execSQL(sql);
- }
-
- @Override
- protected final void bindValues(DatabaseStatement stmt, TaskBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(2, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(3, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(4, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(5, markerRealId);
- }
-
- String scanner = entity.getScanner();
- if (scanner != null) {
- stmt.bindString(6, scanner);
- }
-
- String lng = entity.getLng();
- if (lng != null) {
- stmt.bindString(7, lng);
- }
-
- String lat = entity.getLat();
- if (lat != null) {
- stmt.bindString(8, lat);
- }
-
- String state = entity.getState();
- if (state != null) {
- stmt.bindString(9, state);
- }
-
- String desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(10, desc);
- }
- }
-
- @Override
- protected final void bindValues(SQLiteStatement stmt, TaskBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(2, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(3, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(4, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(5, markerRealId);
- }
-
- String scanner = entity.getScanner();
- if (scanner != null) {
- stmt.bindString(6, scanner);
- }
-
- String lng = entity.getLng();
- if (lng != null) {
- stmt.bindString(7, lng);
- }
-
- String lat = entity.getLat();
- if (lat != null) {
- stmt.bindString(8, lat);
- }
-
- String state = entity.getState();
- if (state != null) {
- stmt.bindString(9, state);
- }
-
- String desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(10, desc);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public TaskBean readEntity(Cursor cursor, int offset) {
- TaskBean entity = new TaskBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskId
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskCode
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // markerId
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // markerRealId
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // scanner
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // lng
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // lat
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // state
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9) // desc
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, TaskBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setTaskId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setTaskCode(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setMarkerId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setMarkerRealId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setScanner(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setLng(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLat(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setState(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setDesc(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(TaskBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(TaskBean entity) {
- if(entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(TaskBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java
new file mode 100644
index 0000000..330af6b
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java
@@ -0,0 +1,227 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.TaskLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "TASK_LOCAL_BEAN".
+*/
+public class TaskLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskCode = new Property(1, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property Description = new Property(2, String.class, "description", false, "DESCRIPTION");
+ public final static Property CreateTime = new Property(3, String.class, "createTime", false, "CREATE_TIME");
+ public final static Property Status = new Property(4, String.class, "status", false, "STATUS");
+ public final static Property CreateUserName = new Property(5, String.class, "createUserName", false, "CREATE_USER_NAME");
+ public final static Property StartTime = new Property(6, String.class, "startTime", false, "START_TIME");
+ public final static Property EndTime = new Property(7, String.class, "endTime", false, "END_TIME");
+ public final static Property IsFreeTask = new Property(8, String.class, "isFreeTask", false, "IS_FREE_TASK");
+ }
+
+
+ public TaskLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskLocalBeanDao(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 + "\"TASK_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_CODE\" TEXT," + // 1: taskCode
+ "\"DESCRIPTION\" TEXT," + // 2: description
+ "\"CREATE_TIME\" TEXT," + // 3: createTime
+ "\"STATUS\" TEXT," + // 4: status
+ "\"CREATE_USER_NAME\" TEXT," + // 5: createUserName
+ "\"START_TIME\" TEXT," + // 6: startTime
+ "\"END_TIME\" TEXT," + // 7: endTime
+ "\"IS_FREE_TASK\" TEXT);"); // 8: isFreeTask
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+
+ String isFreeTask = entity.getIsFreeTask();
+ if (isFreeTask != null) {
+ stmt.bindString(9, isFreeTask);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+
+ String isFreeTask = entity.getIsFreeTask();
+ if (isFreeTask != null) {
+ stmt.bindString(9, isFreeTask);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskLocalBean readEntity(Cursor cursor, int offset) {
+ TaskLocalBean entity = new TaskLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskCode
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // description
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // createTime
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // status
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // createUserName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // startTime
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // endTime
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8) // isFreeTask
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskCode(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setDescription(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setCreateTime(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setStatus(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCreateUserName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setStartTime(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setEndTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setIsFreeTask(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskMarkerLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskMarkerLocalBeanDao.java
new file mode 100644
index 0000000..344c129
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/TaskMarkerLocalBeanDao.java
@@ -0,0 +1,197 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.TaskMarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "TASK_MARKER_LOCAL_BEAN".
+*/
+public class TaskMarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskId = new Property(1, String.class, "taskId", false, "TASK_ID");
+ public final static Property TaskCode = new Property(2, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property MarkerId = new Property(3, String.class, "markerId", false, "MARKER_ID");
+ public final static Property Lng = new Property(4, double.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(5, double.class, "lat", false, "LAT");
+ public final static Property IsDetected = new Property(6, String.class, "isDetected", false, "IS_DETECTED");
+ public final static Property DetectedTime = new Property(7, String.class, "detectedTime", false, "DETECTED_TIME");
+ }
+
+
+ public TaskMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskMarkerLocalBeanDao(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 + "\"TASK_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_ID\" TEXT," + // 1: taskId
+ "\"TASK_CODE\" TEXT," + // 2: taskCode
+ "\"MARKER_ID\" TEXT," + // 3: markerId
+ "\"LNG\" REAL NOT NULL ," + // 4: lng
+ "\"LAT\" REAL NOT NULL ," + // 5: lat
+ "\"IS_DETECTED\" TEXT," + // 6: isDetected
+ "\"DETECTED_TIME\" TEXT);"); // 7: detectedTime
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ TaskMarkerLocalBean entity = new TaskMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskCode
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // markerId
+ cursor.getDouble(offset + 4), // lng
+ cursor.getDouble(offset + 5), // lat
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // isDetected
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // detectedTime
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setTaskCode(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setMarkerId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setLng(cursor.getDouble(offset + 4));
+ entity.setLat(cursor.getDouble(offset + 5));
+ entity.setIsDetected(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setDetectedTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskMarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/model/TaskDetailLocalModel.java b/app/src/main/java/com/casic/electric/detector/model/TaskDetailLocalModel.java
new file mode 100644
index 0000000..a7c993c
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/model/TaskDetailLocalModel.java
@@ -0,0 +1,147 @@
+package com.casic.electric.detector.model;
+
+import java.util.List;
+
+/**
+ * Task本地库数据模型类,包含Task里面的Marker
+ */
+public class TaskDetailLocalModel {
+ private String taskId;//任务ID
+ private String taskCode;//任务编号
+ private String description;//任务名称
+ private String createTime;//任务创建的时间
+ private String status;//任务状态
+ private String createUserName;//任务创建者名称
+ private String startTime;//任务被开始执行的时间
+ private String endTime;//任务执行结束的时间
+ private String isFreeTask;//是否自由巡检。1-是,0-否
+ private List
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property MarkerObjType = new Property(1, String.class, "markerObjType", false, "MARKER_OBJ_TYPE");
- public final static Property MarkerNumber = new Property(2, String.class, "markerNumber", false, "MARKER_NUMBER");
- public final static Property ObjectName = new Property(3, String.class, "objectName", false, "OBJECT_NAME");
- public final static Property VoltageLevel = new Property(4, String.class, "voltageLevel", false, "VOLTAGE_LEVEL");
- public final static Property TransformerModel = new Property(5, String.class, "transformerModel", false, "TRANSFORMER_MODEL");
- public final static Property HoleCount = new Property(6, String.class, "holeCount", false, "HOLE_COUNT");
- public final static Property Capacity = new Property(7, String.class, "capacity", false, "CAPACITY");
- public final static Property WellCoverMaterial = new Property(8, String.class, "wellCoverMaterial", false, "WELL_COVER_MATERIAL");
- public final static Property CoverDepth = new Property(9, String.class, "coverDepth", false, "COVER_DEPTH");
- public final static Property TransformerSpec = new Property(10, String.class, "transformerSpec", false, "TRANSFORMER_SPEC");
- public final static Property InlineName = new Property(11, String.class, "inlineName", false, "INLINE_NAME");
- public final static Property Size = new Property(12, String.class, "size", false, "SIZE");
- public final static Property BottomDepth = new Property(13, String.class, "bottomDepth", false, "BOTTOM_DEPTH");
- public final static Property Height = new Property(14, String.class, "height", false, "HEIGHT");
- public final static Property CrossPipeLine = new Property(15, String.class, "crossPipeLine", false, "CROSS_PIPE_LINE");
- public final static Property InlineCount = new Property(16, String.class, "inlineCount", false, "INLINE_COUNT");
- public final static Property LineNumber = new Property(17, String.class, "lineNumber", false, "LINE_NUMBER");
- public final static Property JointCount = new Property(18, String.class, "jointCount", false, "JOINT_COUNT");
- public final static Property OutlineCount = new Property(19, String.class, "outlineCount", false, "OUTLINE_COUNT");
- public final static Property RemainingChannels = new Property(20, String.class, "remainingChannels", false, "REMAINING_CHANNELS");
- public final static Property CabinetType = new Property(21, String.class, "cabinetType", false, "CABINET_TYPE");
- public final static Property TieCable1 = new Property(22, String.class, "tieCable1", false, "TIE_CABLE1");
- public final static Property TieCable2 = new Property(23, String.class, "tieCable2", false, "TIE_CABLE2");
- public final static Property CasingMaterial = new Property(24, String.class, "casingMaterial", false, "CASING_MATERIAL");
- public final static Property CasingSpec = new Property(25, String.class, "casingSpec", false, "CASING_SPEC");
- public final static Property ConstructTime = new Property(26, String.class, "constructTime", false, "CONSTRUCT_TIME");
- public final static Property InspectionUnit = new Property(27, String.class, "inspectionUnit", false, "INSPECTION_UNIT");
- public final static Property Area = new Property(28, String.class, "area", false, "AREA");
- public final static Property Road = new Property(29, String.class, "road", false, "ROAD");
- public final static Property Memo1 = new Property(30, String.class, "memo1", false, "MEMO1");
- public final static Property Memo2 = new Property(31, String.class, "memo2", false, "MEMO2");
- public final static Property Memo3 = new Property(32, String.class, "memo3", false, "MEMO3");
- public final static Property MarkerId = new Property(33, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerType = new Property(34, String.class, "markerType", false, "MARKER_TYPE");
- public final static Property Owner = new Property(35, String.class, "owner", false, "OWNER");
- public final static Property MarkerDepth = new Property(36, String.class, "markerDepth", false, "MARKER_DEPTH");
- public final static Property ElectricTagCount = new Property(37, String.class, "electricTagCount", false, "ELECTRIC_TAG_COUNT");
- public final static Property InstalledTime = new Property(38, String.class, "installedTime", false, "INSTALLED_TIME");
- public final static Property Longitude = new Property(39, String.class, "longitude", false, "LONGITUDE");
- public final static Property Latitude = new Property(40, String.class, "latitude", false, "LATITUDE");
- public final static Property MarkerMemo1 = new Property(41, String.class, "markerMemo1", false, "MARKER_MEMO1");
- public final static Property MarkerMemo2 = new Property(42, String.class, "markerMemo2", false, "MARKER_MEMO2");
- public final static Property MarkerMemo3 = new Property(43, String.class, "markerMemo3", false, "MARKER_MEMO3");
- public final static Property ImagePath = new Property(44, String.class, "imagePath", false, "IMAGE_PATH");
- }
-
-
- public LabelBeanDao(DaoConfig config) {
- super(config);
- }
-
- public LabelBeanDao(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 + "\"LABEL_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"MARKER_OBJ_TYPE\" TEXT," + // 1: markerObjType
- "\"MARKER_NUMBER\" TEXT," + // 2: markerNumber
- "\"OBJECT_NAME\" TEXT," + // 3: objectName
- "\"VOLTAGE_LEVEL\" TEXT," + // 4: voltageLevel
- "\"TRANSFORMER_MODEL\" TEXT," + // 5: transformerModel
- "\"HOLE_COUNT\" TEXT," + // 6: holeCount
- "\"CAPACITY\" TEXT," + // 7: capacity
- "\"WELL_COVER_MATERIAL\" TEXT," + // 8: wellCoverMaterial
- "\"COVER_DEPTH\" TEXT," + // 9: coverDepth
- "\"TRANSFORMER_SPEC\" TEXT," + // 10: transformerSpec
- "\"INLINE_NAME\" TEXT," + // 11: inlineName
- "\"SIZE\" TEXT," + // 12: size
- "\"BOTTOM_DEPTH\" TEXT," + // 13: bottomDepth
- "\"HEIGHT\" TEXT," + // 14: height
- "\"CROSS_PIPE_LINE\" TEXT," + // 15: crossPipeLine
- "\"INLINE_COUNT\" TEXT," + // 16: inlineCount
- "\"LINE_NUMBER\" TEXT," + // 17: lineNumber
- "\"JOINT_COUNT\" TEXT," + // 18: jointCount
- "\"OUTLINE_COUNT\" TEXT," + // 19: outlineCount
- "\"REMAINING_CHANNELS\" TEXT," + // 20: remainingChannels
- "\"CABINET_TYPE\" TEXT," + // 21: cabinetType
- "\"TIE_CABLE1\" TEXT," + // 22: tieCable1
- "\"TIE_CABLE2\" TEXT," + // 23: tieCable2
- "\"CASING_MATERIAL\" TEXT," + // 24: casingMaterial
- "\"CASING_SPEC\" TEXT," + // 25: casingSpec
- "\"CONSTRUCT_TIME\" TEXT," + // 26: constructTime
- "\"INSPECTION_UNIT\" TEXT," + // 27: inspectionUnit
- "\"AREA\" TEXT," + // 28: area
- "\"ROAD\" TEXT," + // 29: road
- "\"MEMO1\" TEXT," + // 30: memo1
- "\"MEMO2\" TEXT," + // 31: memo2
- "\"MEMO3\" TEXT," + // 32: memo3
- "\"MARKER_ID\" TEXT," + // 33: markerId
- "\"MARKER_TYPE\" TEXT," + // 34: markerType
- "\"OWNER\" TEXT," + // 35: owner
- "\"MARKER_DEPTH\" TEXT," + // 36: markerDepth
- "\"ELECTRIC_TAG_COUNT\" TEXT," + // 37: electricTagCount
- "\"INSTALLED_TIME\" TEXT," + // 38: installedTime
- "\"LONGITUDE\" TEXT," + // 39: longitude
- "\"LATITUDE\" TEXT," + // 40: latitude
- "\"MARKER_MEMO1\" TEXT," + // 41: markerMemo1
- "\"MARKER_MEMO2\" TEXT," + // 42: markerMemo2
- "\"MARKER_MEMO3\" TEXT," + // 43: markerMemo3
- "\"IMAGE_PATH\" TEXT);"); // 44: imagePath
- }
-
- /** Drops the underlying database table. */
- public static void dropTable(Database db, boolean ifExists) {
- String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"LABEL_BEAN\"";
- db.execSQL(sql);
- }
-
- @Override
- protected final void bindValues(DatabaseStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- protected final void bindValues(SQLiteStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public LabelBean readEntity(Cursor cursor, int offset) {
- LabelBean entity = new LabelBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerObjType
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // markerNumber
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // objectName
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // voltageLevel
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // transformerModel
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // holeCount
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // capacity
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // wellCoverMaterial
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // coverDepth
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // transformerSpec
- cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // inlineName
- cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // size
- cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // bottomDepth
- cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // height
- cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // crossPipeLine
- cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // inlineCount
- cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lineNumber
- cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // jointCount
- cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // outlineCount
- cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // remainingChannels
- cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // cabinetType
- cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // tieCable1
- cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // tieCable2
- cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // casingMaterial
- cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // casingSpec
- cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26), // constructTime
- cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27), // inspectionUnit
- cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28), // area
- cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29), // road
- cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30), // memo1
- cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31), // memo2
- cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32), // memo3
- cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33), // markerId
- cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34), // markerType
- cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35), // owner
- cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36), // markerDepth
- cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37), // electricTagCount
- cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38), // installedTime
- cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39), // longitude
- cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40), // latitude
- cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41), // markerMemo1
- cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42), // markerMemo2
- cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43), // markerMemo3
- cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44) // imagePath
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, LabelBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setMarkerObjType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setMarkerNumber(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setObjectName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setVoltageLevel(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setTransformerModel(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setHoleCount(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setCapacity(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setWellCoverMaterial(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setCoverDepth(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- entity.setTransformerSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
- entity.setInlineName(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
- entity.setSize(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
- entity.setBottomDepth(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
- entity.setHeight(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
- entity.setCrossPipeLine(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
- entity.setInlineCount(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
- entity.setLineNumber(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
- entity.setJointCount(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
- entity.setOutlineCount(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
- entity.setRemainingChannels(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
- entity.setCabinetType(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
- entity.setTieCable1(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
- entity.setTieCable2(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
- entity.setCasingMaterial(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
- entity.setCasingSpec(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
- entity.setConstructTime(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
- entity.setInspectionUnit(cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27));
- entity.setArea(cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28));
- entity.setRoad(cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29));
- entity.setMemo1(cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30));
- entity.setMemo2(cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31));
- entity.setMemo3(cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32));
- entity.setMarkerId(cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33));
- entity.setMarkerType(cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34));
- entity.setOwner(cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35));
- entity.setMarkerDepth(cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36));
- entity.setElectricTagCount(cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37));
- entity.setInstalledTime(cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38));
- entity.setLongitude(cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39));
- entity.setLatitude(cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40));
- entity.setMarkerMemo1(cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41));
- entity.setMarkerMemo2(cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42));
- entity.setMarkerMemo3(cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43));
- entity.setImagePath(cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(LabelBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(LabelBean entity) {
- if(entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(LabelBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java
new file mode 100644
index 0000000..9f2afa5
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java
@@ -0,0 +1,479 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.MarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "MARKER_LOCAL_BEAN".
+*/
+public class MarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property PipelineType = new Property(1, String.class, "pipelineType", false, "PIPELINE_TYPE");
+ public final static Property PipelineDiameter = new Property(2, String.class, "pipelineDiameter", false, "PIPELINE_DIAMETER");
+ public final static Property PipelineMaterial = new Property(3, String.class, "pipelineMaterial", false, "PIPELINE_MATERIAL");
+ public final static Property BuryMethod = new Property(4, String.class, "buryMethod", false, "BURY_METHOD");
+ public final static Property BuryDepth = new Property(5, String.class, "buryDepth", false, "BURY_DEPTH");
+ public final static Property Area = new Property(6, String.class, "area", false, "AREA");
+ public final static Property Line = new Property(7, String.class, "line", false, "LINE");
+ public final static Property Road = new Property(8, String.class, "road", false, "ROAD");
+ public final static Property ConstructTime = new Property(9, String.class, "constructTime", false, "CONSTRUCT_TIME");
+ public final static Property Owner = new Property(10, String.class, "owner", false, "OWNER");
+ public final static Property ObjectId = new Property(11, String.class, "objectId", false, "OBJECT_ID");
+ public final static Property MarkerId = new Property(12, String.class, "markerId", false, "MARKER_ID");
+ public final static Property MarkerType = new Property(13, String.class, "markerType", false, "MARKER_TYPE");
+ public final static Property MarkerDepth = new Property(14, String.class, "markerDepth", false, "MARKER_DEPTH");
+ public final static Property InstallationDept = new Property(15, String.class, "installationDept", false, "INSTALLATION_DEPT");
+ public final static Property Lng = new Property(16, String.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(17, String.class, "lat", false, "LAT");
+ public final static Property UpdateTime = new Property(18, String.class, "updateTime", false, "UPDATE_TIME");
+ public final static Property Remark = new Property(19, String.class, "remark", false, "REMARK");
+ public final static Property UnderlyingPipelineType = new Property(20, String.class, "underlyingPipelineType", false, "UNDERLYING_PIPELINE_TYPE");
+ public final static Property UnderlyingPipelineDepth = new Property(21, String.class, "underlyingPipelineDepth", false, "UNDERLYING_PIPELINE_DEPTH");
+ public final static Property UnderlyingPipelineDiameter = new Property(22, String.class, "underlyingPipelineDiameter", false, "UNDERLYING_PIPELINE_DIAMETER");
+ public final static Property UnderlyingPipelineMaterial = new Property(23, String.class, "underlyingPipelineMaterial", false, "UNDERLYING_PIPELINE_MATERIAL");
+ public final static Property ObjectType = new Property(24, String.class, "objectType", false, "OBJECT_TYPE");
+ public final static Property Color = new Property(25, String.class, "color", false, "COLOR");
+ public final static Property ImagePath = new Property(26, String.class, "imagePath", false, "IMAGE_PATH");
+ }
+
+
+ public MarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public MarkerLocalBeanDao(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 + "\"MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
+ "\"PIPELINE_TYPE\" TEXT," + // 1: pipelineType
+ "\"PIPELINE_DIAMETER\" TEXT," + // 2: pipelineDiameter
+ "\"PIPELINE_MATERIAL\" TEXT," + // 3: pipelineMaterial
+ "\"BURY_METHOD\" TEXT," + // 4: buryMethod
+ "\"BURY_DEPTH\" TEXT," + // 5: buryDepth
+ "\"AREA\" TEXT," + // 6: area
+ "\"LINE\" TEXT," + // 7: line
+ "\"ROAD\" TEXT," + // 8: road
+ "\"CONSTRUCT_TIME\" TEXT," + // 9: constructTime
+ "\"OWNER\" TEXT," + // 10: owner
+ "\"OBJECT_ID\" TEXT," + // 11: objectId
+ "\"MARKER_ID\" TEXT," + // 12: markerId
+ "\"MARKER_TYPE\" TEXT," + // 13: markerType
+ "\"MARKER_DEPTH\" TEXT," + // 14: markerDepth
+ "\"INSTALLATION_DEPT\" TEXT," + // 15: installationDept
+ "\"LNG\" TEXT," + // 16: lng
+ "\"LAT\" TEXT," + // 17: lat
+ "\"UPDATE_TIME\" TEXT," + // 18: updateTime
+ "\"REMARK\" TEXT," + // 19: remark
+ "\"UNDERLYING_PIPELINE_TYPE\" TEXT," + // 20: underlyingPipelineType
+ "\"UNDERLYING_PIPELINE_DEPTH\" TEXT," + // 21: underlyingPipelineDepth
+ "\"UNDERLYING_PIPELINE_DIAMETER\" TEXT," + // 22: underlyingPipelineDiameter
+ "\"UNDERLYING_PIPELINE_MATERIAL\" TEXT," + // 23: underlyingPipelineMaterial
+ "\"OBJECT_TYPE\" TEXT," + // 24: objectType
+ "\"COLOR\" TEXT," + // 25: color
+ "\"IMAGE_PATH\" TEXT);"); // 26: imagePath
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, MarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String pipelineType = entity.getPipelineType();
+ if (pipelineType != null) {
+ stmt.bindString(2, pipelineType);
+ }
+
+ String pipelineDiameter = entity.getPipelineDiameter();
+ if (pipelineDiameter != null) {
+ stmt.bindString(3, pipelineDiameter);
+ }
+
+ String pipelineMaterial = entity.getPipelineMaterial();
+ if (pipelineMaterial != null) {
+ stmt.bindString(4, pipelineMaterial);
+ }
+
+ String buryMethod = entity.getBuryMethod();
+ if (buryMethod != null) {
+ stmt.bindString(5, buryMethod);
+ }
+
+ String buryDepth = entity.getBuryDepth();
+ if (buryDepth != null) {
+ stmt.bindString(6, buryDepth);
+ }
+
+ String area = entity.getArea();
+ if (area != null) {
+ stmt.bindString(7, area);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String road = entity.getRoad();
+ if (road != null) {
+ stmt.bindString(9, road);
+ }
+
+ String constructTime = entity.getConstructTime();
+ if (constructTime != null) {
+ stmt.bindString(10, constructTime);
+ }
+
+ String owner = entity.getOwner();
+ if (owner != null) {
+ stmt.bindString(11, owner);
+ }
+
+ String objectId = entity.getObjectId();
+ if (objectId != null) {
+ stmt.bindString(12, objectId);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(13, markerId);
+ }
+
+ String markerType = entity.getMarkerType();
+ if (markerType != null) {
+ stmt.bindString(14, markerType);
+ }
+
+ String markerDepth = entity.getMarkerDepth();
+ if (markerDepth != null) {
+ stmt.bindString(15, markerDepth);
+ }
+
+ String installationDept = entity.getInstallationDept();
+ if (installationDept != null) {
+ stmt.bindString(16, installationDept);
+ }
+
+ String lng = entity.getLng();
+ if (lng != null) {
+ stmt.bindString(17, lng);
+ }
+
+ String lat = entity.getLat();
+ if (lat != null) {
+ stmt.bindString(18, lat);
+ }
+
+ String updateTime = entity.getUpdateTime();
+ if (updateTime != null) {
+ stmt.bindString(19, updateTime);
+ }
+
+ String remark = entity.getRemark();
+ if (remark != null) {
+ stmt.bindString(20, remark);
+ }
+
+ String underlyingPipelineType = entity.getUnderlyingPipelineType();
+ if (underlyingPipelineType != null) {
+ stmt.bindString(21, underlyingPipelineType);
+ }
+
+ String underlyingPipelineDepth = entity.getUnderlyingPipelineDepth();
+ if (underlyingPipelineDepth != null) {
+ stmt.bindString(22, underlyingPipelineDepth);
+ }
+
+ String underlyingPipelineDiameter = entity.getUnderlyingPipelineDiameter();
+ if (underlyingPipelineDiameter != null) {
+ stmt.bindString(23, underlyingPipelineDiameter);
+ }
+
+ String underlyingPipelineMaterial = entity.getUnderlyingPipelineMaterial();
+ if (underlyingPipelineMaterial != null) {
+ stmt.bindString(24, underlyingPipelineMaterial);
+ }
+
+ String objectType = entity.getObjectType();
+ if (objectType != null) {
+ stmt.bindString(25, objectType);
+ }
+
+ String color = entity.getColor();
+ if (color != null) {
+ stmt.bindString(26, color);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(27, imagePath);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, MarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String pipelineType = entity.getPipelineType();
+ if (pipelineType != null) {
+ stmt.bindString(2, pipelineType);
+ }
+
+ String pipelineDiameter = entity.getPipelineDiameter();
+ if (pipelineDiameter != null) {
+ stmt.bindString(3, pipelineDiameter);
+ }
+
+ String pipelineMaterial = entity.getPipelineMaterial();
+ if (pipelineMaterial != null) {
+ stmt.bindString(4, pipelineMaterial);
+ }
+
+ String buryMethod = entity.getBuryMethod();
+ if (buryMethod != null) {
+ stmt.bindString(5, buryMethod);
+ }
+
+ String buryDepth = entity.getBuryDepth();
+ if (buryDepth != null) {
+ stmt.bindString(6, buryDepth);
+ }
+
+ String area = entity.getArea();
+ if (area != null) {
+ stmt.bindString(7, area);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String road = entity.getRoad();
+ if (road != null) {
+ stmt.bindString(9, road);
+ }
+
+ String constructTime = entity.getConstructTime();
+ if (constructTime != null) {
+ stmt.bindString(10, constructTime);
+ }
+
+ String owner = entity.getOwner();
+ if (owner != null) {
+ stmt.bindString(11, owner);
+ }
+
+ String objectId = entity.getObjectId();
+ if (objectId != null) {
+ stmt.bindString(12, objectId);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(13, markerId);
+ }
+
+ String markerType = entity.getMarkerType();
+ if (markerType != null) {
+ stmt.bindString(14, markerType);
+ }
+
+ String markerDepth = entity.getMarkerDepth();
+ if (markerDepth != null) {
+ stmt.bindString(15, markerDepth);
+ }
+
+ String installationDept = entity.getInstallationDept();
+ if (installationDept != null) {
+ stmt.bindString(16, installationDept);
+ }
+
+ String lng = entity.getLng();
+ if (lng != null) {
+ stmt.bindString(17, lng);
+ }
+
+ String lat = entity.getLat();
+ if (lat != null) {
+ stmt.bindString(18, lat);
+ }
+
+ String updateTime = entity.getUpdateTime();
+ if (updateTime != null) {
+ stmt.bindString(19, updateTime);
+ }
+
+ String remark = entity.getRemark();
+ if (remark != null) {
+ stmt.bindString(20, remark);
+ }
+
+ String underlyingPipelineType = entity.getUnderlyingPipelineType();
+ if (underlyingPipelineType != null) {
+ stmt.bindString(21, underlyingPipelineType);
+ }
+
+ String underlyingPipelineDepth = entity.getUnderlyingPipelineDepth();
+ if (underlyingPipelineDepth != null) {
+ stmt.bindString(22, underlyingPipelineDepth);
+ }
+
+ String underlyingPipelineDiameter = entity.getUnderlyingPipelineDiameter();
+ if (underlyingPipelineDiameter != null) {
+ stmt.bindString(23, underlyingPipelineDiameter);
+ }
+
+ String underlyingPipelineMaterial = entity.getUnderlyingPipelineMaterial();
+ if (underlyingPipelineMaterial != null) {
+ stmt.bindString(24, underlyingPipelineMaterial);
+ }
+
+ String objectType = entity.getObjectType();
+ if (objectType != null) {
+ stmt.bindString(25, objectType);
+ }
+
+ String color = entity.getColor();
+ if (color != null) {
+ stmt.bindString(26, color);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(27, imagePath);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public MarkerLocalBean readEntity(Cursor cursor, int offset) {
+ MarkerLocalBean entity = new MarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // pipelineType
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // pipelineDiameter
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // pipelineMaterial
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // buryMethod
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // buryDepth
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // area
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // road
+ cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // constructTime
+ cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // owner
+ cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // objectId
+ cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // markerId
+ cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // markerType
+ cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // markerDepth
+ cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // installationDept
+ cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // lng
+ cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lat
+ cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // updateTime
+ cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // remark
+ cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // underlyingPipelineType
+ cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // underlyingPipelineDepth
+ cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // underlyingPipelineDiameter
+ cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // underlyingPipelineMaterial
+ cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // objectType
+ cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // color
+ cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26) // imagePath
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, MarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setPipelineType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setPipelineDiameter(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setPipelineMaterial(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setBuryMethod(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setBuryDepth(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setArea(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setRoad(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ entity.setConstructTime(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
+ entity.setOwner(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
+ entity.setObjectId(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
+ entity.setMarkerId(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
+ entity.setMarkerType(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
+ entity.setMarkerDepth(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
+ entity.setInstallationDept(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
+ entity.setLng(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
+ entity.setLat(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
+ entity.setUpdateTime(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
+ entity.setRemark(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
+ entity.setUnderlyingPipelineType(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
+ entity.setUnderlyingPipelineDepth(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
+ entity.setUnderlyingPipelineDiameter(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
+ entity.setUnderlyingPipelineMaterial(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
+ entity.setObjectType(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
+ entity.setColor(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
+ entity.setImagePath(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(MarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(MarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(MarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
index 18b1b7b..9d99b8d 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
@@ -3,7 +3,7 @@
import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;
-import com.casic.electric.detector.bean.SmallLabelBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.Property;
@@ -12,10 +12,11 @@
import org.greenrobot.greendao.internal.DaoConfig;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-/**
+
+/**
* DAO for table "SMALL_LABEL_BEAN".
-*/
-public class SmallLabelBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property MarkerId = new Property(1, String.class, "markerId", false, "MARKER_ID");
+ public final static Property LocationNumber = new Property(2, String.class, "locationNumber", false, "LOCATION_NUMBER");
+ public final static Property LocationName = new Property(3, String.class, "locationName", false, "LOCATION_NAME");
+ public final static Property ElectricMarkerId = new Property(4, String.class, "electricMarkerId", false, "ELECTRIC_MARKER_ID");
+ public final static Property CableName = new Property(5, String.class, "cableName", false, "CABLE_NAME");
+ public final static Property CableNumber = new Property(6, String.class, "cableNumber", false, "CABLE_NUMBER");
+ public final static Property Line = new Property(7, String.class, "line", false, "LINE");
+ public final static Property VoltageLevel = new Property(8, String.class, "voltageLevel", false, "VOLTAGE_LEVEL");
+ public final static Property CableType = new Property(9, String.class, "cableType", false, "CABLE_TYPE");
+ public final static Property CableSpec = new Property(10, String.class, "cableSpec", false, "CABLE_SPEC");
+ public final static Property CableBrand = new Property(11, String.class, "cableBrand", false, "CABLE_BRAND");
+ public final static Property CableStart = new Property(12, String.class, "cableStart", false, "CABLE_START");
+ public final static Property CableEnd = new Property(13, String.class, "cableEnd", false, "CABLE_END");
+ public final static Property HasJoint = new Property(14, String.class, "hasJoint", false, "HAS_JOINT");
+ public final static Property JointCreator = new Property(15, String.class, "jointCreator", false, "JOINT_CREATOR");
+ public final static Property ImagePath = new Property(16, String.class, "imagePath", false, "IMAGE_PATH");
+ public final static Property Memo1 = new Property(17, String.class, "memo1", false, "MEMO1");
+ public final static Property Memo2 = new Property(18, String.class, "memo2", false, "MEMO2");
+ public final static Property Memo3 = new Property(19, String.class, "memo3", false, "MEMO3");
+ }
+
+
+ public SmallMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public SmallMarkerLocalBeanDao(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 + "\"SMALL_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
+ "\"MARKER_ID\" TEXT," + // 1: markerId
+ "\"LOCATION_NUMBER\" TEXT," + // 2: locationNumber
+ "\"LOCATION_NAME\" TEXT," + // 3: locationName
+ "\"ELECTRIC_MARKER_ID\" TEXT," + // 4: electricMarkerId
+ "\"CABLE_NAME\" TEXT," + // 5: cableName
+ "\"CABLE_NUMBER\" TEXT," + // 6: cableNumber
+ "\"LINE\" TEXT," + // 7: line
+ "\"VOLTAGE_LEVEL\" TEXT," + // 8: voltageLevel
+ "\"CABLE_TYPE\" TEXT," + // 9: cableType
+ "\"CABLE_SPEC\" TEXT," + // 10: cableSpec
+ "\"CABLE_BRAND\" TEXT," + // 11: cableBrand
+ "\"CABLE_START\" TEXT," + // 12: cableStart
+ "\"CABLE_END\" TEXT," + // 13: cableEnd
+ "\"HAS_JOINT\" TEXT," + // 14: hasJoint
+ "\"JOINT_CREATOR\" TEXT," + // 15: jointCreator
+ "\"IMAGE_PATH\" TEXT," + // 16: imagePath
+ "\"MEMO1\" TEXT," + // 17: memo1
+ "\"MEMO2\" TEXT," + // 18: memo2
+ "\"MEMO3\" TEXT);"); // 19: memo3
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"SMALL_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, SmallMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(2, markerId);
+ }
+
+ String locationNumber = entity.getLocationNumber();
+ if (locationNumber != null) {
+ stmt.bindString(3, locationNumber);
+ }
+
+ String locationName = entity.getLocationName();
+ if (locationName != null) {
+ stmt.bindString(4, locationName);
+ }
+
+ String electricMarkerId = entity.getElectricMarkerId();
+ if (electricMarkerId != null) {
+ stmt.bindString(5, electricMarkerId);
+ }
+
+ String cableName = entity.getCableName();
+ if (cableName != null) {
+ stmt.bindString(6, cableName);
+ }
+
+ String cableNumber = entity.getCableNumber();
+ if (cableNumber != null) {
+ stmt.bindString(7, cableNumber);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String voltageLevel = entity.getVoltageLevel();
+ if (voltageLevel != null) {
+ stmt.bindString(9, voltageLevel);
+ }
+
+ String cableType = entity.getCableType();
+ if (cableType != null) {
+ stmt.bindString(10, cableType);
+ }
+
+ String cableSpec = entity.getCableSpec();
+ if (cableSpec != null) {
+ stmt.bindString(11, cableSpec);
+ }
+
+ String cableBrand = entity.getCableBrand();
+ if (cableBrand != null) {
+ stmt.bindString(12, cableBrand);
+ }
+
+ String cableStart = entity.getCableStart();
+ if (cableStart != null) {
+ stmt.bindString(13, cableStart);
+ }
+
+ String cableEnd = entity.getCableEnd();
+ if (cableEnd != null) {
+ stmt.bindString(14, cableEnd);
+ }
+
+ String hasJoint = entity.getHasJoint();
+ if (hasJoint != null) {
+ stmt.bindString(15, hasJoint);
+ }
+
+ String jointCreator = entity.getJointCreator();
+ if (jointCreator != null) {
+ stmt.bindString(16, jointCreator);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(17, imagePath);
+ }
+
+ String memo1 = entity.getMemo1();
+ if (memo1 != null) {
+ stmt.bindString(18, memo1);
+ }
+
+ String memo2 = entity.getMemo2();
+ if (memo2 != null) {
+ stmt.bindString(19, memo2);
+ }
+
+ String memo3 = entity.getMemo3();
+ if (memo3 != null) {
+ stmt.bindString(20, memo3);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, SmallMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(2, markerId);
+ }
+
+ String locationNumber = entity.getLocationNumber();
+ if (locationNumber != null) {
+ stmt.bindString(3, locationNumber);
+ }
+
+ String locationName = entity.getLocationName();
+ if (locationName != null) {
+ stmt.bindString(4, locationName);
+ }
+
+ String electricMarkerId = entity.getElectricMarkerId();
+ if (electricMarkerId != null) {
+ stmt.bindString(5, electricMarkerId);
+ }
+
+ String cableName = entity.getCableName();
+ if (cableName != null) {
+ stmt.bindString(6, cableName);
+ }
+
+ String cableNumber = entity.getCableNumber();
+ if (cableNumber != null) {
+ stmt.bindString(7, cableNumber);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String voltageLevel = entity.getVoltageLevel();
+ if (voltageLevel != null) {
+ stmt.bindString(9, voltageLevel);
+ }
+
+ String cableType = entity.getCableType();
+ if (cableType != null) {
+ stmt.bindString(10, cableType);
+ }
+
+ String cableSpec = entity.getCableSpec();
+ if (cableSpec != null) {
+ stmt.bindString(11, cableSpec);
+ }
+
+ String cableBrand = entity.getCableBrand();
+ if (cableBrand != null) {
+ stmt.bindString(12, cableBrand);
+ }
+
+ String cableStart = entity.getCableStart();
+ if (cableStart != null) {
+ stmt.bindString(13, cableStart);
+ }
+
+ String cableEnd = entity.getCableEnd();
+ if (cableEnd != null) {
+ stmt.bindString(14, cableEnd);
+ }
+
+ String hasJoint = entity.getHasJoint();
+ if (hasJoint != null) {
+ stmt.bindString(15, hasJoint);
+ }
+
+ String jointCreator = entity.getJointCreator();
+ if (jointCreator != null) {
+ stmt.bindString(16, jointCreator);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(17, imagePath);
+ }
+
+ String memo1 = entity.getMemo1();
+ if (memo1 != null) {
+ stmt.bindString(18, memo1);
+ }
+
+ String memo2 = entity.getMemo2();
+ if (memo2 != null) {
+ stmt.bindString(19, memo2);
+ }
+
+ String memo3 = entity.getMemo3();
+ if (memo3 != null) {
+ stmt.bindString(20, memo3);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public SmallMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ SmallMarkerLocalBean entity = new SmallMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // locationNumber
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // locationName
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // electricMarkerId
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // cableName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // cableNumber
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // voltageLevel
+ cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // cableType
+ cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // cableSpec
+ cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // cableBrand
+ cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // cableStart
+ cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // cableEnd
+ cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // hasJoint
+ cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // jointCreator
+ cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // imagePath
+ cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // memo1
+ cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // memo2
+ cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19) // memo3
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, SmallMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setMarkerId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setLocationNumber(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setLocationName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setElectricMarkerId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCableName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setCableNumber(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setVoltageLevel(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ entity.setCableType(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
+ entity.setCableSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
+ entity.setCableBrand(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
+ entity.setCableStart(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
+ entity.setCableEnd(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
+ entity.setHasJoint(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
+ entity.setJointCreator(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
+ entity.setImagePath(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
+ entity.setMemo1(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
+ entity.setMemo2(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
+ entity.setMemo3(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(SmallMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(SmallMarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(SmallMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java
deleted file mode 100644
index 802ffb0..0000000
--- a/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java
+++ /dev/null
@@ -1,241 +0,0 @@
-package com.casic.electric.detector.greendao;
-
-import android.database.Cursor;
-import android.database.sqlite.SQLiteStatement;
-
-import com.casic.electric.detector.bean.TaskBean;
-
-import org.greenrobot.greendao.AbstractDao;
-import org.greenrobot.greendao.Property;
-import org.greenrobot.greendao.database.Database;
-import org.greenrobot.greendao.database.DatabaseStatement;
-import org.greenrobot.greendao.internal.DaoConfig;
-
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-/**
- * DAO for table "TASK_BEAN".
-*/
-public class TaskBeanDao extends AbstractDao
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property TaskId = new Property(1, String.class, "taskId", false, "TASK_ID");
- public final static Property TaskCode = new Property(2, String.class, "taskCode", false, "TASK_CODE");
- public final static Property MarkerId = new Property(3, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerRealId = new Property(4, String.class, "markerRealId", false, "MARKER_REAL_ID");
- public final static Property Scanner = new Property(5, String.class, "scanner", false, "SCANNER");
- public final static Property Lng = new Property(6, String.class, "lng", false, "LNG");
- public final static Property Lat = new Property(7, String.class, "lat", false, "LAT");
- public final static Property State = new Property(8, String.class, "state", false, "STATE");
- public final static Property Desc = new Property(9, String.class, "desc", false, "DESC");
- }
-
-
- public TaskBeanDao(DaoConfig config) {
- super(config);
- }
-
- public TaskBeanDao(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 + "\"TASK_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"TASK_ID\" TEXT," + // 1: taskId
- "\"TASK_CODE\" TEXT," + // 2: taskCode
- "\"MARKER_ID\" TEXT," + // 3: markerId
- "\"MARKER_REAL_ID\" TEXT," + // 4: markerRealId
- "\"SCANNER\" TEXT," + // 5: scanner
- "\"LNG\" TEXT," + // 6: lng
- "\"LAT\" TEXT," + // 7: lat
- "\"STATE\" TEXT," + // 8: state
- "\"DESC\" TEXT);"); // 9: desc
- }
-
- /** Drops the underlying database table. */
- public static void dropTable(Database db, boolean ifExists) {
- String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_BEAN\"";
- db.execSQL(sql);
- }
-
- @Override
- protected final void bindValues(DatabaseStatement stmt, TaskBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(2, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(3, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(4, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(5, markerRealId);
- }
-
- String scanner = entity.getScanner();
- if (scanner != null) {
- stmt.bindString(6, scanner);
- }
-
- String lng = entity.getLng();
- if (lng != null) {
- stmt.bindString(7, lng);
- }
-
- String lat = entity.getLat();
- if (lat != null) {
- stmt.bindString(8, lat);
- }
-
- String state = entity.getState();
- if (state != null) {
- stmt.bindString(9, state);
- }
-
- String desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(10, desc);
- }
- }
-
- @Override
- protected final void bindValues(SQLiteStatement stmt, TaskBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(2, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(3, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(4, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(5, markerRealId);
- }
-
- String scanner = entity.getScanner();
- if (scanner != null) {
- stmt.bindString(6, scanner);
- }
-
- String lng = entity.getLng();
- if (lng != null) {
- stmt.bindString(7, lng);
- }
-
- String lat = entity.getLat();
- if (lat != null) {
- stmt.bindString(8, lat);
- }
-
- String state = entity.getState();
- if (state != null) {
- stmt.bindString(9, state);
- }
-
- String desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(10, desc);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public TaskBean readEntity(Cursor cursor, int offset) {
- TaskBean entity = new TaskBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskId
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskCode
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // markerId
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // markerRealId
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // scanner
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // lng
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // lat
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // state
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9) // desc
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, TaskBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setTaskId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setTaskCode(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setMarkerId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setMarkerRealId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setScanner(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setLng(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLat(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setState(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setDesc(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(TaskBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(TaskBean entity) {
- if(entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(TaskBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java
new file mode 100644
index 0000000..330af6b
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java
@@ -0,0 +1,227 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.TaskLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "TASK_LOCAL_BEAN".
+*/
+public class TaskLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskCode = new Property(1, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property Description = new Property(2, String.class, "description", false, "DESCRIPTION");
+ public final static Property CreateTime = new Property(3, String.class, "createTime", false, "CREATE_TIME");
+ public final static Property Status = new Property(4, String.class, "status", false, "STATUS");
+ public final static Property CreateUserName = new Property(5, String.class, "createUserName", false, "CREATE_USER_NAME");
+ public final static Property StartTime = new Property(6, String.class, "startTime", false, "START_TIME");
+ public final static Property EndTime = new Property(7, String.class, "endTime", false, "END_TIME");
+ public final static Property IsFreeTask = new Property(8, String.class, "isFreeTask", false, "IS_FREE_TASK");
+ }
+
+
+ public TaskLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskLocalBeanDao(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 + "\"TASK_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_CODE\" TEXT," + // 1: taskCode
+ "\"DESCRIPTION\" TEXT," + // 2: description
+ "\"CREATE_TIME\" TEXT," + // 3: createTime
+ "\"STATUS\" TEXT," + // 4: status
+ "\"CREATE_USER_NAME\" TEXT," + // 5: createUserName
+ "\"START_TIME\" TEXT," + // 6: startTime
+ "\"END_TIME\" TEXT," + // 7: endTime
+ "\"IS_FREE_TASK\" TEXT);"); // 8: isFreeTask
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+
+ String isFreeTask = entity.getIsFreeTask();
+ if (isFreeTask != null) {
+ stmt.bindString(9, isFreeTask);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+
+ String isFreeTask = entity.getIsFreeTask();
+ if (isFreeTask != null) {
+ stmt.bindString(9, isFreeTask);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskLocalBean readEntity(Cursor cursor, int offset) {
+ TaskLocalBean entity = new TaskLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskCode
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // description
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // createTime
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // status
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // createUserName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // startTime
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // endTime
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8) // isFreeTask
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskCode(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setDescription(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setCreateTime(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setStatus(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCreateUserName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setStartTime(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setEndTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setIsFreeTask(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskMarkerLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskMarkerLocalBeanDao.java
new file mode 100644
index 0000000..344c129
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/TaskMarkerLocalBeanDao.java
@@ -0,0 +1,197 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.TaskMarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "TASK_MARKER_LOCAL_BEAN".
+*/
+public class TaskMarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskId = new Property(1, String.class, "taskId", false, "TASK_ID");
+ public final static Property TaskCode = new Property(2, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property MarkerId = new Property(3, String.class, "markerId", false, "MARKER_ID");
+ public final static Property Lng = new Property(4, double.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(5, double.class, "lat", false, "LAT");
+ public final static Property IsDetected = new Property(6, String.class, "isDetected", false, "IS_DETECTED");
+ public final static Property DetectedTime = new Property(7, String.class, "detectedTime", false, "DETECTED_TIME");
+ }
+
+
+ public TaskMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskMarkerLocalBeanDao(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 + "\"TASK_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_ID\" TEXT," + // 1: taskId
+ "\"TASK_CODE\" TEXT," + // 2: taskCode
+ "\"MARKER_ID\" TEXT," + // 3: markerId
+ "\"LNG\" REAL NOT NULL ," + // 4: lng
+ "\"LAT\" REAL NOT NULL ," + // 5: lat
+ "\"IS_DETECTED\" TEXT," + // 6: isDetected
+ "\"DETECTED_TIME\" TEXT);"); // 7: detectedTime
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ TaskMarkerLocalBean entity = new TaskMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskCode
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // markerId
+ cursor.getDouble(offset + 4), // lng
+ cursor.getDouble(offset + 5), // lat
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // isDetected
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // detectedTime
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setTaskCode(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setMarkerId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setLng(cursor.getDouble(offset + 4));
+ entity.setLat(cursor.getDouble(offset + 5));
+ entity.setIsDetected(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setDetectedTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskMarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/model/TaskDetailLocalModel.java b/app/src/main/java/com/casic/electric/detector/model/TaskDetailLocalModel.java
new file mode 100644
index 0000000..a7c993c
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/model/TaskDetailLocalModel.java
@@ -0,0 +1,147 @@
+package com.casic.electric.detector.model;
+
+import java.util.List;
+
+/**
+ * Task本地库数据模型类,包含Task里面的Marker
+ */
+public class TaskDetailLocalModel {
+ private String taskId;//任务ID
+ private String taskCode;//任务编号
+ private String description;//任务名称
+ private String createTime;//任务创建的时间
+ private String status;//任务状态
+ private String createUserName;//任务创建者名称
+ private String startTime;//任务被开始执行的时间
+ private String endTime;//任务执行结束的时间
+ private String isFreeTask;//是否自由巡检。1-是,0-否
+ private List
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property MarkerObjType = new Property(1, String.class, "markerObjType", false, "MARKER_OBJ_TYPE");
- public final static Property MarkerNumber = new Property(2, String.class, "markerNumber", false, "MARKER_NUMBER");
- public final static Property ObjectName = new Property(3, String.class, "objectName", false, "OBJECT_NAME");
- public final static Property VoltageLevel = new Property(4, String.class, "voltageLevel", false, "VOLTAGE_LEVEL");
- public final static Property TransformerModel = new Property(5, String.class, "transformerModel", false, "TRANSFORMER_MODEL");
- public final static Property HoleCount = new Property(6, String.class, "holeCount", false, "HOLE_COUNT");
- public final static Property Capacity = new Property(7, String.class, "capacity", false, "CAPACITY");
- public final static Property WellCoverMaterial = new Property(8, String.class, "wellCoverMaterial", false, "WELL_COVER_MATERIAL");
- public final static Property CoverDepth = new Property(9, String.class, "coverDepth", false, "COVER_DEPTH");
- public final static Property TransformerSpec = new Property(10, String.class, "transformerSpec", false, "TRANSFORMER_SPEC");
- public final static Property InlineName = new Property(11, String.class, "inlineName", false, "INLINE_NAME");
- public final static Property Size = new Property(12, String.class, "size", false, "SIZE");
- public final static Property BottomDepth = new Property(13, String.class, "bottomDepth", false, "BOTTOM_DEPTH");
- public final static Property Height = new Property(14, String.class, "height", false, "HEIGHT");
- public final static Property CrossPipeLine = new Property(15, String.class, "crossPipeLine", false, "CROSS_PIPE_LINE");
- public final static Property InlineCount = new Property(16, String.class, "inlineCount", false, "INLINE_COUNT");
- public final static Property LineNumber = new Property(17, String.class, "lineNumber", false, "LINE_NUMBER");
- public final static Property JointCount = new Property(18, String.class, "jointCount", false, "JOINT_COUNT");
- public final static Property OutlineCount = new Property(19, String.class, "outlineCount", false, "OUTLINE_COUNT");
- public final static Property RemainingChannels = new Property(20, String.class, "remainingChannels", false, "REMAINING_CHANNELS");
- public final static Property CabinetType = new Property(21, String.class, "cabinetType", false, "CABINET_TYPE");
- public final static Property TieCable1 = new Property(22, String.class, "tieCable1", false, "TIE_CABLE1");
- public final static Property TieCable2 = new Property(23, String.class, "tieCable2", false, "TIE_CABLE2");
- public final static Property CasingMaterial = new Property(24, String.class, "casingMaterial", false, "CASING_MATERIAL");
- public final static Property CasingSpec = new Property(25, String.class, "casingSpec", false, "CASING_SPEC");
- public final static Property ConstructTime = new Property(26, String.class, "constructTime", false, "CONSTRUCT_TIME");
- public final static Property InspectionUnit = new Property(27, String.class, "inspectionUnit", false, "INSPECTION_UNIT");
- public final static Property Area = new Property(28, String.class, "area", false, "AREA");
- public final static Property Road = new Property(29, String.class, "road", false, "ROAD");
- public final static Property Memo1 = new Property(30, String.class, "memo1", false, "MEMO1");
- public final static Property Memo2 = new Property(31, String.class, "memo2", false, "MEMO2");
- public final static Property Memo3 = new Property(32, String.class, "memo3", false, "MEMO3");
- public final static Property MarkerId = new Property(33, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerType = new Property(34, String.class, "markerType", false, "MARKER_TYPE");
- public final static Property Owner = new Property(35, String.class, "owner", false, "OWNER");
- public final static Property MarkerDepth = new Property(36, String.class, "markerDepth", false, "MARKER_DEPTH");
- public final static Property ElectricTagCount = new Property(37, String.class, "electricTagCount", false, "ELECTRIC_TAG_COUNT");
- public final static Property InstalledTime = new Property(38, String.class, "installedTime", false, "INSTALLED_TIME");
- public final static Property Longitude = new Property(39, String.class, "longitude", false, "LONGITUDE");
- public final static Property Latitude = new Property(40, String.class, "latitude", false, "LATITUDE");
- public final static Property MarkerMemo1 = new Property(41, String.class, "markerMemo1", false, "MARKER_MEMO1");
- public final static Property MarkerMemo2 = new Property(42, String.class, "markerMemo2", false, "MARKER_MEMO2");
- public final static Property MarkerMemo3 = new Property(43, String.class, "markerMemo3", false, "MARKER_MEMO3");
- public final static Property ImagePath = new Property(44, String.class, "imagePath", false, "IMAGE_PATH");
- }
-
-
- public LabelBeanDao(DaoConfig config) {
- super(config);
- }
-
- public LabelBeanDao(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 + "\"LABEL_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"MARKER_OBJ_TYPE\" TEXT," + // 1: markerObjType
- "\"MARKER_NUMBER\" TEXT," + // 2: markerNumber
- "\"OBJECT_NAME\" TEXT," + // 3: objectName
- "\"VOLTAGE_LEVEL\" TEXT," + // 4: voltageLevel
- "\"TRANSFORMER_MODEL\" TEXT," + // 5: transformerModel
- "\"HOLE_COUNT\" TEXT," + // 6: holeCount
- "\"CAPACITY\" TEXT," + // 7: capacity
- "\"WELL_COVER_MATERIAL\" TEXT," + // 8: wellCoverMaterial
- "\"COVER_DEPTH\" TEXT," + // 9: coverDepth
- "\"TRANSFORMER_SPEC\" TEXT," + // 10: transformerSpec
- "\"INLINE_NAME\" TEXT," + // 11: inlineName
- "\"SIZE\" TEXT," + // 12: size
- "\"BOTTOM_DEPTH\" TEXT," + // 13: bottomDepth
- "\"HEIGHT\" TEXT," + // 14: height
- "\"CROSS_PIPE_LINE\" TEXT," + // 15: crossPipeLine
- "\"INLINE_COUNT\" TEXT," + // 16: inlineCount
- "\"LINE_NUMBER\" TEXT," + // 17: lineNumber
- "\"JOINT_COUNT\" TEXT," + // 18: jointCount
- "\"OUTLINE_COUNT\" TEXT," + // 19: outlineCount
- "\"REMAINING_CHANNELS\" TEXT," + // 20: remainingChannels
- "\"CABINET_TYPE\" TEXT," + // 21: cabinetType
- "\"TIE_CABLE1\" TEXT," + // 22: tieCable1
- "\"TIE_CABLE2\" TEXT," + // 23: tieCable2
- "\"CASING_MATERIAL\" TEXT," + // 24: casingMaterial
- "\"CASING_SPEC\" TEXT," + // 25: casingSpec
- "\"CONSTRUCT_TIME\" TEXT," + // 26: constructTime
- "\"INSPECTION_UNIT\" TEXT," + // 27: inspectionUnit
- "\"AREA\" TEXT," + // 28: area
- "\"ROAD\" TEXT," + // 29: road
- "\"MEMO1\" TEXT," + // 30: memo1
- "\"MEMO2\" TEXT," + // 31: memo2
- "\"MEMO3\" TEXT," + // 32: memo3
- "\"MARKER_ID\" TEXT," + // 33: markerId
- "\"MARKER_TYPE\" TEXT," + // 34: markerType
- "\"OWNER\" TEXT," + // 35: owner
- "\"MARKER_DEPTH\" TEXT," + // 36: markerDepth
- "\"ELECTRIC_TAG_COUNT\" TEXT," + // 37: electricTagCount
- "\"INSTALLED_TIME\" TEXT," + // 38: installedTime
- "\"LONGITUDE\" TEXT," + // 39: longitude
- "\"LATITUDE\" TEXT," + // 40: latitude
- "\"MARKER_MEMO1\" TEXT," + // 41: markerMemo1
- "\"MARKER_MEMO2\" TEXT," + // 42: markerMemo2
- "\"MARKER_MEMO3\" TEXT," + // 43: markerMemo3
- "\"IMAGE_PATH\" TEXT);"); // 44: imagePath
- }
-
- /** Drops the underlying database table. */
- public static void dropTable(Database db, boolean ifExists) {
- String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"LABEL_BEAN\"";
- db.execSQL(sql);
- }
-
- @Override
- protected final void bindValues(DatabaseStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- protected final void bindValues(SQLiteStatement stmt, LabelBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String markerObjType = entity.getMarkerObjType();
- if (markerObjType != null) {
- stmt.bindString(2, markerObjType);
- }
-
- String markerNumber = entity.getMarkerNumber();
- if (markerNumber != null) {
- stmt.bindString(3, markerNumber);
- }
-
- String objectName = entity.getObjectName();
- if (objectName != null) {
- stmt.bindString(4, objectName);
- }
-
- String voltageLevel = entity.getVoltageLevel();
- if (voltageLevel != null) {
- stmt.bindString(5, voltageLevel);
- }
-
- String transformerModel = entity.getTransformerModel();
- if (transformerModel != null) {
- stmt.bindString(6, transformerModel);
- }
-
- String holeCount = entity.getHoleCount();
- if (holeCount != null) {
- stmt.bindString(7, holeCount);
- }
-
- String capacity = entity.getCapacity();
- if (capacity != null) {
- stmt.bindString(8, capacity);
- }
-
- String wellCoverMaterial = entity.getWellCoverMaterial();
- if (wellCoverMaterial != null) {
- stmt.bindString(9, wellCoverMaterial);
- }
-
- String coverDepth = entity.getCoverDepth();
- if (coverDepth != null) {
- stmt.bindString(10, coverDepth);
- }
-
- String transformerSpec = entity.getTransformerSpec();
- if (transformerSpec != null) {
- stmt.bindString(11, transformerSpec);
- }
-
- String inlineName = entity.getInlineName();
- if (inlineName != null) {
- stmt.bindString(12, inlineName);
- }
-
- String size = entity.getSize();
- if (size != null) {
- stmt.bindString(13, size);
- }
-
- String bottomDepth = entity.getBottomDepth();
- if (bottomDepth != null) {
- stmt.bindString(14, bottomDepth);
- }
-
- String height = entity.getHeight();
- if (height != null) {
- stmt.bindString(15, height);
- }
-
- String crossPipeLine = entity.getCrossPipeLine();
- if (crossPipeLine != null) {
- stmt.bindString(16, crossPipeLine);
- }
-
- String inlineCount = entity.getInlineCount();
- if (inlineCount != null) {
- stmt.bindString(17, inlineCount);
- }
-
- String lineNumber = entity.getLineNumber();
- if (lineNumber != null) {
- stmt.bindString(18, lineNumber);
- }
-
- String jointCount = entity.getJointCount();
- if (jointCount != null) {
- stmt.bindString(19, jointCount);
- }
-
- String outlineCount = entity.getOutlineCount();
- if (outlineCount != null) {
- stmt.bindString(20, outlineCount);
- }
-
- String remainingChannels = entity.getRemainingChannels();
- if (remainingChannels != null) {
- stmt.bindString(21, remainingChannels);
- }
-
- String cabinetType = entity.getCabinetType();
- if (cabinetType != null) {
- stmt.bindString(22, cabinetType);
- }
-
- String tieCable1 = entity.getTieCable1();
- if (tieCable1 != null) {
- stmt.bindString(23, tieCable1);
- }
-
- String tieCable2 = entity.getTieCable2();
- if (tieCable2 != null) {
- stmt.bindString(24, tieCable2);
- }
-
- String casingMaterial = entity.getCasingMaterial();
- if (casingMaterial != null) {
- stmt.bindString(25, casingMaterial);
- }
-
- String casingSpec = entity.getCasingSpec();
- if (casingSpec != null) {
- stmt.bindString(26, casingSpec);
- }
-
- String constructTime = entity.getConstructTime();
- if (constructTime != null) {
- stmt.bindString(27, constructTime);
- }
-
- String inspectionUnit = entity.getInspectionUnit();
- if (inspectionUnit != null) {
- stmt.bindString(28, inspectionUnit);
- }
-
- String area = entity.getArea();
- if (area != null) {
- stmt.bindString(29, area);
- }
-
- String road = entity.getRoad();
- if (road != null) {
- stmt.bindString(30, road);
- }
-
- String memo1 = entity.getMemo1();
- if (memo1 != null) {
- stmt.bindString(31, memo1);
- }
-
- String memo2 = entity.getMemo2();
- if (memo2 != null) {
- stmt.bindString(32, memo2);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(33, memo3);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(34, markerId);
- }
-
- String markerType = entity.getMarkerType();
- if (markerType != null) {
- stmt.bindString(35, markerType);
- }
-
- String owner = entity.getOwner();
- if (owner != null) {
- stmt.bindString(36, owner);
- }
-
- String markerDepth = entity.getMarkerDepth();
- if (markerDepth != null) {
- stmt.bindString(37, markerDepth);
- }
-
- String electricTagCount = entity.getElectricTagCount();
- if (electricTagCount != null) {
- stmt.bindString(38, electricTagCount);
- }
-
- String installedTime = entity.getInstalledTime();
- if (installedTime != null) {
- stmt.bindString(39, installedTime);
- }
-
- String longitude = entity.getLongitude();
- if (longitude != null) {
- stmt.bindString(40, longitude);
- }
-
- String latitude = entity.getLatitude();
- if (latitude != null) {
- stmt.bindString(41, latitude);
- }
-
- String markerMemo1 = entity.getMarkerMemo1();
- if (markerMemo1 != null) {
- stmt.bindString(42, markerMemo1);
- }
-
- String markerMemo2 = entity.getMarkerMemo2();
- if (markerMemo2 != null) {
- stmt.bindString(43, markerMemo2);
- }
-
- String markerMemo3 = entity.getMarkerMemo3();
- if (markerMemo3 != null) {
- stmt.bindString(44, markerMemo3);
- }
-
- String imagePath = entity.getImagePath();
- if (imagePath != null) {
- stmt.bindString(45, imagePath);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public LabelBean readEntity(Cursor cursor, int offset) {
- LabelBean entity = new LabelBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerObjType
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // markerNumber
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // objectName
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // voltageLevel
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // transformerModel
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // holeCount
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // capacity
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // wellCoverMaterial
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // coverDepth
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // transformerSpec
- cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // inlineName
- cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // size
- cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // bottomDepth
- cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // height
- cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // crossPipeLine
- cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // inlineCount
- cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lineNumber
- cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // jointCount
- cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // outlineCount
- cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // remainingChannels
- cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // cabinetType
- cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // tieCable1
- cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // tieCable2
- cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // casingMaterial
- cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // casingSpec
- cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26), // constructTime
- cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27), // inspectionUnit
- cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28), // area
- cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29), // road
- cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30), // memo1
- cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31), // memo2
- cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32), // memo3
- cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33), // markerId
- cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34), // markerType
- cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35), // owner
- cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36), // markerDepth
- cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37), // electricTagCount
- cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38), // installedTime
- cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39), // longitude
- cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40), // latitude
- cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41), // markerMemo1
- cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42), // markerMemo2
- cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43), // markerMemo3
- cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44) // imagePath
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, LabelBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setMarkerObjType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setMarkerNumber(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setObjectName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setVoltageLevel(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setTransformerModel(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setHoleCount(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setCapacity(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setWellCoverMaterial(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setCoverDepth(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- entity.setTransformerSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
- entity.setInlineName(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
- entity.setSize(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
- entity.setBottomDepth(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
- entity.setHeight(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
- entity.setCrossPipeLine(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
- entity.setInlineCount(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
- entity.setLineNumber(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
- entity.setJointCount(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
- entity.setOutlineCount(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
- entity.setRemainingChannels(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
- entity.setCabinetType(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
- entity.setTieCable1(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
- entity.setTieCable2(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
- entity.setCasingMaterial(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
- entity.setCasingSpec(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
- entity.setConstructTime(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
- entity.setInspectionUnit(cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27));
- entity.setArea(cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28));
- entity.setRoad(cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29));
- entity.setMemo1(cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30));
- entity.setMemo2(cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31));
- entity.setMemo3(cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32));
- entity.setMarkerId(cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33));
- entity.setMarkerType(cursor.isNull(offset + 34) ? null : cursor.getString(offset + 34));
- entity.setOwner(cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35));
- entity.setMarkerDepth(cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36));
- entity.setElectricTagCount(cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37));
- entity.setInstalledTime(cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38));
- entity.setLongitude(cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39));
- entity.setLatitude(cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40));
- entity.setMarkerMemo1(cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41));
- entity.setMarkerMemo2(cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42));
- entity.setMarkerMemo3(cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43));
- entity.setImagePath(cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(LabelBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(LabelBean entity) {
- if(entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(LabelBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java
new file mode 100644
index 0000000..9f2afa5
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/MarkerLocalBeanDao.java
@@ -0,0 +1,479 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.MarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "MARKER_LOCAL_BEAN".
+*/
+public class MarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property PipelineType = new Property(1, String.class, "pipelineType", false, "PIPELINE_TYPE");
+ public final static Property PipelineDiameter = new Property(2, String.class, "pipelineDiameter", false, "PIPELINE_DIAMETER");
+ public final static Property PipelineMaterial = new Property(3, String.class, "pipelineMaterial", false, "PIPELINE_MATERIAL");
+ public final static Property BuryMethod = new Property(4, String.class, "buryMethod", false, "BURY_METHOD");
+ public final static Property BuryDepth = new Property(5, String.class, "buryDepth", false, "BURY_DEPTH");
+ public final static Property Area = new Property(6, String.class, "area", false, "AREA");
+ public final static Property Line = new Property(7, String.class, "line", false, "LINE");
+ public final static Property Road = new Property(8, String.class, "road", false, "ROAD");
+ public final static Property ConstructTime = new Property(9, String.class, "constructTime", false, "CONSTRUCT_TIME");
+ public final static Property Owner = new Property(10, String.class, "owner", false, "OWNER");
+ public final static Property ObjectId = new Property(11, String.class, "objectId", false, "OBJECT_ID");
+ public final static Property MarkerId = new Property(12, String.class, "markerId", false, "MARKER_ID");
+ public final static Property MarkerType = new Property(13, String.class, "markerType", false, "MARKER_TYPE");
+ public final static Property MarkerDepth = new Property(14, String.class, "markerDepth", false, "MARKER_DEPTH");
+ public final static Property InstallationDept = new Property(15, String.class, "installationDept", false, "INSTALLATION_DEPT");
+ public final static Property Lng = new Property(16, String.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(17, String.class, "lat", false, "LAT");
+ public final static Property UpdateTime = new Property(18, String.class, "updateTime", false, "UPDATE_TIME");
+ public final static Property Remark = new Property(19, String.class, "remark", false, "REMARK");
+ public final static Property UnderlyingPipelineType = new Property(20, String.class, "underlyingPipelineType", false, "UNDERLYING_PIPELINE_TYPE");
+ public final static Property UnderlyingPipelineDepth = new Property(21, String.class, "underlyingPipelineDepth", false, "UNDERLYING_PIPELINE_DEPTH");
+ public final static Property UnderlyingPipelineDiameter = new Property(22, String.class, "underlyingPipelineDiameter", false, "UNDERLYING_PIPELINE_DIAMETER");
+ public final static Property UnderlyingPipelineMaterial = new Property(23, String.class, "underlyingPipelineMaterial", false, "UNDERLYING_PIPELINE_MATERIAL");
+ public final static Property ObjectType = new Property(24, String.class, "objectType", false, "OBJECT_TYPE");
+ public final static Property Color = new Property(25, String.class, "color", false, "COLOR");
+ public final static Property ImagePath = new Property(26, String.class, "imagePath", false, "IMAGE_PATH");
+ }
+
+
+ public MarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public MarkerLocalBeanDao(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 + "\"MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
+ "\"PIPELINE_TYPE\" TEXT," + // 1: pipelineType
+ "\"PIPELINE_DIAMETER\" TEXT," + // 2: pipelineDiameter
+ "\"PIPELINE_MATERIAL\" TEXT," + // 3: pipelineMaterial
+ "\"BURY_METHOD\" TEXT," + // 4: buryMethod
+ "\"BURY_DEPTH\" TEXT," + // 5: buryDepth
+ "\"AREA\" TEXT," + // 6: area
+ "\"LINE\" TEXT," + // 7: line
+ "\"ROAD\" TEXT," + // 8: road
+ "\"CONSTRUCT_TIME\" TEXT," + // 9: constructTime
+ "\"OWNER\" TEXT," + // 10: owner
+ "\"OBJECT_ID\" TEXT," + // 11: objectId
+ "\"MARKER_ID\" TEXT," + // 12: markerId
+ "\"MARKER_TYPE\" TEXT," + // 13: markerType
+ "\"MARKER_DEPTH\" TEXT," + // 14: markerDepth
+ "\"INSTALLATION_DEPT\" TEXT," + // 15: installationDept
+ "\"LNG\" TEXT," + // 16: lng
+ "\"LAT\" TEXT," + // 17: lat
+ "\"UPDATE_TIME\" TEXT," + // 18: updateTime
+ "\"REMARK\" TEXT," + // 19: remark
+ "\"UNDERLYING_PIPELINE_TYPE\" TEXT," + // 20: underlyingPipelineType
+ "\"UNDERLYING_PIPELINE_DEPTH\" TEXT," + // 21: underlyingPipelineDepth
+ "\"UNDERLYING_PIPELINE_DIAMETER\" TEXT," + // 22: underlyingPipelineDiameter
+ "\"UNDERLYING_PIPELINE_MATERIAL\" TEXT," + // 23: underlyingPipelineMaterial
+ "\"OBJECT_TYPE\" TEXT," + // 24: objectType
+ "\"COLOR\" TEXT," + // 25: color
+ "\"IMAGE_PATH\" TEXT);"); // 26: imagePath
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, MarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String pipelineType = entity.getPipelineType();
+ if (pipelineType != null) {
+ stmt.bindString(2, pipelineType);
+ }
+
+ String pipelineDiameter = entity.getPipelineDiameter();
+ if (pipelineDiameter != null) {
+ stmt.bindString(3, pipelineDiameter);
+ }
+
+ String pipelineMaterial = entity.getPipelineMaterial();
+ if (pipelineMaterial != null) {
+ stmt.bindString(4, pipelineMaterial);
+ }
+
+ String buryMethod = entity.getBuryMethod();
+ if (buryMethod != null) {
+ stmt.bindString(5, buryMethod);
+ }
+
+ String buryDepth = entity.getBuryDepth();
+ if (buryDepth != null) {
+ stmt.bindString(6, buryDepth);
+ }
+
+ String area = entity.getArea();
+ if (area != null) {
+ stmt.bindString(7, area);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String road = entity.getRoad();
+ if (road != null) {
+ stmt.bindString(9, road);
+ }
+
+ String constructTime = entity.getConstructTime();
+ if (constructTime != null) {
+ stmt.bindString(10, constructTime);
+ }
+
+ String owner = entity.getOwner();
+ if (owner != null) {
+ stmt.bindString(11, owner);
+ }
+
+ String objectId = entity.getObjectId();
+ if (objectId != null) {
+ stmt.bindString(12, objectId);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(13, markerId);
+ }
+
+ String markerType = entity.getMarkerType();
+ if (markerType != null) {
+ stmt.bindString(14, markerType);
+ }
+
+ String markerDepth = entity.getMarkerDepth();
+ if (markerDepth != null) {
+ stmt.bindString(15, markerDepth);
+ }
+
+ String installationDept = entity.getInstallationDept();
+ if (installationDept != null) {
+ stmt.bindString(16, installationDept);
+ }
+
+ String lng = entity.getLng();
+ if (lng != null) {
+ stmt.bindString(17, lng);
+ }
+
+ String lat = entity.getLat();
+ if (lat != null) {
+ stmt.bindString(18, lat);
+ }
+
+ String updateTime = entity.getUpdateTime();
+ if (updateTime != null) {
+ stmt.bindString(19, updateTime);
+ }
+
+ String remark = entity.getRemark();
+ if (remark != null) {
+ stmt.bindString(20, remark);
+ }
+
+ String underlyingPipelineType = entity.getUnderlyingPipelineType();
+ if (underlyingPipelineType != null) {
+ stmt.bindString(21, underlyingPipelineType);
+ }
+
+ String underlyingPipelineDepth = entity.getUnderlyingPipelineDepth();
+ if (underlyingPipelineDepth != null) {
+ stmt.bindString(22, underlyingPipelineDepth);
+ }
+
+ String underlyingPipelineDiameter = entity.getUnderlyingPipelineDiameter();
+ if (underlyingPipelineDiameter != null) {
+ stmt.bindString(23, underlyingPipelineDiameter);
+ }
+
+ String underlyingPipelineMaterial = entity.getUnderlyingPipelineMaterial();
+ if (underlyingPipelineMaterial != null) {
+ stmt.bindString(24, underlyingPipelineMaterial);
+ }
+
+ String objectType = entity.getObjectType();
+ if (objectType != null) {
+ stmt.bindString(25, objectType);
+ }
+
+ String color = entity.getColor();
+ if (color != null) {
+ stmt.bindString(26, color);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(27, imagePath);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, MarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String pipelineType = entity.getPipelineType();
+ if (pipelineType != null) {
+ stmt.bindString(2, pipelineType);
+ }
+
+ String pipelineDiameter = entity.getPipelineDiameter();
+ if (pipelineDiameter != null) {
+ stmt.bindString(3, pipelineDiameter);
+ }
+
+ String pipelineMaterial = entity.getPipelineMaterial();
+ if (pipelineMaterial != null) {
+ stmt.bindString(4, pipelineMaterial);
+ }
+
+ String buryMethod = entity.getBuryMethod();
+ if (buryMethod != null) {
+ stmt.bindString(5, buryMethod);
+ }
+
+ String buryDepth = entity.getBuryDepth();
+ if (buryDepth != null) {
+ stmt.bindString(6, buryDepth);
+ }
+
+ String area = entity.getArea();
+ if (area != null) {
+ stmt.bindString(7, area);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String road = entity.getRoad();
+ if (road != null) {
+ stmt.bindString(9, road);
+ }
+
+ String constructTime = entity.getConstructTime();
+ if (constructTime != null) {
+ stmt.bindString(10, constructTime);
+ }
+
+ String owner = entity.getOwner();
+ if (owner != null) {
+ stmt.bindString(11, owner);
+ }
+
+ String objectId = entity.getObjectId();
+ if (objectId != null) {
+ stmt.bindString(12, objectId);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(13, markerId);
+ }
+
+ String markerType = entity.getMarkerType();
+ if (markerType != null) {
+ stmt.bindString(14, markerType);
+ }
+
+ String markerDepth = entity.getMarkerDepth();
+ if (markerDepth != null) {
+ stmt.bindString(15, markerDepth);
+ }
+
+ String installationDept = entity.getInstallationDept();
+ if (installationDept != null) {
+ stmt.bindString(16, installationDept);
+ }
+
+ String lng = entity.getLng();
+ if (lng != null) {
+ stmt.bindString(17, lng);
+ }
+
+ String lat = entity.getLat();
+ if (lat != null) {
+ stmt.bindString(18, lat);
+ }
+
+ String updateTime = entity.getUpdateTime();
+ if (updateTime != null) {
+ stmt.bindString(19, updateTime);
+ }
+
+ String remark = entity.getRemark();
+ if (remark != null) {
+ stmt.bindString(20, remark);
+ }
+
+ String underlyingPipelineType = entity.getUnderlyingPipelineType();
+ if (underlyingPipelineType != null) {
+ stmt.bindString(21, underlyingPipelineType);
+ }
+
+ String underlyingPipelineDepth = entity.getUnderlyingPipelineDepth();
+ if (underlyingPipelineDepth != null) {
+ stmt.bindString(22, underlyingPipelineDepth);
+ }
+
+ String underlyingPipelineDiameter = entity.getUnderlyingPipelineDiameter();
+ if (underlyingPipelineDiameter != null) {
+ stmt.bindString(23, underlyingPipelineDiameter);
+ }
+
+ String underlyingPipelineMaterial = entity.getUnderlyingPipelineMaterial();
+ if (underlyingPipelineMaterial != null) {
+ stmt.bindString(24, underlyingPipelineMaterial);
+ }
+
+ String objectType = entity.getObjectType();
+ if (objectType != null) {
+ stmt.bindString(25, objectType);
+ }
+
+ String color = entity.getColor();
+ if (color != null) {
+ stmt.bindString(26, color);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(27, imagePath);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public MarkerLocalBean readEntity(Cursor cursor, int offset) {
+ MarkerLocalBean entity = new MarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // pipelineType
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // pipelineDiameter
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // pipelineMaterial
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // buryMethod
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // buryDepth
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // area
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // road
+ cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // constructTime
+ cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // owner
+ cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // objectId
+ cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // markerId
+ cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // markerType
+ cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // markerDepth
+ cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // installationDept
+ cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // lng
+ cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lat
+ cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // updateTime
+ cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // remark
+ cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // underlyingPipelineType
+ cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // underlyingPipelineDepth
+ cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // underlyingPipelineDiameter
+ cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // underlyingPipelineMaterial
+ cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // objectType
+ cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // color
+ cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26) // imagePath
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, MarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setPipelineType(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setPipelineDiameter(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setPipelineMaterial(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setBuryMethod(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setBuryDepth(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setArea(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setRoad(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ entity.setConstructTime(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
+ entity.setOwner(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
+ entity.setObjectId(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
+ entity.setMarkerId(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
+ entity.setMarkerType(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
+ entity.setMarkerDepth(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
+ entity.setInstallationDept(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
+ entity.setLng(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
+ entity.setLat(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
+ entity.setUpdateTime(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
+ entity.setRemark(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
+ entity.setUnderlyingPipelineType(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
+ entity.setUnderlyingPipelineDepth(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
+ entity.setUnderlyingPipelineDiameter(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
+ entity.setUnderlyingPipelineMaterial(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
+ entity.setObjectType(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
+ entity.setColor(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
+ entity.setImagePath(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(MarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(MarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(MarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
index 18b1b7b..9d99b8d 100644
--- a/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
+++ b/app/src/main/java/com/casic/electric/detector/greendao/SmallLabelBeanDao.java
@@ -3,7 +3,7 @@
import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;
-import com.casic.electric.detector.bean.SmallLabelBean;
+import com.casic.electric.detector.bean.SmallMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.Property;
@@ -12,10 +12,11 @@
import org.greenrobot.greendao.internal.DaoConfig;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-/**
+
+/**
* DAO for table "SMALL_LABEL_BEAN".
-*/
-public class SmallLabelBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property MarkerId = new Property(1, String.class, "markerId", false, "MARKER_ID");
+ public final static Property LocationNumber = new Property(2, String.class, "locationNumber", false, "LOCATION_NUMBER");
+ public final static Property LocationName = new Property(3, String.class, "locationName", false, "LOCATION_NAME");
+ public final static Property ElectricMarkerId = new Property(4, String.class, "electricMarkerId", false, "ELECTRIC_MARKER_ID");
+ public final static Property CableName = new Property(5, String.class, "cableName", false, "CABLE_NAME");
+ public final static Property CableNumber = new Property(6, String.class, "cableNumber", false, "CABLE_NUMBER");
+ public final static Property Line = new Property(7, String.class, "line", false, "LINE");
+ public final static Property VoltageLevel = new Property(8, String.class, "voltageLevel", false, "VOLTAGE_LEVEL");
+ public final static Property CableType = new Property(9, String.class, "cableType", false, "CABLE_TYPE");
+ public final static Property CableSpec = new Property(10, String.class, "cableSpec", false, "CABLE_SPEC");
+ public final static Property CableBrand = new Property(11, String.class, "cableBrand", false, "CABLE_BRAND");
+ public final static Property CableStart = new Property(12, String.class, "cableStart", false, "CABLE_START");
+ public final static Property CableEnd = new Property(13, String.class, "cableEnd", false, "CABLE_END");
+ public final static Property HasJoint = new Property(14, String.class, "hasJoint", false, "HAS_JOINT");
+ public final static Property JointCreator = new Property(15, String.class, "jointCreator", false, "JOINT_CREATOR");
+ public final static Property ImagePath = new Property(16, String.class, "imagePath", false, "IMAGE_PATH");
+ public final static Property Memo1 = new Property(17, String.class, "memo1", false, "MEMO1");
+ public final static Property Memo2 = new Property(18, String.class, "memo2", false, "MEMO2");
+ public final static Property Memo3 = new Property(19, String.class, "memo3", false, "MEMO3");
+ }
+
+
+ public SmallMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public SmallMarkerLocalBeanDao(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 + "\"SMALL_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
+ "\"MARKER_ID\" TEXT," + // 1: markerId
+ "\"LOCATION_NUMBER\" TEXT," + // 2: locationNumber
+ "\"LOCATION_NAME\" TEXT," + // 3: locationName
+ "\"ELECTRIC_MARKER_ID\" TEXT," + // 4: electricMarkerId
+ "\"CABLE_NAME\" TEXT," + // 5: cableName
+ "\"CABLE_NUMBER\" TEXT," + // 6: cableNumber
+ "\"LINE\" TEXT," + // 7: line
+ "\"VOLTAGE_LEVEL\" TEXT," + // 8: voltageLevel
+ "\"CABLE_TYPE\" TEXT," + // 9: cableType
+ "\"CABLE_SPEC\" TEXT," + // 10: cableSpec
+ "\"CABLE_BRAND\" TEXT," + // 11: cableBrand
+ "\"CABLE_START\" TEXT," + // 12: cableStart
+ "\"CABLE_END\" TEXT," + // 13: cableEnd
+ "\"HAS_JOINT\" TEXT," + // 14: hasJoint
+ "\"JOINT_CREATOR\" TEXT," + // 15: jointCreator
+ "\"IMAGE_PATH\" TEXT," + // 16: imagePath
+ "\"MEMO1\" TEXT," + // 17: memo1
+ "\"MEMO2\" TEXT," + // 18: memo2
+ "\"MEMO3\" TEXT);"); // 19: memo3
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"SMALL_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, SmallMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(2, markerId);
+ }
+
+ String locationNumber = entity.getLocationNumber();
+ if (locationNumber != null) {
+ stmt.bindString(3, locationNumber);
+ }
+
+ String locationName = entity.getLocationName();
+ if (locationName != null) {
+ stmt.bindString(4, locationName);
+ }
+
+ String electricMarkerId = entity.getElectricMarkerId();
+ if (electricMarkerId != null) {
+ stmt.bindString(5, electricMarkerId);
+ }
+
+ String cableName = entity.getCableName();
+ if (cableName != null) {
+ stmt.bindString(6, cableName);
+ }
+
+ String cableNumber = entity.getCableNumber();
+ if (cableNumber != null) {
+ stmt.bindString(7, cableNumber);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String voltageLevel = entity.getVoltageLevel();
+ if (voltageLevel != null) {
+ stmt.bindString(9, voltageLevel);
+ }
+
+ String cableType = entity.getCableType();
+ if (cableType != null) {
+ stmt.bindString(10, cableType);
+ }
+
+ String cableSpec = entity.getCableSpec();
+ if (cableSpec != null) {
+ stmt.bindString(11, cableSpec);
+ }
+
+ String cableBrand = entity.getCableBrand();
+ if (cableBrand != null) {
+ stmt.bindString(12, cableBrand);
+ }
+
+ String cableStart = entity.getCableStart();
+ if (cableStart != null) {
+ stmt.bindString(13, cableStart);
+ }
+
+ String cableEnd = entity.getCableEnd();
+ if (cableEnd != null) {
+ stmt.bindString(14, cableEnd);
+ }
+
+ String hasJoint = entity.getHasJoint();
+ if (hasJoint != null) {
+ stmt.bindString(15, hasJoint);
+ }
+
+ String jointCreator = entity.getJointCreator();
+ if (jointCreator != null) {
+ stmt.bindString(16, jointCreator);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(17, imagePath);
+ }
+
+ String memo1 = entity.getMemo1();
+ if (memo1 != null) {
+ stmt.bindString(18, memo1);
+ }
+
+ String memo2 = entity.getMemo2();
+ if (memo2 != null) {
+ stmt.bindString(19, memo2);
+ }
+
+ String memo3 = entity.getMemo3();
+ if (memo3 != null) {
+ stmt.bindString(20, memo3);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, SmallMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(2, markerId);
+ }
+
+ String locationNumber = entity.getLocationNumber();
+ if (locationNumber != null) {
+ stmt.bindString(3, locationNumber);
+ }
+
+ String locationName = entity.getLocationName();
+ if (locationName != null) {
+ stmt.bindString(4, locationName);
+ }
+
+ String electricMarkerId = entity.getElectricMarkerId();
+ if (electricMarkerId != null) {
+ stmt.bindString(5, electricMarkerId);
+ }
+
+ String cableName = entity.getCableName();
+ if (cableName != null) {
+ stmt.bindString(6, cableName);
+ }
+
+ String cableNumber = entity.getCableNumber();
+ if (cableNumber != null) {
+ stmt.bindString(7, cableNumber);
+ }
+
+ String line = entity.getLine();
+ if (line != null) {
+ stmt.bindString(8, line);
+ }
+
+ String voltageLevel = entity.getVoltageLevel();
+ if (voltageLevel != null) {
+ stmt.bindString(9, voltageLevel);
+ }
+
+ String cableType = entity.getCableType();
+ if (cableType != null) {
+ stmt.bindString(10, cableType);
+ }
+
+ String cableSpec = entity.getCableSpec();
+ if (cableSpec != null) {
+ stmt.bindString(11, cableSpec);
+ }
+
+ String cableBrand = entity.getCableBrand();
+ if (cableBrand != null) {
+ stmt.bindString(12, cableBrand);
+ }
+
+ String cableStart = entity.getCableStart();
+ if (cableStart != null) {
+ stmt.bindString(13, cableStart);
+ }
+
+ String cableEnd = entity.getCableEnd();
+ if (cableEnd != null) {
+ stmt.bindString(14, cableEnd);
+ }
+
+ String hasJoint = entity.getHasJoint();
+ if (hasJoint != null) {
+ stmt.bindString(15, hasJoint);
+ }
+
+ String jointCreator = entity.getJointCreator();
+ if (jointCreator != null) {
+ stmt.bindString(16, jointCreator);
+ }
+
+ String imagePath = entity.getImagePath();
+ if (imagePath != null) {
+ stmt.bindString(17, imagePath);
+ }
+
+ String memo1 = entity.getMemo1();
+ if (memo1 != null) {
+ stmt.bindString(18, memo1);
+ }
+
+ String memo2 = entity.getMemo2();
+ if (memo2 != null) {
+ stmt.bindString(19, memo2);
+ }
+
+ String memo3 = entity.getMemo3();
+ if (memo3 != null) {
+ stmt.bindString(20, memo3);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public SmallMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ SmallMarkerLocalBean entity = new SmallMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // locationNumber
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // locationName
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // electricMarkerId
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // cableName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // cableNumber
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // voltageLevel
+ cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // cableType
+ cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // cableSpec
+ cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // cableBrand
+ cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // cableStart
+ cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // cableEnd
+ cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // hasJoint
+ cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // jointCreator
+ cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // imagePath
+ cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // memo1
+ cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // memo2
+ cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19) // memo3
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, SmallMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setMarkerId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setLocationNumber(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setLocationName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setElectricMarkerId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCableName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setCableNumber(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setVoltageLevel(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ entity.setCableType(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
+ entity.setCableSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
+ entity.setCableBrand(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
+ entity.setCableStart(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
+ entity.setCableEnd(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
+ entity.setHasJoint(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
+ entity.setJointCreator(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
+ entity.setImagePath(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
+ entity.setMemo1(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
+ entity.setMemo2(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
+ entity.setMemo3(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(SmallMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(SmallMarkerLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(SmallMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java
deleted file mode 100644
index 802ffb0..0000000
--- a/app/src/main/java/com/casic/electric/detector/greendao/TaskBeanDao.java
+++ /dev/null
@@ -1,241 +0,0 @@
-package com.casic.electric.detector.greendao;
-
-import android.database.Cursor;
-import android.database.sqlite.SQLiteStatement;
-
-import com.casic.electric.detector.bean.TaskBean;
-
-import org.greenrobot.greendao.AbstractDao;
-import org.greenrobot.greendao.Property;
-import org.greenrobot.greendao.database.Database;
-import org.greenrobot.greendao.database.DatabaseStatement;
-import org.greenrobot.greendao.internal.DaoConfig;
-
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-/**
- * DAO for table "TASK_BEAN".
-*/
-public class TaskBeanDao extends AbstractDao
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property TaskId = new Property(1, String.class, "taskId", false, "TASK_ID");
- public final static Property TaskCode = new Property(2, String.class, "taskCode", false, "TASK_CODE");
- public final static Property MarkerId = new Property(3, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerRealId = new Property(4, String.class, "markerRealId", false, "MARKER_REAL_ID");
- public final static Property Scanner = new Property(5, String.class, "scanner", false, "SCANNER");
- public final static Property Lng = new Property(6, String.class, "lng", false, "LNG");
- public final static Property Lat = new Property(7, String.class, "lat", false, "LAT");
- public final static Property State = new Property(8, String.class, "state", false, "STATE");
- public final static Property Desc = new Property(9, String.class, "desc", false, "DESC");
- }
-
-
- public TaskBeanDao(DaoConfig config) {
- super(config);
- }
-
- public TaskBeanDao(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 + "\"TASK_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"TASK_ID\" TEXT," + // 1: taskId
- "\"TASK_CODE\" TEXT," + // 2: taskCode
- "\"MARKER_ID\" TEXT," + // 3: markerId
- "\"MARKER_REAL_ID\" TEXT," + // 4: markerRealId
- "\"SCANNER\" TEXT," + // 5: scanner
- "\"LNG\" TEXT," + // 6: lng
- "\"LAT\" TEXT," + // 7: lat
- "\"STATE\" TEXT," + // 8: state
- "\"DESC\" TEXT);"); // 9: desc
- }
-
- /** Drops the underlying database table. */
- public static void dropTable(Database db, boolean ifExists) {
- String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_BEAN\"";
- db.execSQL(sql);
- }
-
- @Override
- protected final void bindValues(DatabaseStatement stmt, TaskBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(2, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(3, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(4, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(5, markerRealId);
- }
-
- String scanner = entity.getScanner();
- if (scanner != null) {
- stmt.bindString(6, scanner);
- }
-
- String lng = entity.getLng();
- if (lng != null) {
- stmt.bindString(7, lng);
- }
-
- String lat = entity.getLat();
- if (lat != null) {
- stmt.bindString(8, lat);
- }
-
- String state = entity.getState();
- if (state != null) {
- stmt.bindString(9, state);
- }
-
- String desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(10, desc);
- }
- }
-
- @Override
- protected final void bindValues(SQLiteStatement stmt, TaskBean entity) {
- stmt.clearBindings();
-
- Long id = entity.getId();
- if (id != null) {
- stmt.bindLong(1, id);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(2, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(3, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(4, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(5, markerRealId);
- }
-
- String scanner = entity.getScanner();
- if (scanner != null) {
- stmt.bindString(6, scanner);
- }
-
- String lng = entity.getLng();
- if (lng != null) {
- stmt.bindString(7, lng);
- }
-
- String lat = entity.getLat();
- if (lat != null) {
- stmt.bindString(8, lat);
- }
-
- String state = entity.getState();
- if (state != null) {
- stmt.bindString(9, state);
- }
-
- String desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(10, desc);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public TaskBean readEntity(Cursor cursor, int offset) {
- TaskBean entity = new TaskBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskId
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskCode
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // markerId
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // markerRealId
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // scanner
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // lng
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // lat
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // state
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9) // desc
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, TaskBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setTaskId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setTaskCode(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setMarkerId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setMarkerRealId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setScanner(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setLng(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLat(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setState(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setDesc(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(TaskBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(TaskBean entity) {
- if(entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(TaskBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java
new file mode 100644
index 0000000..330af6b
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/TaskLocalBeanDao.java
@@ -0,0 +1,227 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.TaskLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "TASK_LOCAL_BEAN".
+*/
+public class TaskLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskCode = new Property(1, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property Description = new Property(2, String.class, "description", false, "DESCRIPTION");
+ public final static Property CreateTime = new Property(3, String.class, "createTime", false, "CREATE_TIME");
+ public final static Property Status = new Property(4, String.class, "status", false, "STATUS");
+ public final static Property CreateUserName = new Property(5, String.class, "createUserName", false, "CREATE_USER_NAME");
+ public final static Property StartTime = new Property(6, String.class, "startTime", false, "START_TIME");
+ public final static Property EndTime = new Property(7, String.class, "endTime", false, "END_TIME");
+ public final static Property IsFreeTask = new Property(8, String.class, "isFreeTask", false, "IS_FREE_TASK");
+ }
+
+
+ public TaskLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskLocalBeanDao(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 + "\"TASK_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_CODE\" TEXT," + // 1: taskCode
+ "\"DESCRIPTION\" TEXT," + // 2: description
+ "\"CREATE_TIME\" TEXT," + // 3: createTime
+ "\"STATUS\" TEXT," + // 4: status
+ "\"CREATE_USER_NAME\" TEXT," + // 5: createUserName
+ "\"START_TIME\" TEXT," + // 6: startTime
+ "\"END_TIME\" TEXT," + // 7: endTime
+ "\"IS_FREE_TASK\" TEXT);"); // 8: isFreeTask
+ }
+
+ /** Drops the underlying database table. */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+
+ String isFreeTask = entity.getIsFreeTask();
+ if (isFreeTask != null) {
+ stmt.bindString(9, isFreeTask);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+
+ String isFreeTask = entity.getIsFreeTask();
+ if (isFreeTask != null) {
+ stmt.bindString(9, isFreeTask);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskLocalBean readEntity(Cursor cursor, int offset) {
+ TaskLocalBean entity = new TaskLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskCode
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // description
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // createTime
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // status
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // createUserName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // startTime
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // endTime
+ cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8) // isFreeTask
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskCode(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setDescription(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setCreateTime(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setStatus(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCreateUserName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setStartTime(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setEndTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ entity.setIsFreeTask(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskLocalBean entity) {
+ if(entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/electric/detector/greendao/TaskMarkerLocalBeanDao.java b/app/src/main/java/com/casic/electric/detector/greendao/TaskMarkerLocalBeanDao.java
new file mode 100644
index 0000000..344c129
--- /dev/null
+++ b/app/src/main/java/com/casic/electric/detector/greendao/TaskMarkerLocalBeanDao.java
@@ -0,0 +1,197 @@
+package com.casic.electric.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.electric.detector.bean.TaskMarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+/**
+ * DAO for table "TASK_MARKER_LOCAL_BEAN".
+*/
+public class TaskMarkerLocalBeanDao extends AbstractDao