Package net.caece.fmII.hibernate

Examples of net.caece.fmII.hibernate.MaintainEventType


    public void onCreate() {
        refreshObjEntities();
    }

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


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

    public void delete() {
        MaintainEventType obj = (MaintainEventType) objListbox.getSelectedItem().getValue();
        MaintainEventTypeDao dao = new MaintainEventTypeDao();
        delete(dao, obj);
    }
View Full Code Here

        MaintainEventTypeDao dao = new MaintainEventTypeDao();
        delete(dao, obj);
    }

    public void objToView(Object obj) {
        MaintainEventType var = (MaintainEventType) obj;
        Combobox systemTypeCB = (Combobox) getFellow("system");
        Textbox maintainEventTypeTB = (Textbox) getFellow("maintainEventType");

        Iterator stItr = systemTypeCB.getItems().iterator();
        while (stItr.hasNext()) {
            Comboitem item = (Comboitem) stItr.next();
            String s = (String) item.getValue();
            if (s.equals(var.getSystemType())) {
                systemTypeCB.setSelectedItem(item);
            }
        }
       
        maintainEventTypeTB.setText(var.getMaintainEventType());

    }
View Full Code Here

    public void refreshObjEntities() {
         refreshObjEntities("MaintainEventType.getAll", objListRenderer);
    }

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

    public boolean validate() {
        return true;
    }

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

        Combobox systemTypeCB = (Combobox) getFellow("system");
        Textbox maintainEventTypeTB = (Textbox) getFellow("maintainEventType");

        var.setSystemType(systemTypeCB.getSelectedItem().getValue().toString());
        var.setMaintainEventType(maintainEventTypeTB.getText());

        return var;
    }
View Full Code Here

            if (maintainEventTypeList != null
                    && maintainEventTypeList.size() != 0) {

                Iterator it = maintainEventTypeList.iterator();
                while (it.hasNext()) {
                    MaintainEventType maintainEventType = (MaintainEventType) it.next();
                    Comboitem item = new Comboitem();
                    item.setValue(maintainEventType);
                    item.setLabel(maintainEventType.getMaintainEventType());
                    item.setParent(maintainEventTypeCB);
                }
            }
        }
    }
View Full Code Here

        if(form.getEventTypeId() != null) {
            List maintainEventTypeItems =  maintainEventTypeCB.getItems();
            Iterator maintainEventTypeItr = maintainEventTypeItems.iterator();
            while(maintainEventTypeItr.hasNext()) {
                Comboitem item = (Comboitem)maintainEventTypeItr.next();
                MaintainEventType maintainEventType = (MaintainEventType)item.getValue();
                if(maintainEventType.getEventTypeId().equals(form.getEventTypeId())) {
                    maintainEventTypeCB.setSelectedItem(item);
                }
            }
        }
View Full Code Here

TOP

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

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.