Package net.caece.pri.hibernate

Examples of net.caece.pri.hibernate.FunAuthDao


        AuthForm authForm = (AuthForm) objListbox.getSelectedItem().getValue();

        Tree funObjTree = (Tree) getFellow("funObjTree");
        Set selectedFuns = funObjTree.getSelectedItems();

        FunAuthDao faDao = new FunAuthDao();

        Iterator selectedFunsItr = selectedFuns.iterator();
        while (selectedFunsItr.hasNext()) {
            StringBuffer sb = new StringBuffer();

            Treeitem treeItem = (Treeitem) selectedFunsItr.next();

            List children = treeItem.getChildren();
            Iterator it = children.iterator();
            while (it.hasNext()) {
                Object obj = it.next();
                if (obj instanceof Treerow) {
                    Treerow treerow = (Treerow) obj;
                    List treeRowChildren = treerow.getChildren();
                    Iterator it2 = treeRowChildren.iterator();
                    while (it2.hasNext()) {
                        Object obj2 = it2.next();
                        Treecell cell = (Treecell) obj2;
                        Iterator it3 = cell.getChildren().iterator();
                        while (it3.hasNext()) {
                            Object obj3 = it3.next();

                            if (obj3 instanceof Checkbox) {
                                Checkbox cb = (Checkbox) obj3;
                                if (cb.isChecked()) {
                                    sb.append(":");
                                    sb.append(cb.getValue());
                                }
                            }
                        }
                    }
                }
            }

            SimpleTreeNode node = (SimpleTreeNode) treeItem.getValue();
            FunForm funForm = (FunForm) node.getData();

            FunAuth funAuth = new FunAuth();
            funAuth.setFun(funForm);
            funAuth.setAuth(authForm);
            if ("Y".equals(funForm.getBootFlag())) {
                funAuth.setOperations(sb.toString());
            }
            funAuth.setOperateBy(operateBy);
            faDao.create(funAuth);
        }

        refresheFunAuth(authForm);
    }
View Full Code Here


    public void deFunAuth() {

        Tree funAuthObjTree = (Tree) getFellow("funAuthObjTree");
        Set selectedFunAuths = funAuthObjTree.getSelectedItems();

        FunAuthDao faDao = new FunAuthDao();

        Iterator selectedFunAuthItr = selectedFunAuths.iterator();
        while (selectedFunAuthItr.hasNext()) {
            Treeitem treeItem = (Treeitem) selectedFunAuthItr.next();
            SimpleTreeNode node = (SimpleTreeNode) treeItem.getValue();

            FunAuthForm faForm = (FunAuthForm) node.getData();

            FunAuth fa = new FunAuth();

            fa.setFunAuthId(faForm.getFunAuthId());
            fa.setOperateAt(faForm.getOperateAt());
            fa.setOperateBy(operateBy);

            faDao.update(fa);
            faDao.delete(fa);
        }

        objListbox = (Listbox) getFellow("objListbox");
        AuthForm authForm = (AuthForm) objListbox.getSelectedItem().getValue();
View Full Code Here

TOP

Related Classes of net.caece.pri.hibernate.FunAuthDao

Copyright © 2018 www.massapicom. 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.