Commit 57feb23c25d06fbab8f4444b7db24b4611ce48a0

Authored by 韩亚云
1 parent 2a122520

轨迹列表接口修改

config.gradle
... ... @@ -21,7 +21,7 @@ ext {
21 21 //编译方式
22 22 debug : false,
23 23 //版本号
24   - version: "0.2.5",
  24 + version: "0.2.6",
25 25 //Lib库前缀
26 26 packeg : "com.cnlive.module",
27 27 //Lib库名称
... ...
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/sql/dao/CollFailedEntityDao.java 0 → 100644
  1 +package com.cnlive.moudle.pedometer.sql.dao;
  2 +
  3 +import android.database.Cursor;
  4 +import android.database.sqlite.SQLiteStatement;
  5 +
  6 +import org.greenrobot.greendao.AbstractDao;
  7 +import org.greenrobot.greendao.Property;
  8 +import org.greenrobot.greendao.internal.DaoConfig;
  9 +import org.greenrobot.greendao.database.Database;
  10 +import org.greenrobot.greendao.database.DatabaseStatement;
  11 +
  12 +import com.cnlive.moudle.pedometer.sql.entity.CollFailedEntity;
  13 +
  14 +// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
  15 +/**
  16 + * DAO for table "COLL_FAILED_ENTITY".
  17 +*/
  18 +public class CollFailedEntityDao extends AbstractDao<CollFailedEntity, String> {
  19 +
  20 + public static final String TABLENAME = "COLL_FAILED_ENTITY";
  21 +
  22 + /**
  23 + * Properties of entity CollFailedEntity.<br/>
  24 + * Can be used for QueryBuilder and for referencing column names.
  25 + */
  26 + public static class Properties {
  27 + public final static Property Uuid = new Property(0, String.class, "uuid", true, "UUID");
  28 + public final static Property Uid = new Property(1, String.class, "uid", false, "UID");
  29 + public final static Property IsPause = new Property(2, boolean.class, "isPause", false, "IS_PAUSE");
  30 + public final static Property UserPauseTime = new Property(3, long.class, "userPauseTime", false, "USER_PAUSE_TIME");
  31 + public final static Property UsrContinueTime = new Property(4, long.class, "usrContinueTime", false, "USR_CONTINUE_TIME");
  32 + public final static Property IsFinish = new Property(5, String.class, "isFinish", false, "IS_FINISH");
  33 + public final static Property Time = new Property(6, String.class, "time", false, "TIME");
  34 + public final static Property Speed = new Property(7, String.class, "speed", false, "SPEED");
  35 + public final static Property Step = new Property(8, String.class, "step", false, "STEP");
  36 + public final static Property Distance = new Property(9, String.class, "distance", false, "DISTANCE");
  37 + public final static Property StartPoint = new Property(10, String.class, "startPoint", false, "START_POINT");
  38 + public final static Property EndPoint = new Property(11, String.class, "endPoint", false, "END_POINT");
  39 + public final static Property StreetTraceStartTime = new Property(12, long.class, "streetTraceStartTime", false, "STREET_TRACE_START_TIME");
  40 + public final static Property StreetTraceEndTime = new Property(13, long.class, "streetTraceEndTime", false, "STREET_TRACE_END_TIME");
  41 + public final static Property EntityName = new Property(14, String.class, "entityName", false, "ENTITY_NAME");
  42 + public final static Property UserStartTime = new Property(15, long.class, "userStartTime", false, "USER_START_TIME");
  43 + public final static Property UserEndTime = new Property(16, long.class, "userEndTime", false, "USER_END_TIME");
  44 + public final static Property ImportPoint = new Property(17, String.class, "importPoint", false, "IMPORT_POINT");
  45 + public final static Property StreetId = new Property(18, String.class, "streetId", false, "STREET_ID");
  46 + public final static Property StreetTitle = new Property(19, String.class, "streetTitle", false, "STREET_TITLE");
  47 + public final static Property CreatTimeStamp = new Property(20, long.class, "creatTimeStamp", false, "CREAT_TIME_STAMP");
  48 + public final static Property IsArriveEndPoint = new Property(21, boolean.class, "isArriveEndPoint", false, "IS_ARRIVE_END_POINT");
  49 + }
  50 +
  51 +
  52 + public CollFailedEntityDao(DaoConfig config) {
  53 + super(config);
  54 + }
  55 +
  56 + public CollFailedEntityDao(DaoConfig config, DaoSession daoSession) {
  57 + super(config, daoSession);
  58 + }
  59 +
  60 + /** Creates the underlying database table. */
  61 + public static void createTable(Database db, boolean ifNotExists) {
  62 + String constraint = ifNotExists? "IF NOT EXISTS ": "";
  63 + db.execSQL("CREATE TABLE " + constraint + "\"COLL_FAILED_ENTITY\" (" + //
  64 + "\"UUID\" TEXT PRIMARY KEY NOT NULL ," + // 0: uuid
  65 + "\"UID\" TEXT," + // 1: uid
  66 + "\"IS_PAUSE\" INTEGER NOT NULL ," + // 2: isPause
  67 + "\"USER_PAUSE_TIME\" INTEGER NOT NULL ," + // 3: userPauseTime
  68 + "\"USR_CONTINUE_TIME\" INTEGER NOT NULL ," + // 4: usrContinueTime
  69 + "\"IS_FINISH\" TEXT," + // 5: isFinish
  70 + "\"TIME\" TEXT," + // 6: time
  71 + "\"SPEED\" TEXT," + // 7: speed
  72 + "\"STEP\" TEXT," + // 8: step
  73 + "\"DISTANCE\" TEXT," + // 9: distance
  74 + "\"START_POINT\" TEXT," + // 10: startPoint
  75 + "\"END_POINT\" TEXT," + // 11: endPoint
  76 + "\"STREET_TRACE_START_TIME\" INTEGER NOT NULL ," + // 12: streetTraceStartTime
  77 + "\"STREET_TRACE_END_TIME\" INTEGER NOT NULL ," + // 13: streetTraceEndTime
  78 + "\"ENTITY_NAME\" TEXT," + // 14: entityName
  79 + "\"USER_START_TIME\" INTEGER NOT NULL ," + // 15: userStartTime
  80 + "\"USER_END_TIME\" INTEGER NOT NULL ," + // 16: userEndTime
  81 + "\"IMPORT_POINT\" TEXT," + // 17: importPoint
  82 + "\"STREET_ID\" TEXT," + // 18: streetId
  83 + "\"STREET_TITLE\" TEXT," + // 19: streetTitle
  84 + "\"CREAT_TIME_STAMP\" INTEGER NOT NULL ," + // 20: creatTimeStamp
  85 + "\"IS_ARRIVE_END_POINT\" INTEGER NOT NULL );"); // 21: isArriveEndPoint
  86 + }
  87 +
  88 + /** Drops the underlying database table. */
  89 + public static void dropTable(Database db, boolean ifExists) {
  90 + String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"COLL_FAILED_ENTITY\"";
  91 + db.execSQL(sql);
  92 + }
  93 +
  94 + @Override
  95 + protected final void bindValues(DatabaseStatement stmt, CollFailedEntity entity) {
  96 + stmt.clearBindings();
  97 +
  98 + String uuid = entity.getUuid();
  99 + if (uuid != null) {
  100 + stmt.bindString(1, uuid);
  101 + }
  102 +
  103 + String uid = entity.getUid();
  104 + if (uid != null) {
  105 + stmt.bindString(2, uid);
  106 + }
  107 + stmt.bindLong(3, entity.getIsPause() ? 1L: 0L);
  108 + stmt.bindLong(4, entity.getUserPauseTime());
  109 + stmt.bindLong(5, entity.getUsrContinueTime());
  110 +
  111 + String isFinish = entity.getIsFinish();
  112 + if (isFinish != null) {
  113 + stmt.bindString(6, isFinish);
  114 + }
  115 +
  116 + String time = entity.getTime();
  117 + if (time != null) {
  118 + stmt.bindString(7, time);
  119 + }
  120 +
  121 + String speed = entity.getSpeed();
  122 + if (speed != null) {
  123 + stmt.bindString(8, speed);
  124 + }
  125 +
  126 + String step = entity.getStep();
  127 + if (step != null) {
  128 + stmt.bindString(9, step);
  129 + }
  130 +
  131 + String distance = entity.getDistance();
  132 + if (distance != null) {
  133 + stmt.bindString(10, distance);
  134 + }
  135 +
  136 + String startPoint = entity.getStartPoint();
  137 + if (startPoint != null) {
  138 + stmt.bindString(11, startPoint);
  139 + }
  140 +
  141 + String endPoint = entity.getEndPoint();
  142 + if (endPoint != null) {
  143 + stmt.bindString(12, endPoint);
  144 + }
  145 + stmt.bindLong(13, entity.getStreetTraceStartTime());
  146 + stmt.bindLong(14, entity.getStreetTraceEndTime());
  147 +
  148 + String entityName = entity.getEntityName();
  149 + if (entityName != null) {
  150 + stmt.bindString(15, entityName);
  151 + }
  152 + stmt.bindLong(16, entity.getUserStartTime());
  153 + stmt.bindLong(17, entity.getUserEndTime());
  154 +
  155 + String importPoint = entity.getImportPoint();
  156 + if (importPoint != null) {
  157 + stmt.bindString(18, importPoint);
  158 + }
  159 +
  160 + String streetId = entity.getStreetId();
  161 + if (streetId != null) {
  162 + stmt.bindString(19, streetId);
  163 + }
  164 +
  165 + String streetTitle = entity.getStreetTitle();
  166 + if (streetTitle != null) {
  167 + stmt.bindString(20, streetTitle);
  168 + }
  169 + stmt.bindLong(21, entity.getCreatTimeStamp());
  170 + stmt.bindLong(22, entity.getIsArriveEndPoint() ? 1L: 0L);
  171 + }
  172 +
  173 + @Override
  174 + protected final void bindValues(SQLiteStatement stmt, CollFailedEntity entity) {
  175 + stmt.clearBindings();
  176 +
  177 + String uuid = entity.getUuid();
  178 + if (uuid != null) {
  179 + stmt.bindString(1, uuid);
  180 + }
  181 +
  182 + String uid = entity.getUid();
  183 + if (uid != null) {
  184 + stmt.bindString(2, uid);
  185 + }
  186 + stmt.bindLong(3, entity.getIsPause() ? 1L: 0L);
  187 + stmt.bindLong(4, entity.getUserPauseTime());
  188 + stmt.bindLong(5, entity.getUsrContinueTime());
  189 +
  190 + String isFinish = entity.getIsFinish();
  191 + if (isFinish != null) {
  192 + stmt.bindString(6, isFinish);
  193 + }
  194 +
  195 + String time = entity.getTime();
  196 + if (time != null) {
  197 + stmt.bindString(7, time);
  198 + }
  199 +
  200 + String speed = entity.getSpeed();
  201 + if (speed != null) {
  202 + stmt.bindString(8, speed);
  203 + }
  204 +
  205 + String step = entity.getStep();
  206 + if (step != null) {
  207 + stmt.bindString(9, step);
  208 + }
  209 +
  210 + String distance = entity.getDistance();
  211 + if (distance != null) {
  212 + stmt.bindString(10, distance);
  213 + }
  214 +
  215 + String startPoint = entity.getStartPoint();
  216 + if (startPoint != null) {
  217 + stmt.bindString(11, startPoint);
  218 + }
  219 +
  220 + String endPoint = entity.getEndPoint();
  221 + if (endPoint != null) {
  222 + stmt.bindString(12, endPoint);
  223 + }
  224 + stmt.bindLong(13, entity.getStreetTraceStartTime());
  225 + stmt.bindLong(14, entity.getStreetTraceEndTime());
  226 +
  227 + String entityName = entity.getEntityName();
  228 + if (entityName != null) {
  229 + stmt.bindString(15, entityName);
  230 + }
  231 + stmt.bindLong(16, entity.getUserStartTime());
  232 + stmt.bindLong(17, entity.getUserEndTime());
  233 +
  234 + String importPoint = entity.getImportPoint();
  235 + if (importPoint != null) {
  236 + stmt.bindString(18, importPoint);
  237 + }
  238 +
  239 + String streetId = entity.getStreetId();
  240 + if (streetId != null) {
  241 + stmt.bindString(19, streetId);
  242 + }
  243 +
  244 + String streetTitle = entity.getStreetTitle();
  245 + if (streetTitle != null) {
  246 + stmt.bindString(20, streetTitle);
  247 + }
  248 + stmt.bindLong(21, entity.getCreatTimeStamp());
  249 + stmt.bindLong(22, entity.getIsArriveEndPoint() ? 1L: 0L);
  250 + }
  251 +
  252 + @Override
  253 + public String readKey(Cursor cursor, int offset) {
  254 + return cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0);
  255 + }
  256 +
  257 + @Override
  258 + public CollFailedEntity readEntity(Cursor cursor, int offset) {
  259 + CollFailedEntity entity = new CollFailedEntity( //
  260 + cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0), // uuid
  261 + cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // uid
  262 + cursor.getShort(offset + 2) != 0, // isPause
  263 + cursor.getLong(offset + 3), // userPauseTime
  264 + cursor.getLong(offset + 4), // usrContinueTime
  265 + cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // isFinish
  266 + cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // time
  267 + cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // speed
  268 + cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // step
  269 + cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // distance
  270 + cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // startPoint
  271 + cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // endPoint
  272 + cursor.getLong(offset + 12), // streetTraceStartTime
  273 + cursor.getLong(offset + 13), // streetTraceEndTime
  274 + cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // entityName
  275 + cursor.getLong(offset + 15), // userStartTime
  276 + cursor.getLong(offset + 16), // userEndTime
  277 + cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // importPoint
  278 + cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // streetId
  279 + cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // streetTitle
  280 + cursor.getLong(offset + 20), // creatTimeStamp
  281 + cursor.getShort(offset + 21) != 0 // isArriveEndPoint
  282 + );
  283 + return entity;
  284 + }
  285 +
  286 + @Override
  287 + public void readEntity(Cursor cursor, CollFailedEntity entity, int offset) {
  288 + entity.setUuid(cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0));
  289 + entity.setUid(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
  290 + entity.setIsPause(cursor.getShort(offset + 2) != 0);
  291 + entity.setUserPauseTime(cursor.getLong(offset + 3));
  292 + entity.setUsrContinueTime(cursor.getLong(offset + 4));
  293 + entity.setIsFinish(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
  294 + entity.setTime(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
  295 + entity.setSpeed(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
  296 + entity.setStep(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
  297 + entity.setDistance(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
  298 + entity.setStartPoint(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
  299 + entity.setEndPoint(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
  300 + entity.setStreetTraceStartTime(cursor.getLong(offset + 12));
  301 + entity.setStreetTraceEndTime(cursor.getLong(offset + 13));
  302 + entity.setEntityName(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
  303 + entity.setUserStartTime(cursor.getLong(offset + 15));
  304 + entity.setUserEndTime(cursor.getLong(offset + 16));
  305 + entity.setImportPoint(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
  306 + entity.setStreetId(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
  307 + entity.setStreetTitle(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
  308 + entity.setCreatTimeStamp(cursor.getLong(offset + 20));
  309 + entity.setIsArriveEndPoint(cursor.getShort(offset + 21) != 0);
  310 + }
  311 +
  312 + @Override
  313 + protected final String updateKeyAfterInsert(CollFailedEntity entity, long rowId) {
  314 + return entity.getUuid();
  315 + }
  316 +
  317 + @Override
  318 + public String getKey(CollFailedEntity entity) {
  319 + if(entity != null) {
  320 + return entity.getUuid();
  321 + } else {
  322 + return null;
  323 + }
  324 + }
  325 +
  326 + @Override
  327 + public boolean hasKey(CollFailedEntity entity) {
  328 + return entity.getUuid() != null;
  329 + }
  330 +
  331 + @Override
  332 + protected final boolean isEntityUpdateable() {
  333 + return true;
  334 + }
  335 +
  336 +}
... ...