Package net.caece.pri.hibernate.vo

Examples of net.caece.pri.hibernate.vo.OrgForm


        Iterator selectedOrgsItr = selectedOrgs.iterator();
        while (selectedOrgsItr.hasNext()) {
            Treeitem treeItem = (Treeitem) selectedOrgsItr.next();
            SimpleTreeNode node = (SimpleTreeNode) treeItem.getValue();
            OrgForm orgForm = (OrgForm) node.getData();

            DataAuth dataAuth = new DataAuth();
            dataAuth.setOrg(orgForm);
            dataAuth.setAuth(authForm);
            dataAuth.setOperateBy(operateBy);
View Full Code Here


        return subList;
    }

    private SimpleTreeNode prepareOrgRootNode(List data) {
        OrgForm root = new OrgForm();
        root.setOrgName("");

        ArrayList mother = new ArrayList();

        Iterator it = data.iterator();
        while (it.hasNext()) {
            OrgForm form = (OrgForm) it.next();
            if (form.getParentOrgId() == null) {

                ArrayList subList = getOrgSubList(form, data);
                SimpleTreeNode stn = new SimpleTreeNode(form, subList);
                mother.add(stn);
            }
View Full Code Here

    private ArrayList getOrgSubList(OrgForm form, List data) {
        ArrayList subList = new ArrayList();
        Iterator it = data.iterator();

        while (it.hasNext()) {
            OrgForm var = (OrgForm) it.next();
            if ((var.getOrgId() != form.getOrgId())
                    && var.getParentOrgId() != null
                    && form.getOrgId().toString().equals(var.getParentOrgId().toString())) {

                SimpleTreeNode stn = new SimpleTreeNode(var, getOrgSubList(
                        var, data));
                subList.add(stn);
            }
View Full Code Here


    }

    public void delete() {
        OrgForm var = null;
        objTree = (Tree) getFellow("objTree");
        if (objTree.getSelectedItem() != null) {
            SimpleTreeNode node = (SimpleTreeNode) objTree.getSelectedItem().getValue();
            var = (OrgForm) node.getData();
View Full Code Here

        objTree.setTreeitemRenderer(this);

    }

    private SimpleTreeNode prepareRootNode(List data) {
        OrgForm root = new OrgForm();
        root.setOrgName("");

        ArrayList mother = new ArrayList();

        Iterator it = data.iterator();
        while (it.hasNext()) {
            OrgForm form = (OrgForm) it.next();
            if (form.getParentOrgId() == null) {
                logger.debug("--->>" + form.getOrgId());
                ArrayList subList = getSubList(form, data);
                SimpleTreeNode stn = new SimpleTreeNode(form, subList);
                mother.add(stn);
            }
        }
View Full Code Here

    private ArrayList getSubList(OrgForm form, List data) {
        ArrayList subList = new ArrayList();
        Iterator it = data.iterator();

        while (it.hasNext()) {
            OrgForm var = (OrgForm) it.next();
            if ((var.getOrgId() != form.getOrgId())
                    && var.getParentOrgId() != null
                    && form.getOrgId().toString().equals(var.getParentOrgId().toString())) {

                SimpleTreeNode stn = new SimpleTreeNode(var, getSubList(
                        var, data));
                subList.add(stn);
            }
View Full Code Here

    public void render(Treeitem item, Object data) throws Exception {
        item.setValue(data);

        SimpleTreeNode node = (SimpleTreeNode) data;
        OrgForm var = (OrgForm) node.getData();


        // Construct treecells
        Treecell tcOrgName = new Treecell(var.getOrgName());
        Treecell tcOrgTypeName = new Treecell(var.getOrgTypeName());
        Treecell tcOrgPropertyName = new Treecell(var.getOrgPropertyName());

        /*
         * Since only one treerow is allowed, if treerow is not null, append
         * treecells to it. If treerow is null, contruct a new treerow and
         * attach it to item.
View Full Code Here

    }

    public void select() {
        objTree = (Tree) getFellow("objTree");
        SimpleTreeNode node = (SimpleTreeNode) objTree.getSelectedItem().getValue();
        OrgForm form = (OrgForm) node.getData();

        objToView(form);

    }
View Full Code Here

        objToView(form);

    }

    public void update() {
        OrgForm var = null;
        objTree = (Tree) getFellow("objTree");
        if (objTree.getSelectedItem() != null) {
            SimpleTreeNode node = (SimpleTreeNode) objTree.getSelectedItem().getValue();
            var = (OrgForm) node.getData();
        }

        Org obj = (Org) viewToObj(var);
        Org parentOrg = getById(var.getParentOrgId());
        obj.setOrg(parentOrg);

        OrgDao dao = new OrgDao();
        dao.update(obj);
View Full Code Here

TOP

Related Classes of net.caece.pri.hibernate.vo.OrgForm

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.