Package no.ugland.utransprod

Examples of no.ugland.utransprod.ProTransException


    List<Transport> transports = transportManager.findInPeriode(periode,
        "Garasje");
    if (transports != null) {
      for (Transport transport : transports) {
        if (transport.getSent() == null) {
          throw new ProTransException("Transport " + transport
              + " er ikke satt til sendt");
        }
        transportableList.addAll(getTransportables(transport));
      }
    }
View Full Code Here


    List<Transportable> transportables = transport.getTransportables();
    List<Transportable> returnTransportables = new ArrayList<Transportable>();
    if (transportables != null) {
      for (Transportable transportable : transportables) {
        if (transportable.getSent() == null) {
          throw new ProTransException("Ordre " + transportable
              + " er ikke sendt");
        }
        if (transportable.getProductAreaGroup()
            .getProductAreaGroupName().equalsIgnoreCase("Garasje")) {
          returnTransportables.add(transportable);
View Full Code Here

    String areaCode = excelUtil.readCell(row,
        COLUMN_TRANSPORT_COST_AREA_CODE, "%1$04.0f");

    Area area = areaManager.load(areaCode);
    if (area == null) {
      throw new ProTransException("Kommunenr " + areaCode
          + " finnes ikke!");
    }
    transportCost.setArea(area);

    transportCost.setValid(1);
View Full Code Here

      transportCostBasisManager
          .saveTransportCostBasis(transportCostBasis);

      for (Transportable transportable : transportables) {
        if (transportable.getSent() == null) {
          throw new ProTransException("Ordre " + transportable
              + " er ikke satt til sendt");
        }
        checkTransportableAndCalculateCost(supplier, period,
            transportCostBasis, transportable);
      }
View Full Code Here

  private CostType getCostType() throws ProTransException {
    if (costType == null) {
      costType = costTypeManager.findByName("Fraktkost");
      if (costType == null) {
        throw new ProTransException(
            "Kan ikke finne kostnadstype Fraktkost");
      }
    }
    return costType;
  }
View Full Code Here

  private CostUnit getCostUnit() throws ProTransException {
    if (costUnit == null) {
      costUnit = costUnitManager.findByName("Intern");
      if (costUnit == null) {
        throw new ProTransException(
            "Kan ikke finne kostnadsenhet Intern");
      }
    }
    return costUnit;
  }
View Full Code Here

  private Supplier getSupplierForTransportable(
      final Transportable transportable) throws ProTransException {
    Supplier supplier = transportable.getTransport().getSupplier();
    if (supplier == null) {
      throw new ProTransException("Order " + transportable
          + " mangler transport�r");
    }
    return supplier;
  }
View Full Code Here

    County county;
    if (areaCode != null && areaCode.length() > 2) {
      String countyNr = areaCode.substring(0, 2);
      county = countyManager.load(countyNr);
      if (county == null) {
        throw new ProTransException("Fylkesnr " + countyNr
            + " finnes ikke");
      }
      area.setCounty(county);
    } else {
      throw new ProTransException("Feil kommunenr " + areaCode);
    }
    area.setAreaCode(areaCode);
    area.setAreaName(excelUtil.readCell(row, COLUMN_AREA_AREA_NAME, null));
    areaManager.saveArea(area);
  }
View Full Code Here

      if (area == null) {
        area = new Area();
        String countyNr = areaCode.substring(0, 2);
        county = countyManager.load(countyNr);
        if (county == null) {
          throw new ProTransException("Fylkesnr " + countyNr
              + " finnes ikke");
        }
        area.setCounty(county);
        area.setAreaCode(areaCode);
      }

      area.setSnowloadBasicValue(excelUtil.readCellAsBigDecimal(row,
          COLUMN_AREA_SNOWLOAD_BASIC_VALUE));
      area.setHeightLimit(excelUtil.readCellAsInteger(row,
          COLUMN_AREA_HEIGHT_LIMIT));
      area.setDeltaSnowload(excelUtil.readCellAsBigDecimal(row,
          COLUMN_AREA_DELTA_SNOWLOAD));
      area.setSnowloadMax(excelUtil.readCellAsBigDecimal(row,
          COLUMN_AREA_SNOWLOAD_MAX));
      area.setSnowloadComment(excelUtil.readCell(row,
          COLUMN_AREA_SNOWLOAD_COMMENT, null));
    } else {
      throw new ProTransException("Feil kommunenr " + areaCode);
    }

    areaManager.saveArea(area);

  }
View Full Code Here

        if (takstolArticleType == ArticleType.UNKNOWN) {
            ArticleTypeManager articleTypeManager = (ArticleTypeManager) ModelUtil
                    .getBean(ArticleTypeManager.MANAGER_NAME);
            takstolArticleType = articleTypeManager.findByName(Util.getTakstolArticleName());
            if (takstolArticleType.getProdCatNo() == null) {
                throw new ProTransException("Takstolartikkel har ikke produktkategori satt");
            }
        }
    }
View Full Code Here

TOP

Related Classes of no.ugland.utransprod.ProTransException

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.