Package net.caece.pri.hibernate

Examples of net.caece.pri.hibernate.Para


    protected void initComboboxByPara(String comboboxGetFellowName, String paraCatalogue) {
        List paraList = ParaCache.getInstance().getByCatalogue(paraCatalogue);
        Combobox cb = (Combobox) getFellow(comboboxGetFellowName);
        Iterator it = paraList.iterator();
        while (it.hasNext()) {
            Para obj = (Para) it.next();
            Comboitem item = new Comboitem();
            item.setLabel(obj.getParaValue());
            item.setValue(obj.getParaName());
            item.setParent(cb);
        }
    }
View Full Code Here



        List operationChoices = ParaCache.getInstance().getByCatalogue("pri.Fun.operations");
        Iterator it = operationChoices.iterator();
        while (it.hasNext()) {
            Para para = (Para) it.next();
            Checkbox checkbox = new Checkbox();
            checkbox.setId("checkbox_" + para.getParaName());
            checkbox.setValue(para.getParaName());
            checkbox.setLabel(para.getParaValue());

            checkbox.setParent(hbox);
        }

    }
View Full Code Here

            // if bootFlag is Yes, set the fun operations
            List operationsLists = ParaCache.getInstance().getByCatalogue("pri.Fun.operations");
            Iterator it = operationsLists.iterator();
            while (it.hasNext()) {
                Para para = (Para) it.next();
                Checkbox cb = (Checkbox) getFellow("checkbox_" + para.getParaName());
                cb.setChecked(false);

                StringTokenizer operList = new StringTokenizer(form.getOperations(), ":");
                boolean checked = false;
                while (operList.hasMoreTokens()) {
View Full Code Here

        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());
View Full Code Here

    logger.debug("para CB size:" + keyValueList.size());

    Iterator it = keyValueList.iterator();
    while (it.hasNext()) {
        Para p = (Para) it.next();
        Comboitem item = new Comboitem();
        item.setValue(p.getParaName());
        item.setLabel(p.getParaValue());
        logger.debug("-----------------insert data---------->>>>"+ p.getParaName()+
                "  "+p.getParaValue());
        item.setParent(paraCatalogueCB);
    }
}
View Full Code Here

        item.setParent(paraCatalogueCB);
    }
}

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

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

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

        update(dao, obj);
    }

    public void delete() {

        Para obj = (Para) objListbox.getSelectedItem().getValue();
        ParaDao dao = new ParaDao();
        //delete(dao, obj);

        obj = (Para)viewToObj(obj);
        dao.delete(obj);

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

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

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

//         */
        return isValid;
    }

    public Object viewToObj(Object para) {
        Para obj = new Para();

        if (para != null) {
            try {
                BeanUtils.copyProperties(obj, para);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

        obj.setOperateBy(operateBy);

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

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



        return obj;
    }
View Full Code Here

TOP

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

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.