public void insert_data_into_odsSubPageModel() {

    crawlScript crawlscript = new crawlScript();
    dbOperate dboperate = new dbOperate();
    ArrayList<odsHomePage> odshomepages = new ArrayList<odsHomePage>();
    ArrayList<odsSubPage> odssubpages = new ArrayList<odsSubPage>();
    odshomepages =
        dboperate.select_from_odsHomePageModel(new SimpleDateFormat("yyyyMMdd").format(new Date()));
    if (odshomepages.size() > 0) {
      for (int i = 0; i < odshomepages.size(); i++) {
        Log.Infos(
            "odshomepages.get(" + i + ").getHomesubURL():" + odshomepages.get(i).getHomesubURL());
        odssubpages = crawlscript.getodsSubPageModels(odshomepages.get(i));
        if (odssubpages.size() > 0) {
          dboperate.insert_into_odsSubPageModel(odssubpages);
          dboperate.update_odsHomePageModel_lastExecduteSubNameID(
              odshomepages.get(i), odssubpages.get(odssubpages.size() - 1).getSubNameID());
          odssubpages.clear();
        } else {
          Log.Infos("crawlscript.getodsSubPageModels is NULL");
        }
      }
    } else {
      Log.Infos("dboperate.select_from_odsHomePageModel NULL");
    }
  }
 public void insert_data_into_odsHomePageModel() {
   // insert data into odsHomePageModel
   crawlScript crawlscript = new crawlScript();
   dbOperate dboperate = new dbOperate();
   ArrayList<odsBaseURL> baseURLs = new ArrayList<odsBaseURL>();
   ArrayList<odsHomePage> odshomepages = new ArrayList<odsHomePage>();
   baseURLs = dboperate.select_from_odsBaseURL();
   if (baseURLs.size() > 0) {
     for (int i = 0; i < baseURLs.size(); i++) {
       odshomepages = crawlscript.getodsHomePageModels(baseURLs.get(i));
       if (odshomepages.size() > 0) {
         for (int j = 0; j < odshomepages.size(); j++) {
           dboperate.insert_into_odsHomePageModel(odshomepages.get(j));
         }
         dboperate.update_odsbaseurl_lastExecduteHomeNameID(
             baseURLs.get(i).getBaseURLID(),
             odshomepages.get(odshomepages.size() - 1).getHomeNameID());
         odshomepages.clear();
       } else {
         Log.Infos("crawlscript.getodsHomePageModels is NULL");
       }
     }
   } else {
     Log.Infos("dboperate.select_from_odsBaseURL() is NULL");
   }
 }