Example #1
0
 private int Autonum_calc(String name) {
   Int_obj_ref autonum_itm = (Int_obj_ref) autonum_hash.Get_by(name);
   if (autonum_itm == null) {
     autonum_itm = Int_obj_ref.New(0);
     autonum_hash.Add(name, autonum_itm);
   }
   return autonum_itm.Val_add();
 }
Example #2
0
 public void Init_page_insert(Int_obj_ref page_id_next, int ns_id, String[] ttls) {
   Xowe_wiki wiki = this.Wiki();
   int len = ttls.length;
   DateAdp modified_on = Tfds.Now_time0_add_min(0);
   Xowd_page_tbl tbl_page = wiki.Db_mgr_as_sql().Core_data_mgr().Tbl__page();
   tbl_page.Insert_bgn();
   for (int i = 0; i < len; i++) {
     String ttl = ttls[i];
     int page_id = page_id_next.Val();
     tbl_page.Insert_cmd_by_batch(
         page_id, ns_id, Bry_.new_u8(ttl), false, modified_on, 0, page_id, 0, 0);
     page_id_next.Val_add(1);
   }
   tbl_page.Insert_end();
 }