Package com.vst.model

Examples of com.vst.model.ObjectConstruction


        request = newGet("/editObjectConstruction.html");
        request.addParameter("typeId", "1");

        mv = c.handleRequest(request, new MockHttpServletResponse());

        ObjectConstruction objectConstruction = (ObjectConstruction) mv.getModel().get(c.getCommandName());
        assertNotNull(objectConstruction);
        request = newPost("/editObjectConstruction.html");
        super.objectToRequestParameters(objectConstruction, request);

        // update the form's fields and add it back to the request
View Full Code Here


      for (int i = 0; i < buildingObjects.size(); i++) {
            BuildingObject buildingObject = (BuildingObject) buildingObjects.get(i);
            List<?> objectConstructionList =  buildingObject.getConstructionTypes();
              // OLD buildingObjectManager.getConstructionTypesForTree(buildingObject);
            for (int j = 0; j < objectConstructionList.size(); j++) {
                ObjectConstruction objectConstruction = (ObjectConstruction) objectConstructionList.get(j);
                objectConstruction.setBriefDescription(reduceDescription(objectConstruction.getDescription()));
//                objectConstruction.setConstructionExamples(
//                        constructionExampleManager.getConstructionExamplesLite(
//                                objectConstruction.getTypeId().toString(), "tree"));
            }
//            buildingObject.setConstructionTypes(objectConstructionList);
View Full Code Here


    public List getListForObjectConstructionPage(Integer objectId){
        List objectConstructionList=super.getSession().createQuery("select new ObjectConstruction(typeId,objectId,numberInObject,description,constructionType) from ObjectConstruction objConstruction where objConstruction.objectId=?").setString(0,String.valueOf(objectId)).list();
        for (int i = 0; i < objectConstructionList.size(); i++) {
            ObjectConstruction objectConstruction = (ObjectConstruction) objectConstructionList.get(i);
            objectConstruction.setDocumentationQuestions(super.getSession().createQuery("from ObjectAnswer where objectConstructionId=?").setString(0, String.valueOf(objectConstruction.getTypeId())).list());
        }
        return objectConstructionList;
    }
View Full Code Here

    /**
     * @see com.vst.dao.ObjectConstructionDao#getObjectConstruction(Integer typeId)
     */
    public ObjectConstruction getObjectConstruction(final Integer typeId) {
        ObjectConstruction objectConstruction = (ObjectConstruction) getObject( typeId);
        return objectConstruction;
    }
View Full Code Here

    /**
     * @see com.vst.dao.ObjectConstructionDao#removeObjectConstruction(Integer typeId)
     */
    public void removeObjectConstruction(final Integer typeId) {
        ObjectConstruction objectConstruction=getObjectConstruction(typeId);
        removeEntity(objectConstruction);
        //TODO find out the real solution for updating index positions
        super.getSession().createQuery("update ObjectConstruction set typePosition=typePosition-1 where objectId=? AND typePosition>?").setString(0,String.valueOf(objectConstruction.getObjectId())).setString(1,String.valueOf(objectConstruction.getTypePosition())).executeUpdate();
    }
View Full Code Here

        super.getSession().createQuery("update ObjectConstruction set typePosition=typePosition-1 where objectId=? AND typePosition>?").setString(0,String.valueOf(objectConstruction.getObjectId())).setString(1,String.valueOf(objectConstruction.getTypePosition())).executeUpdate();
    }

  public Blob getObjectConstructionImage(Integer typeId, String imageFldName) {
    String hql;
    ObjectConstruction objectConstruction;
    if ("eskiz".equalsIgnoreCase(imageFldName)) {
      hql = "select esckizBlob from ObjectConstruction where typeId=?";

    } else if ("deefectmap".equalsIgnoreCase(imageFldName)) {
      hql = "select defectMapBlob from ObjectConstruction  where typeId=?";
View Full Code Here

                constructionExample.getExampleDefects().remove(constructionDefect);
                constructionExampleManager.saveConstructionExample(constructionExample);
                request.getSession().setAttribute("madeChanges", new Boolean(true));
                request.setAttribute("message", bundle.getString("constructionDefect.deleted"));

                ObjectConstruction objectConstruction = objectConstructionManager.getObjectConstruction(constructionExample.getObjectConstructionId().toString());
        try {
          doDeleteDefectSymbols(request, objectConstruction.getWayToDefectMap(),
              constructionDefect);
        } catch (IOException e) {

        }
View Full Code Here

            if (constructionExample != null) {
             request.getSession().setAttribute("constructionExampleName", (constructionExample.getExampleName() == null || constructionExample.getExampleName().trim().equals("")) ? String.valueOf(constructionExample.getExampleNumber()) : constructionExample.getExampleName());
             System.out.println("CENRef"+constructionExample.getObjectConstructionId()+constructionExample);
             request.getSession().setAttribute("constructionExampleNameRef", "constructionExamples.html?exampleId=" + constructionExample.getExampleId() + "&typeId=" + constructionExample.getObjectConstructionId());

             ObjectConstruction objectConstruction = objectConstructionManager.getObjectConstructionForBreadCrump(String.valueOf(constructionExample.getObjectConstructionId()));
             if (objectConstruction != null) {
              //objectConstructionManager.evict(objectConstruction);
               request.getSession().setAttribute("constructionTypeName", objectConstruction.getConstructionType().getName() );
               request.getSession().setAttribute("constructionTypeNameRef", "objectConstructions.html?typeId=" + objectConstruction.getTypeId() + "&objectId=" + objectConstruction.getObjectId());
               //Integer buildingObjectId = objectConstruction.getObjectId();

               //setting the object to the context
               BuildingObject buildingObject = buildingObjectManager.getBuildingObjectForBreadCrump(objectConstruction.getObjectId().toString());
               if (buildingObject != null) {
                //buildingObjectManager.evict(buildingObject);
                request.getSession().setAttribute("buildingObjectName", buildingObject.getName());
                request.getSession().setAttribute("buildingObjectNameRef", "buildingObjects.html?objectId=" + buildingObject.getObjectId());
               }
View Full Code Here

      for (int i = 0; i < buildingObjects.size(); i++) {
            BuildingObject buildingObject = (BuildingObject) buildingObjects.get(i);
            List<?> objectConstructionList =  buildingObject.getConstructionTypes();
              // OLD buildingObjectManager.getConstructionTypesForTree(buildingObject);
            for (int j = 0; j < objectConstructionList.size(); j++) {
                ObjectConstruction objectConstruction = (ObjectConstruction) objectConstructionList.get(j);
                objectConstruction.setBriefDescription(reduceDescription(objectConstruction.getDescription()));
//                objectConstruction.setConstructionExamples(
//                        constructionExampleManager.getConstructionExamplesLite(
//                                objectConstruction.getTypeId().toString(), "tree"));
            }
//            buildingObject.setConstructionTypes(objectConstructionList);
View Full Code Here

        for (int i = 0; i < buildingObjects.size(); i++) {
              BuildingObject buildingObject = (BuildingObject) buildingObjects.get(i);
              List<?> objectConstructionList =  buildingObject.getConstructionTypes();
                // OLD buildingObjectManager.getConstructionTypesForTree(buildingObject);
              for (int j = 0; j < objectConstructionList.size(); j++) {
                  ObjectConstruction objectConstruction = (ObjectConstruction) objectConstructionList.get(j);
                  objectConstruction.setBriefDescription(reduceDescription(objectConstruction.getDescription()));
//                  objectConstruction.setConstructionExamples(
//                          constructionExampleManager.getConstructionExamplesLite(
//                                  objectConstruction.getTypeId().toString(), "tree"));
              }
//              buildingObject.setConstructionTypes(objectConstructionList);
View Full Code Here

TOP

Related Classes of com.vst.model.ObjectConstruction

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.