Package net.caece.pri.hibernate

Examples of net.caece.pri.hibernate.Org



    }

    public void objToView(Object obj) {
        Org org = (Org) obj;

        Textbox orgNameTB = (Textbox) getFellow("orgName");
        Combobox orgTypeCB = (Combobox) getFellow("orgType");
        Combobox orgPropertyCB = (Combobox) getFellow("orgProperty");

        orgNameTB.setText(org.getOrgName());
        setSelectedBy(orgTypeCB, org.getOrgType());
        setSelectedBy(orgPropertyCB, org.getOrgProperty());

    }
View Full Code Here


        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

        refreshObjEntities();
    }

    private Org getById(Long orgId) {
        SqlSession sess = IBatisFactory.getInstance().getSqlSession();
        Org org = (Org) sess.selectOne("Org.getById", orgId);
        sess = null;
        return org;
    }
View Full Code Here

    public boolean validate() {
        return true;
    }

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

        var.setOperateBy(operateBy);

        Textbox orgNameTB = (Textbox) getFellow("orgName");
        Combobox orgTypeCB = (Combobox) getFellow("orgType");
        Combobox orgPropertyCB = (Combobox) getFellow("orgProperty");


        var.setOrgName(orgNameTB.getText());
        if (orgTypeCB.getSelectedItem() != null) {
            var.setOrgType(orgTypeCB.getSelectedItem().getValue().toString());
        }

        if (orgPropertyCB.getSelectedItem() != null) {
            var.setOrgProperty(orgPropertyCB.getSelectedItem().getValue().toString());
        }



        return var;
View Full Code Here

        List keyValueList = sess.selectList("Org.getAllCompany");
        sess = null;

        Iterator it = keyValueList.iterator();
        while (it.hasNext()) {
            Org o = (Org) it.next();
            Comboitem item = new Comboitem();
            item.setValue(o);
            item.setLabel(o.getOrgName());

            item.setParent(providerCB);
        }
    }
View Full Code Here

        Combobox providerCB = (Combobox) getFellow("provider");
        Iterator it = providerCB.getItems().iterator();
        while (it.hasNext()) {

            Comboitem item = (Comboitem) it.next();
            Org o = (Org) item.getValue();
            if (o.getOrgId().equals(form.getProviderId())) {
                providerCB.setSelectedItem(item);
            }
        }

        Textbox serviceNameTB = (Textbox) getFellow("serviceName");
View Full Code Here




        while (it.hasNext()) {
            Org s = (Org) it.next();
            Comboitem item = new Comboitem();
            item.setValue(s);
            item.setLabel(s.getOrgName());
            item.setParent(orgIdCB);



View Full Code Here

        Textbox passwdTB = (Textbox) getFellow("passwd");

        Iterator supplierIt = orgIdCB.getItems().iterator();
        while (supplierIt.hasNext()) {
            Comboitem item = (Comboitem) supplierIt.next();
            Org s = (Org) item.getValue();

            logger.debug("" + var.getOrgId() + ", " + s.getOrgId());
            if (var.getOrgId() != null && var.getOrgId() == s.getOrgId()) {
                orgIdCB.setSelectedItem(item);
            }
        }
        userNameTB.setText(var.getUserName());
        accountTB.setText(var.getAccount());
View Full Code Here

        objToView(emptyObj);

        Iterator supplierIt = orgIdCB.getItems().iterator();
        while (supplierIt.hasNext()) {
            Comboitem item = (Comboitem) supplierIt.next();
            Org s = (Org) item.getValue();

            if (queryString != null && queryString.equals(s.getOrgName())) {
                orgIdCB.setSelectedItem(item);
            }
        }

    }
View Full Code Here

TOP

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

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.