mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
'v3.9.4.1'
This commit is contained in:
@@ -21,7 +21,12 @@ public class Xowd_cfg_tbl_ {
|
||||
public static final String Tbl_name = "xowa_cfg";
|
||||
public static Db_cfg_tbl New(gplx.dbs.Db_conn conn) {return New(conn, Tbl_name);}
|
||||
public static Db_cfg_tbl New(gplx.dbs.Db_conn conn, String tbl_name) {return new Db_cfg_tbl(conn, tbl_name);}
|
||||
public static Db_cfg_tbl Get_or_null(gplx.dbs.Db_conn conn) {
|
||||
public static Db_cfg_tbl Get_or_null(Db_conn conn) {
|
||||
return conn.Meta_tbl_exists(Tbl_name) ? new Db_cfg_tbl(conn, Tbl_name) : null;
|
||||
}
|
||||
public static Db_cfg_tbl Get_or_fail(Db_conn conn) {
|
||||
Db_cfg_tbl rv = Get_or_null(conn);
|
||||
if (rv == null) throw Err_.New("xowa_cfg tbl does not exist: file={0}", conn.Conn_info().Raw());
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,9 +28,9 @@ public class Xowd_category_itm {
|
||||
public int Count_pages() {return count_pages;} private int count_pages;
|
||||
public int Count_by_tid(byte tid) {
|
||||
switch (tid) {
|
||||
case Xoa_ctg_mgr.Tid_subc: return count_subcs;
|
||||
case Xoa_ctg_mgr.Tid_page: return count_pages;
|
||||
case Xoa_ctg_mgr.Tid_file: return count_files;
|
||||
case Xoa_ctg_mgr.Tid__subc: return count_subcs;
|
||||
case Xoa_ctg_mgr.Tid__page: return count_pages;
|
||||
case Xoa_ctg_mgr.Tid__file: return count_files;
|
||||
default: throw Err_.new_unhandled(tid);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user