} catch (Exception e) { return 4;
    private int checking() {        String equipmentName = getEquipmentName();        if (equipmentName == null || "".equals(equipmentName))            return 1;        try {	        if (type == ElementDao.TYPE_MATERIAL) {	            MaterialFilter filter = new MaterialFilter();	            filter.setName(equipmentName);	            if (DaoManager.getElementDao().getMaterials(filter).size() > 0)	                return 2;	        } else if (type == ElementDao.TYPE_ROOM) {	            RoomFilter filter = new RoomFilter();	            filter.setName(equipmentName);	            if (DaoManager.getElementDao().getRooms(filter).size() > 0)	                return 3;	        }        } catch (Exception e) {            return 4;        }        return 0;    }