sqliteMasterDao = new SqliteMasterDao(sqliteMasterDaoConfig, this); customTypeEntityDao = new CustomTypeEntityDao(customTypeEntityDaoConfig, this); indexedStringEntityDao = new IndexedStringEntityDao(indexedStringEntityDaoConfig, this);
dao.insertInTx(entities); DaoLog.d("Inserted entities."); int nextIndex = randomIndices[i]; List<IndexedStringEntity> query = dao.queryBuilder() .where(IndexedStringEntityDao.Properties.IndexedString.eq( fixedRandomStrings[nextIndex])) dao.deleteAll(); DaoLog.d("Deleted all entities.");
/** Creates underlying database table using DAOs. */ public static void createAllTables(Database db, boolean ifNotExists) { SimpleEntityDao.createTable(db, ifNotExists); SimpleEntityNotNullDao.createTable(db, ifNotExists); TestEntityDao.createTable(db, ifNotExists); RelationEntityDao.createTable(db, ifNotExists); DateEntityDao.createTable(db, ifNotExists); SpecialNamesEntityDao.createTable(db, ifNotExists); AbcdefEntityDao.createTable(db, ifNotExists); ToManyTargetEntityDao.createTable(db, ifNotExists); ToManyEntityDao.createTable(db, ifNotExists); JoinManyToDateEntityDao.createTable(db, ifNotExists); TreeEntityDao.createTable(db, ifNotExists); AnActiveEntityDao.createTable(db, ifNotExists); ExtendsImplementsEntityDao.createTable(db, ifNotExists); StringKeyValueEntityDao.createTable(db, ifNotExists); AutoincrementEntityDao.createTable(db, ifNotExists); CustomTypeEntityDao.createTable(db, ifNotExists); IndexedStringEntityDao.createTable(db, ifNotExists); }
/** Drops underlying database table using DAOs. */ public static void dropAllTables(Database db, boolean ifExists) { SimpleEntityDao.dropTable(db, ifExists); SimpleEntityNotNullDao.dropTable(db, ifExists); TestEntityDao.dropTable(db, ifExists); RelationEntityDao.dropTable(db, ifExists); DateEntityDao.dropTable(db, ifExists); SpecialNamesEntityDao.dropTable(db, ifExists); AbcdefEntityDao.dropTable(db, ifExists); ToManyTargetEntityDao.dropTable(db, ifExists); ToManyEntityDao.dropTable(db, ifExists); JoinManyToDateEntityDao.dropTable(db, ifExists); TreeEntityDao.dropTable(db, ifExists); AnActiveEntityDao.dropTable(db, ifExists); ExtendsImplementsEntityDao.dropTable(db, ifExists); StringKeyValueEntityDao.dropTable(db, ifExists); AutoincrementEntityDao.dropTable(db, ifExists); CustomTypeEntityDao.dropTable(db, ifExists); IndexedStringEntityDao.dropTable(db, ifExists); }