/**
  * 将Sql Table放入存储集合
  *
  * @param table
  */
 private void putSqlTableIntoList(EntityTable table) {
   if (Log.isPrint) Log.i(TAG, "Table [" + table.name + "] Create Success");
   SQLiteTable sqlTable = new SQLiteTable();
   sqlTable.name = table.name;
   sqlTable.columns = new ArrayList<String>();
   if (table.key != null) sqlTable.columns.add(table.key.column);
   if (table.pmap != null) {
     for (String col : table.pmap.keySet()) {
       sqlTable.columns.add(col);
     }
   }
   if (mSqlTableList != null) mSqlTableList.add(sqlTable);
 }
Example #2
0
 /**
  * 将Sql Table放入存储集合
  *
  * @param table
  */
 private void putNewSqlTableIntoMap(EntityTable table) {
   if (Log.isPrint) {
     Log.i(TAG, "Table [" + table.name + "] Create Success");
   }
   SQLiteTable sqlTable = new SQLiteTable();
   sqlTable.name = table.name;
   sqlTable.columns = new HashMap<String, Integer>();
   if (table.key != null) {
     sqlTable.columns.put(table.key.column, 1);
   }
   if (table.pmap != null) {
     for (String col : table.pmap.keySet()) {
       sqlTable.columns.put(col, 1);
     }
   }
   // 第一次建表,不用检查
   sqlTable.isTableChecked = true;
   mSqlTableMap.put(sqlTable.name, sqlTable);
 }