コード例 #1
0
 protected final boolean createTables(
     SQLiteDatabase db, Class<? extends Entity>... entityClasses) {
   ArrayList<String> statements = new ArrayList<String>();
   for (Class<? extends Entity> cls : entityClasses) {
     String query = PersistUtils.getSQLCreate(getTableName(cls), getTableColumnSpecs(cls));
     statements.add(query);
   }
   return executeStatements(db, statements);
 }
コード例 #2
0
 protected final boolean executeStatements(SQLiteDatabase db, ArrayList<String> queries) {
   return PersistUtils.executeStatements(db, queries);
 }
コード例 #3
0
 protected final boolean dropTables(SQLiteDatabase db, String... optionalTableNames) {
   return PersistUtils.dropTables(db, optionalTableNames);
 }
コード例 #4
0
 protected final boolean createIndex(
     SQLiteDatabase db, String table, boolean unique, String firstColumn, String... otherColumns) {
   ArrayList<String> statements = new ArrayList<String>();
   statements.add(PersistUtils.getCreateIndex(table, unique, firstColumn, otherColumns));
   return executeStatements(db, statements);
 }