Package net.caece.fmII.hibernate

Examples of net.caece.fmII.hibernate.Parameter


        List keyValueList = ParameterCache.getInstance().getCache("meta");


        Iterator it = keyValueList.iterator();
        while (it.hasNext()) {
            Parameter p = (Parameter) it.next();
            Comboitem item = new Comboitem();
            item.setValue(p.getParaName());
            item.setLabel(p.getParaValue());
            item.setParent(paraCatalogueCB);
        }
    }
View Full Code Here


            item.setParent(paraCatalogueCB);
        }
    }

    public void add() {
        Parameter obj = (Parameter) viewToObj(null);
        ParameterDao dao = new ParameterDao();
        add(dao, obj);
    }
View Full Code Here

        ParameterDao dao = new ParameterDao();
        add(dao, obj);
    }

    public void update() {
        Parameter obj = (Parameter) objListbox.getSelectedItem().getValue();
        ParameterDao dao = new ParameterDao();
        update(dao, obj);
    }
View Full Code Here

        update(dao, obj);
    }

    public void delete() {

        Parameter obj = (Parameter) objListbox.getSelectedItem().getValue();
        ParameterDao dao = new ParameterDao();
        delete(dao, obj);

        // empty all fields
        Parameter emptyObj = new Parameter();
        objToView(emptyObj);
    }
View Full Code Here

        Map para = new HashMap();
        para.put("paraCatalogue", queryString);
        refreshObjEntities(para);

        // empty all fields , except the query condition field
        Parameter emptyObj = new Parameter();
//       objToView(emptyObj);
    }
View Full Code Here

        return isValid;
    }

    public Object viewToObj(Object obj) {
        Parameter var = new Parameter();

        if (obj != null) {
            try {
                BeanUtils.copyProperties(var, obj);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        Combobox paraCatalogueCB = (Combobox) getFellow("paraCatalogue");
        Textbox paraNameTB = (Textbox) getFellow("paraName");
        Textbox paraValueTB = (Textbox) getFellow("paraValue");
        Textbox paraI18nTB = (Textbox) getFellow("paraI18n");

        var.setParaCatalogue(paraCatalogueCB.getSelectedItem().getValue().toString());
        var.setParaName(paraNameTB.getText());
        var.setParaValue(paraValueTB.getText());
        var.setParaI18n(paraI18nTB.getText());

        return var;
    }
View Full Code Here

        return var;
    }

    public void objToView(Object obj) {
        Parameter var = (Parameter) obj;

        Combobox paraCatalogueCB = (Combobox) getFellow("paraCatalogue");
        Textbox paraNameTB = (Textbox) getFellow("paraName");
        Textbox paraValueTB = (Textbox) getFellow("paraValue");
        Textbox paraI18nTB = (Textbox) getFellow("paraI18n");


        List items = paraCatalogueCB.getItems();
        Iterator it = items.iterator();
        while (it.hasNext()) {
            Comboitem item = (Comboitem) it.next();
            if (var.getParaCatalogue().equals(item.getValue().toString())) {
                paraCatalogueCB.setSelectedItem(item);
            }

        }
        paraNameTB.setText(var.getParaName());
        paraValueTB.setText(var.getParaValue());
        paraI18nTB.setText(var.getParaI18n());

    }
View Full Code Here

TOP

Related Classes of net.caece.fmII.hibernate.Parameter

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.