Package org.nightlabs.jfire.store

Examples of org.nightlabs.jfire.store.StoreManagerRemote


    monitor.beginTask("Loading ArticleContainers", 1);
    try {
      if (!articleContainerIDs.isEmpty()) {
        ArticleContainerID articleContainerID = articleContainerIDs.iterator().next();
        if (articleContainerID instanceof DeliveryNoteID) {
          StoreManagerRemote sm = JFireEjb3Factory.getRemoteBean(StoreManagerRemote.class, SecurityReflector.getInitialContextProperties());
          Set<DeliveryNoteID> deliveryNoteIDs = CollectionUtil.castSet(articleContainerIDs);
          return sm.getDeliveryNotes(deliveryNoteIDs, fetchGroups, maxFetchDepth);
        }
        if (articleContainerID instanceof InvoiceID) {
          AccountingManagerRemote am = JFireEjb3Factory.getRemoteBean(AccountingManagerRemote.class, SecurityReflector.getInitialContextProperties());
          Set<InvoiceID> invoiceIDs = CollectionUtil.castSet(articleContainerIDs);
          return am.getInvoices(invoiceIDs, fetchGroups, maxFetchDepth);
        }
        if (articleContainerID instanceof OfferID) {
          TradeManagerRemote tm = JFireEjb3Factory.getRemoteBean(TradeManagerRemote.class, SecurityReflector.getInitialContextProperties());
          Set<OfferID> offerIDs = CollectionUtil.castSet(articleContainerIDs);
          return tm.getOffers(offerIDs, fetchGroups, maxFetchDepth);
        }
        if (articleContainerID instanceof OrderID) {
          TradeManagerRemote tm = JFireEjb3Factory.getRemoteBean(TradeManagerRemote.class, SecurityReflector.getInitialContextProperties());
          Set<OrderID> orderIDs = CollectionUtil.castSet(articleContainerIDs);
          return tm.getOrders(orderIDs, fetchGroups, maxFetchDepth);
        }
        if (articleContainerID instanceof ReceptionNoteID) {
          StoreManagerRemote sm = JFireEjb3Factory.getRemoteBean(StoreManagerRemote.class, SecurityReflector.getInitialContextProperties());
          Set<ReceptionNoteID> receptionNoteIDs = CollectionUtil.castSet(articleContainerIDs);
          return sm.getReceptionNotes(receptionNoteIDs, fetchGroups, maxFetchDepth);
        }
      }
      return null;
    } catch (Exception e) {
      monitor.setCanceled(true);
View Full Code Here

TOP

Related Classes of org.nightlabs.jfire.store.StoreManagerRemote

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.