Package net.caece.fmII.hibernate

Examples of net.caece.fmII.hibernate.Building


        if(form.getBuildingId() != null) {
            List items =  buildingCB.getItems();
            Iterator buildingItr = items.iterator();
            while(buildingItr.hasNext()) {
                Comboitem item = (Comboitem)buildingItr.next();
                Building building = (Building)item.getValue();

                if(building.getBuildingId().equals(form.getBuildingId())) {
                    buildingCB.setSelectedItem(item);
                }
            }
        }
View Full Code Here


        if(buildingCB.getSelectedItem() == null) {
            this.showMsg("查詢前要設定建物設施名稱", "錯誤的操作");
            return;
        }
        Comboitem item = (Comboitem)buildingCB.getSelectedItem();
        Building building = (Building)item.getValue();
        Long buildingId = building.getBuildingId();

        Map para = new HashMap();
        para.put("buildingId", buildingId);

       refreshObjEntities(para);
View Full Code Here

         
    }
   
    public void selectBomByBuilding() {
        Listbox buildingListboxLB = (Listbox) getFellow("buildingListbox");
        Building building = (Building) buildingListboxLB.getSelectedItem().getValue();
        Map para = new HashMap();
        para.put("buildingId", building.getBuildingId());

        refreshObjEntities(para);
       
        changeBuilding(building);
    }
View Full Code Here

        Textbox regionTB = (Textbox) getFellow("region");
        Combobox priorityCB = (Combobox) getFellow("priority");
        Textbox propertyCodeTB = (Textbox) getFellow("propertyCode");
        Textbox descriptionTB = (Textbox) getFellow("description");

        Building building = (Building) buildingListbox.getSelectedItem().getValue();
        var.setBuilding(building);

        Equipment equ = (Equipment) equipmentCB.getSelectedItem().getValue();
        var.setEquipment(equ);
View Full Code Here


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

        requestMaintainNoTB.setText(form.getRequestMaintainNo());
        Iterator buildingCBItr = buildingCB.getItems().iterator();
        while (buildingCBItr.hasNext()) {
            Comboitem item = (Comboitem) buildingCBItr.next();
            Building building = (Building) item.getValue();
            if (building.getBuildingId().toString().equals(form.getBuildingId().toString())) {
                buildingCB.setSelectedItem(item);
            }
        }
        requestReasonTB.setText(form.getRequestReason());
        firstResponseAtDate.setValue(form.getFirstResponseAt());
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

            @Context HttpServletResponse servletResponse) throws IOException {

        BuildingDao dao = new BuildingDao();


        Building b = new Building();

        String newBuildingName = URLDecoder.decode(buildingName, "UTF-8");
        b.setBuildingName(newBuildingName);

        dao.create(b);

        URI uri = uriInfo.getAbsolutePathBuilder().path(b.getBuildingId().toString()).build();
        Response.created(uri).build();

        servletResponse.sendRedirect("../pages/new_building.html");
    }
View Full Code Here

    @GET
    @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
    public Building getBuilding() {
        SqlSession sess = IBatisFactory.getInstance().getSqlSession();
        Building b = (Building) sess.selectOne("Building.getByBuildingId", new Long(buildingIdStr));
        sess = null;
        if (b == null) {
            throw new NotFoundException("No such Building.");
        }
        return b;
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.