Package com.vst.model

Examples of com.vst.model.ConstructionType


      return dao.getConstructionExamplesForTable(objectId, typeId);
    }

    public void makeNotNull(ConstructionExample constructionExample){
        if(constructionExample.getConstructionType()==null){
            constructionExample.setConstructionType(new ConstructionType());
        }
        if(constructionExample.getDangerCategory()==null){
            constructionExample.setDangerCategory(new DangerCategory());
        }
        if(constructionExample.getRecommendedDangerCategory()==null){
View Full Code Here



                //checking defect varities
        List constructionTypeList = defectType.getConstructionTypes();
        for (int i = 0; i < constructionTypeList.size(); i++) {
            ConstructionType constructionType = (ConstructionType) constructionTypeList.get(i);
            if (constructionType.getConstructionTypeId().equals(new Long(-1))) {
                errors.rejectValue("constructionTypes[" + i + "]", "defectType.noConstructionType");
            }
        }

        if (!defectTypeManager.isUniqueDefectType(defectType)) {
View Full Code Here

        return ConstructionType.class.isAssignableFrom(candidate);
    }

    public void validate(Object obj, Errors errors) {

        ConstructionType constructionType = (ConstructionType) obj;

        //checking if the ibject type is correct
        if (constructionType.getMaterial().getMaterialId().equals(new Long(-1))) {
            errors.rejectValue("material", "constructionType.noMaterial");
        }

        //checking defect zones
        List defectZones = constructionType.getDefectZones();

        for (int i = 0; i < defectZones.size(); i++) {
            DefectZone defectZone = (DefectZone) defectZones.get(i);
            if (defectZone.getDefectZoneId().equals(new Long(-1))) {
                errors.rejectValue("defectZones[" + i + "]", "constructionType.noDefectZone");
View Full Code Here

          new HashMap<Integer, ObjectConstruction>();
        for (Object o : crows) {
          Object[] cols = (Object[]) o;
          ObjectConstruction oc = new ObjectConstruction(
              (Integer) cols[0],
              (String) cols[1], new ConstructionType());
          oc.setObjectId((Integer) cols[2]);
//          oc.setConstructionExamples(new ArrayList<ConstructionExample>());
          coMap.put(oc.getTypeId(), oc);
          Material m = new Material();
          m.setMaterialId((Integer) cols[3]);
          m.setMaterialName((String) cols[4]);

          ConstructionType ct = oc.getConstructionType();
          ct.setConstructionTypeId((Integer) cols[5]);
          ct.setName((String) cols[6]);

           oc.setNumberInObject(getExampleNumberByConstructionType(oc.getTypeId().toString(),oc.getObjectId().toString()).intValue());
            //System.out.println("NIO:"+oc.getNumberInObject()); 
      
          BuildingObject bo = ceMap.get(oc.getObjectId());
View Full Code Here

TOP

Related Classes of com.vst.model.ConstructionType

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.