Commit 80aaf21188b44568c73200ee054dd122a990f179

Authored by 韩亚云
1 parent e76b6a53

代码更新

moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/sql/dao/DaoMaster.java
... ... @@ -21,18 +21,18 @@ public class DaoMaster extends AbstractDaoMaster {
21 21  
22 22 /** Creates underlying database table using DAOs. */
23 23 public static void createAllTables(Database db, boolean ifNotExists) {
24   - CollFailedEntityDao.createTable(db, ifNotExists);
25 24 CollUserStepEntityDao.createTable(db, ifNotExists);
26 25 FailedEntityDao.createTable(db, ifNotExists);
27 26 UserStepEntityDao.createTable(db, ifNotExists);
  27 + CollFailedEntityDao.createTable(db, ifNotExists);
28 28 }
29 29  
30 30 /** Drops underlying database table using DAOs. */
31 31 public static void dropAllTables(Database db, boolean ifExists) {
32   - CollFailedEntityDao.dropTable(db, ifExists);
33 32 CollUserStepEntityDao.dropTable(db, ifExists);
34 33 FailedEntityDao.dropTable(db, ifExists);
35 34 UserStepEntityDao.dropTable(db, ifExists);
  35 + CollFailedEntityDao.dropTable(db, ifExists);
36 36 }
37 37  
38 38 /**
... ... @@ -51,10 +51,10 @@ public class DaoMaster extends AbstractDaoMaster {
51 51  
52 52 public DaoMaster(Database db) {
53 53 super(db, SCHEMA_VERSION);
54   - registerDaoClass(CollFailedEntityDao.class);
55 54 registerDaoClass(CollUserStepEntityDao.class);
56 55 registerDaoClass(FailedEntityDao.class);
57 56 registerDaoClass(UserStepEntityDao.class);
  57 + registerDaoClass(CollFailedEntityDao.class);
58 58 }
59 59  
60 60 public DaoSession newSession() {
... ...
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/sql/dao/DaoSession.java
... ... @@ -8,15 +8,15 @@ import org.greenrobot.greendao.database.Database;
8 8 import org.greenrobot.greendao.identityscope.IdentityScopeType;
9 9 import org.greenrobot.greendao.internal.DaoConfig;
10 10  
11   -import com.cnlive.moudle.pedometer.sql.entity.CollFailedEntity;
12 11 import com.cnlive.moudle.pedometer.sql.entity.CollUserStepEntity;
13 12 import com.cnlive.moudle.pedometer.sql.entity.FailedEntity;
14 13 import com.cnlive.moudle.pedometer.sql.entity.UserStepEntity;
  14 +import com.cnlive.moudle.pedometer.sql.entity.CollFailedEntity;
15 15  
16   -import com.cnlive.moudle.pedometer.sql.dao.CollFailedEntityDao;
17 16 import com.cnlive.moudle.pedometer.sql.dao.CollUserStepEntityDao;
18 17 import com.cnlive.moudle.pedometer.sql.dao.FailedEntityDao;
19 18 import com.cnlive.moudle.pedometer.sql.dao.UserStepEntityDao;
  19 +import com.cnlive.moudle.pedometer.sql.dao.CollFailedEntityDao;
20 20  
21 21 // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
22 22  
... ... @@ -27,23 +27,20 @@ import com.cnlive.moudle.pedometer.sql.dao.UserStepEntityDao;
27 27 */
28 28 public class DaoSession extends AbstractDaoSession {
29 29  
30   - private final DaoConfig collFailedEntityDaoConfig;
31 30 private final DaoConfig collUserStepEntityDaoConfig;
32 31 private final DaoConfig failedEntityDaoConfig;
33 32 private final DaoConfig userStepEntityDaoConfig;
  33 + private final DaoConfig collFailedEntityDaoConfig;
34 34  
35   - private final CollFailedEntityDao collFailedEntityDao;
36 35 private final CollUserStepEntityDao collUserStepEntityDao;
37 36 private final FailedEntityDao failedEntityDao;
38 37 private final UserStepEntityDao userStepEntityDao;
  38 + private final CollFailedEntityDao collFailedEntityDao;
39 39  
40 40 public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
41 41 daoConfigMap) {
42 42 super(db);
43 43  
44   - collFailedEntityDaoConfig = daoConfigMap.get(CollFailedEntityDao.class).clone();
45   - collFailedEntityDaoConfig.initIdentityScope(type);
46   -
47 44 collUserStepEntityDaoConfig = daoConfigMap.get(CollUserStepEntityDao.class).clone();
48 45 collUserStepEntityDaoConfig.initIdentityScope(type);
49 46  
... ... @@ -53,26 +50,25 @@ public class DaoSession extends AbstractDaoSession {
53 50 userStepEntityDaoConfig = daoConfigMap.get(UserStepEntityDao.class).clone();
54 51 userStepEntityDaoConfig.initIdentityScope(type);
55 52  
56   - collFailedEntityDao = new CollFailedEntityDao(collFailedEntityDaoConfig, this);
  53 + collFailedEntityDaoConfig = daoConfigMap.get(CollFailedEntityDao.class).clone();
  54 + collFailedEntityDaoConfig.initIdentityScope(type);
  55 +
57 56 collUserStepEntityDao = new CollUserStepEntityDao(collUserStepEntityDaoConfig, this);
58 57 failedEntityDao = new FailedEntityDao(failedEntityDaoConfig, this);
59 58 userStepEntityDao = new UserStepEntityDao(userStepEntityDaoConfig, this);
  59 + collFailedEntityDao = new CollFailedEntityDao(collFailedEntityDaoConfig, this);
60 60  
61   - registerDao(CollFailedEntity.class, collFailedEntityDao);
62 61 registerDao(CollUserStepEntity.class, collUserStepEntityDao);
63 62 registerDao(FailedEntity.class, failedEntityDao);
64 63 registerDao(UserStepEntity.class, userStepEntityDao);
  64 + registerDao(CollFailedEntity.class, collFailedEntityDao);
65 65 }
66 66  
67 67 public void clear() {
68   - collFailedEntityDaoConfig.clearIdentityScope();
69 68 collUserStepEntityDaoConfig.clearIdentityScope();
70 69 failedEntityDaoConfig.clearIdentityScope();
71 70 userStepEntityDaoConfig.clearIdentityScope();
72   - }
73   -
74   - public CollFailedEntityDao getCollFailedEntityDao() {
75   - return collFailedEntityDao;
  71 + collFailedEntityDaoConfig.clearIdentityScope();
76 72 }
77 73  
78 74 public CollUserStepEntityDao getCollUserStepEntityDao() {
... ... @@ -87,4 +83,8 @@ public class DaoSession extends AbstractDaoSession {
87 83 return userStepEntityDao;
88 84 }
89 85  
  86 + public CollFailedEntityDao getCollFailedEntityDao() {
  87 + return collFailedEntityDao;
  88 + }
  89 +
90 90 }
... ...