Package net.caece.fmII.hibernate

Examples of net.caece.fmII.hibernate.Building


     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        SqlSession sess = IBatisFactory.getInstance().getSqlSession();
        Building b = (Building)sess.selectOne("Building.getByBuildingId", new Long("232"));
        sess = null;

        System.out.println("------>>"+b.getBuildingName());


    }
View Full Code Here


        dao = null;

        refreshObjEntities();

        for (int i = 0; i < objListModel.getSize(); i++) {
            Building var = (Building) objListModel.getElementAt(i);
            if (var.equals(obj)) {
                objListbox.setSelectedIndex(i);
                return;
            }
        }
View Full Code Here

        refreshObjEntities();

        // set new object is selected in objListbox
        for (int i = 0; i < objListModel.getSize(); i++) {
            Building var = (Building) objListModel.getElementAt(i);
            if (var.equals(obj)) {
                objListbox.setSelectedIndex(i);
                return;
            }
        }
View Full Code Here

        dao = null;

        refreshObjEntities();

        // empty all fields
        Building emptyObj = new Building();
        objToView(emptyObj);


        // do the slave table work
        subListbox = (Listbox) getFellow("docListbox");
View Full Code Here

        para.put("buildingName", queryString);

        refreshObjEntities(para);

        // empty all fields , except the query condition field
        Building emptyObj = new Building();
        objToView(emptyObj);
        buildingNameTextbox.setText(queryString);

    }
View Full Code Here

        buildingList = null;
    }

    public Object viewToObj(Object obj) {
        Building building;
        if (obj != null) {
            building = (Building) obj;
        } else {
            building = new Building();
        }

        Textbox buildingNameTextbox = (Textbox) this.getFellow("buildingNameTextbox");
        Textbox buildingZipTextbox = (Textbox) this.getFellow("buildingZipTextbox");
        Textbox buildingAddressTextbox = (Textbox) this.getFellow("buildingAddressTextbox");

        building.setBuildingName(buildingNameTextbox.getText());
        building.setBuildingZip(buildingZipTextbox.getText());
        building.setBuildingAddress(buildingAddressTextbox.getText());
        building.setOperateBy(operateBy);

        return building;
    }
View Full Code Here

        return building;
    }

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

        Textbox buildingNameTextbox = (Textbox) this.getFellow("buildingNameTextbox");
        Textbox buildingZipTextbox = (Textbox) this.getFellow("buildingZipTextbox");
        Textbox buildingAddressTextbox = (Textbox) this.getFellow("buildingAddressTextbox");

        buildingNameTextbox.setValue(var.getBuildingName());
        buildingZipTextbox.setValue(var.getBuildingZip());
        buildingAddressTextbox.setValue(var.getBuildingAddress());

    }
View Full Code Here

        this.refreshSubListbox(obj);
    }

    public void refreshSubListbox(Object obj) {
        Building var = (Building) obj;
        subListbox = (Listbox) getFellow("docListbox");

        SqlSession sess = IBatisFactory.getInstance().getSqlSession();
        List buildingDocList = sess.selectList("Building.findByBuildingId", var.getBuildingId());
        sess = null;

        subListModel = new ListModelList(buildingDocList, true);
        subListbox.setModel(subListModel);
        subListbox.setItemRenderer(buildingDocListRenderer);
View Full Code Here

        objListbox = (Listbox) getFellow("buildingList");

        int selected = 0;
        for (int i = 0; i < objListbox.getItemCount(); i++) {
            Building var = (Building) objListbox.getModel().getElementAt(i);

            if (var.getBuildingId().equals(building.getBuildingId())) {
                selected = i;
            }
        }
        return selected;
    }
View Full Code Here

        sess = null;

        Combobox buildingCB = (Combobox) getFellow("building");
        Iterator it = buildingList.iterator();
        while (it.hasNext()) {
            Building building = (Building) it.next();
            Comboitem item = new Comboitem();
            item.setValue(building);
            item.setLabel(building.getBuildingName());
            item.setParent(buildingCB);
        }
    }
View Full Code Here

TOP

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

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.