mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
'v3.6.4.2'
This commit is contained in:
@@ -70,7 +70,7 @@ public class Xobc_step_map_tbl implements Db_tbl {
|
||||
}
|
||||
public List_adp Select_all(int task_id) {
|
||||
List_adp rv = List_adp_.New();
|
||||
Db_rdr rdr = conn.Stmt_select(tbl_name, flds, fld_task_id).Crt_int(fld_task_id, task_id).Exec_select__rls_auto();
|
||||
Db_rdr rdr = conn.Stmt_select_order(tbl_name, flds, String_.Ary(fld_task_id), fld_step_seqn).Crt_int(fld_task_id, task_id).Exec_select__rls_auto();
|
||||
try {
|
||||
while (rdr.Move_next()) {
|
||||
rv.Add(rdr.Read_int("step_id"));
|
||||
|
||||
@@ -53,6 +53,7 @@ public class Xobc_work_task_tbl implements Db_tbl {
|
||||
task.Task_status_(cmd_id == Xobc_cmd__base.Seqn__0 ? gplx.core.progs.Gfo_prog_ui_.Status__init : gplx.core.progs.Gfo_prog_ui_.Status__working);
|
||||
task_mgr.Step_mgr().Load(task, step_id, cmd_id);
|
||||
}
|
||||
work_regy.Sort();
|
||||
} finally {rdr.Rls();}
|
||||
}
|
||||
public void Insert(int task_id, int task_seqn, int step_id, int cmd_id) {
|
||||
|
||||
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
package gplx.xowa.addons.bldrs.centrals.tasks; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.centrals.*;
|
||||
import gplx.core.gfobjs.*;
|
||||
import gplx.xowa.addons.bldrs.centrals.cmds.*; import gplx.xowa.addons.bldrs.centrals.steps.*;
|
||||
public class Xobc_task_itm {
|
||||
public class Xobc_task_itm implements gplx.CompareAble {
|
||||
public Xobc_task_itm(int task_id, int task_seqn, int step_count, String task_key, String task_name) {
|
||||
this.task_id = task_id; this.task_seqn = task_seqn;
|
||||
this.step_count = step_count;
|
||||
@@ -35,6 +35,7 @@ public class Xobc_task_itm {
|
||||
public boolean Step_is_last() {return step.Step_seqn() == step_count - 1;}
|
||||
public void Task_status_(byte v) {task_status = v;} // called when task moves from init -> working -> suspended -> done
|
||||
public void Task_seqn_(int v) {this.task_seqn = v;} // called when task is init'd from db, or added to list
|
||||
public int compareTo(Object obj) {Xobc_task_itm comp = (Xobc_task_itm)obj; return Int_.Compare(task_seqn, comp.task_seqn);}
|
||||
|
||||
public Gfobj_nde Save_to(Gfobj_nde nde) {
|
||||
nde.Add_int ("task_id" , task_id);
|
||||
|
||||
@@ -28,6 +28,7 @@ public abstract class Xobc_task_regy__base {
|
||||
public Xobc_task_itm Get_at(int i) {return (Xobc_task_itm)hash.Get_at(i);}
|
||||
public Xobc_task_itm Get_by(int i) {return (Xobc_task_itm)hash.Get_by(i);}
|
||||
public void Del_by(int i) {hash.Del(i);}
|
||||
public void Sort() {hash.Sort();}
|
||||
|
||||
public void Save_to(Gfobj_ary ary) {
|
||||
int len = hash.Len();
|
||||
|
||||
Reference in New Issue
Block a user