public void WriteToDB() {
   if (!needToWriteToDB()) ;
   while (this.mLstPlayNodes == null) return;
   this.needToWriteToDB = false;
   HashMap localHashMap = new HashMap();
   localHashMap.put("playhistory", this.mLstPlayNodes);
   DataManager.getInstance().getData("delinsertdb_play_history", null, localHashMap);
 }
 public List<PlayHistoryNode> getPlayHistoryNodes() {
   if (this.mLstPlayNodes == null) {
     Result localResult =
         DataManager.getInstance().getData("getdb_play_history", null, null).getResult();
     if (localResult.getSuccess()) this.mLstPlayNodes = ((List) localResult.getData());
     if (this.mLstPlayNodes == null) this.mLstPlayNodes = new ArrayList();
   }
   return this.mLstPlayNodes;
 }
Exemplo n.º 3
0
 public void updateToDB()
 {
   HashMap localHashMap = new HashMap();
   localHashMap.put("id", Integer.valueOf(this.sectionId));
   if (this.lstRecMain.size() > 0)
     localHashMap.put("main", this.lstRecMain);
   if (this.lstBanner.size() > 0)
     localHashMap.put("banner", this.lstBanner);
   DataManager.getInstance().getData("updatedb_reccategory_node", null, localHashMap);
 }
Exemplo n.º 4
0
 public boolean restoreFromDB()
 {
   RecommendCategoryNode localRecommendCategoryNode = null;
   if (this.hasRestored)
     return this.hasRestoredSucc;
   this.hasRestored = true;
   Object localObject = new HashMap();
   ((Map)localObject).put("id", Integer.valueOf(this.sectionId));
   localObject = DataManager.getInstance().getData("getdb_reccategory_node", null, (Map)localObject).getResult();
   if (((Result)localObject).getSuccess())
     localRecommendCategoryNode = (RecommendCategoryNode)((Result)localObject).getData();
   if (localRecommendCategoryNode != null)
   {
     this.lstBanner = localRecommendCategoryNode.lstBanner;
     this.lstRecMain = localRecommendCategoryNode.lstRecMain;
   }
   this.hasRestoredSucc = true;
   return true;
 }
 private void deletePlayHistory() {
   DataManager.getInstance().getData("deletedb_play_history", null, null);
 }