Package no.ugland.utransprod.model

Examples of no.ugland.utransprod.model.Transport


  /**
   * @see no.ugland.utransprod.gui.handlers.AbstractViewHandler#getNewObject()
   */
  @Override
  public Transport getNewObject() {
    return new Transport();
  }
View Full Code Here


    sentDate = checkLoadingDate(aWindow, sentDate,
        ((TransportModel) transportPresentationModel.getBean())
            .getObject());
    if (listTransportable.size() != 0) {
      Transport transport = ((Transportable) listTransportable.get(0))
          .getTransport();
      checkIfTransportableHasSupplier(transport);

      isCanceled = showOrders(aWindow, sentTransport, sentDate,
          listTransportable);
View Full Code Here

   */
  @Override
  public boolean doDelete(WindowInterface window) {
    boolean returnValue = true;

    Transport transport = ((TransportModel) transportPresentationModel
        .getBean()).getObject();

    if (transport != null) {
      ((TransportManager) overviewManager).lazyLoadTransport(transport,
          new LazyLoadTransportEnum[] { LazyLoadTransportEnum.ORDER,
              LazyLoadTransportEnum.ORDER_LINES });
      if (transport.getOrders() != null
          && transport.getOrders().size() != 0) {
        Util.showErrorDialog(window, "Kan ikke slette",
            "Kan ikke slette transport som inneholder ordre");
        returnValue = false;
      } else {
        overviewManager.removeObject(transport);
View Full Code Here

   */
  @SuppressWarnings("unchecked")
  @Override
  public TransportModel getBufferedObjectModel(
      PresentationModel presentationModel) {
    TransportModel transportModel = new TransportModel(new Transport());
    transportModel.setTransportId((Integer) presentationModel
        .getBufferedValue(PROPERTY_TRANSPORT_ID));
    transportModel.setTransportName((String) presentationModel
        .getBufferedValue(PROPERTY_TRANSPORT_NAME));
    transportModel.setTransportWeek((Integer) presentationModel
View Full Code Here

  /**
   * @param transport
   */
  public void setTransport(Transport transport) {
    Transport oldTransport = getTransport();
    object.setTransport(transport);
    firePropertyChange(PROPERTY_TRANSPORT, oldTransport, transport);
  }
View Full Code Here

    if (order == null || head == null) {
      return null;
    }
    String transportDate = null;
    if (order.getTransport() != null) {
      Transport transport = order.getTransport();
      transportDate = transport.getLoadingDate() != null ? Util.DATE_FORMAT_YYYYMMDD
          .format(transport.getLoadingDate())
          : Util.getLastFridayAsString(transport.getTransportYear(),
              transport.getTransportWeek());
    }

    return writeFile(order.getOrderNr(), outdir, Lists.newArrayList(head
        .getHeadLine(transportDate)));
  }
View Full Code Here

  public void skalLageVismaFilForOrdreUtenLeveringsdatoOgUtenTransportAarOGUke()
      throws IOException, ParseException {
    VismaFileCreatorImpl vismaFileCreator = new VismaFileCreatorImpl(null,
        false);
    Order ordre = new Order();
    Transport transport = new Transport();
    ordre.setTransport(transport);
    OrdchgrHeadV head = new OrdchgrHeadV();
    head.setOrdNo(1);
    String fileName = vismaFileCreator.createTransportFile(ordre, head,
        "visma");
View Full Code Here

  public void skalLageVismaFilForLeveringsdato() throws IOException,
      ParseException {
    VismaFileCreatorImpl vismaFileCreator = new VismaFileCreatorImpl(null,
        false);
    Order ordre = new Order();
    Transport transport = new Transport();
    transport.setLoadingDate(Util.DATE_FORMAT_YYYYMMDD.parse("20110929"));
    ordre.setTransport(transport);
    OrdchgrHeadV head = new OrdchgrHeadV();
    head.setOrdNo(1);
    String fileName = vismaFileCreator.createTransportFile(ordre, head,
        "visma");
View Full Code Here

  @Test
  public void skalBeregneTransportkostnad() throws Exception {
    Periode periode = new Periode(YEAR, WEEK_50, WEEK_50);
    String productAreaGroupName = "Garasje";
    Transport transport = new Transport();
    transport.setSent(new Date());
    Supplier supplier = new Supplier();
    transport.setSupplier(supplier);
    Order order = new Order();
    order.setSent(new Date());
    order.setPostalCode("4841");
    ProductArea productArea = new ProductArea();
    ProductAreaGroup productAreaGroup = new ProductAreaGroup();
    productAreaGroup.setProductAreaGroupName(productAreaGroupName);
    productArea.setProductAreaGroup(productAreaGroup);
    order.setProductArea(productArea);
    transport.addOrder(order);
    List<Transport> transportList = Lists.newArrayList(transport);
    when(transportManager.findInPeriode(periode, productAreaGroupName))
        .thenReturn(transportList);
    TransportCost transportCost=new TransportCost();
    transportCost.setCost(BigDecimal.valueOf(1000));
View Full Code Here

    assertEquals(true, transportList.size() != 0);
  }

  @Test
  public void testInsert() {
    transport = new Transport();
    transport.setTransportWeek(1);
    transport.setTransportYear(2006);
    transport.setTransportName("TestTur");
    transportManager.saveTransport(transport);
  }
View Full Code Here

TOP

Related Classes of no.ugland.utransprod.model.Transport

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.