Examples of Fun


Examples of net.caece.pri.hibernate.Fun

        return subList;
    }

    public void addFun() {
        Fun myfun = new Fun();
        myfun.setFunType("W");
        myfun.setFunType(FUN_TYPE_WEB);



        /*
        FunDao dao = new FunDao();
View Full Code Here

Examples of net.caece.pri.hibernate.Fun

        }
    }

    public void add() {
        // insert into database
        Fun obj = (Fun) viewToObj(null);

        objTree = (Tree) getFellow("objTree");

        if (objTree.getSelectedItem() != null) {
            SimpleTreeNode node = (SimpleTreeNode) objTree.getSelectedItem().getValue();
            int parentLevel = objTree.getSelectedItem().getLevel();
            int currentLayerSeq = objTree.getSelectedItem().getChildren().size();
            Fun parent = (Fun) node.getData();
            obj.setFun(parent);

            //layer
            obj.setLayer((parentLevel + 1) + "");
            obj.setLayerSeq((currentLayerSeq + 1) + "");
View Full Code Here

Examples of net.caece.pri.hibernate.Fun

    }

    //ck
    public void update() {
        FunForm var = null;
        Fun parentFun = null;

        objTree = (Tree) getFellow("objTree");
        if (objTree.getSelectedItem() != null) {
            SimpleTreeNode node = (SimpleTreeNode) objTree.getSelectedItem().getValue();
            var = (FunForm) node.getData();

            Treeitem parentItem = objTree.getSelectedItem().getParentItem();

            FunForm parentFunForm = null;
            if (parentItem != null) {
                SimpleTreeNode parentNode = (SimpleTreeNode) parentItem.getValue();
                parentFunForm = (FunForm) parentNode.getData();
            } else {
                parentFunForm = (FunForm) node.getData();
            }
            parentFun = new Fun();
            try {
                BeanUtils.copyProperties(parentFun, parentFunForm);
            } catch (Exception iae) {
                iae.printStackTrace();
            }
        }


        Fun obj = (Fun) viewToObj(var);
        obj.setFun(parentFun);

        FunDao dao = new FunDao();
        dao.update(obj);

        refreshObjEntities();
View Full Code Here

Examples of net.caece.pri.hibernate.Fun

        refreshObjEntities();
    }

    private Fun getById(int funId) {
        SqlSession sess = IBatisFactory.getInstance().getSqlSession();
        Fun fun = (Fun) sess.selectOne("Fun.getById", funId);
        sess = null;
        return fun;
    }
View Full Code Here

Examples of net.caece.pri.hibernate.Fun

                this.showMsg("還有下屬功能, 請先刪除", "必要的操作");
                return;
            }
        }

        Fun obj = (Fun) viewToObj(var);

        FunDao dao = new FunDao();
        dao.delete(obj);

        refreshObjEntities();
View Full Code Here

Examples of net.caece.pri.hibernate.Fun

        objTree.setTreeitemRenderer(objTreeRenderer);

    }

    public Object viewToObj(Object obj) {
        Fun var = new Fun();
        if (obj != null) {
            try {
                BeanUtils.copyProperties(var, obj);
            } catch (Exception iae) {
                iae.printStackTrace();
            }
        }
        var.setOperateBy(operateBy);

        Combobox ServiceCB = (Combobox) getFellow("service");
        Textbox FunNameTB = (Textbox) getFellow("FunName");
        Combobox BootFlag = (Combobox) getFellow("BootFlag");
        Combobox ActiveFlag = (Combobox) getFellow("ActiveFlag");



        Textbox FunPathTB = (Textbox) getFellow("FunPathTB");

        Service service = (Service) ServiceCB.getSelectedItem().getValue();
        var.setService(service);

        var.setFunName(FunNameTB.getText());
        var.setActiveFlag(ActiveFlag.getSelectedItem().getValue().toString());
        var.setBootFlag(BootFlag.getSelectedItem().getValue().toString());




        List operationsLists = ParaCache.getInstance().getByCatalogue("pri.Fun.operations");

        StringBuffer sb = new StringBuffer();
        Iterator it = operationsLists.iterator();

        int firstCount = 0;
        while (it.hasNext()) {
            Para para = (Para) it.next();
            Checkbox cb = (Checkbox) getFellow("checkbox_" + para.getParaName());
            if (cb.isChecked()) {
                if (firstCount != 0) {
                    sb.append(":");
                }
                sb.append(cb.getValue());
            }
            firstCount++;
        }
        var.setOperations(sb.toString());


        var.setFunPath(FunPathTB.getText());

        //internal parameters
        var.setFunType("W");
        var.setFunCode("FM-II");

        return var;
    }
View Full Code Here

Examples of net.sf.kpex.prolog.Fun

    Clause SuperC = new Clause(Vs, C);
    SuperC.dict = C.dict;
    Clause NamedSuperC = SuperC.cnumbervars(false);
    Term Ns = NamedSuperC.getHead();
    Term NamedC = NamedSuperC.getBody();
    return new Fun("clause", C, Vs, NamedC, Ns);
  }
View Full Code Here

Examples of net.sf.kpex.prolog.Fun

    {
      found = Const.NO;
    }
    else
    {
      found = new Fun("the", found.copy());
    }
    return found;
  }
View Full Code Here

Examples of net.sf.kpex.prolog.Fun

    Vector To = new Vector();
    for (String key : keySet())
    {
      all0(max, To, key, FXs);
    }
    Fun R = new Fun("$", To.size());
    // IO.mes("RR"+R);
    To.copyInto(R.args);
    return ((Cons) R.listify()).args[1];
  }
View Full Code Here

Examples of net.sf.kpex.prolog.Fun

    all0(max, To, k, FXs);
    if (To.size() == 0)
    {
      return Const.NIL;
    }
    Fun R = new Fun("$", To.size());
    To.copyInto(R.args);
    Term T = ((Cons) R.listify()).args[1];
    return T;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.