Package org.nightlabs.jfire.trade

Examples of org.nightlabs.jfire.trade.OrganisationLegalEntity


    if (customer == null)
      throw new IllegalStateException("order.getCustomer() returned null!");

    PersistenceManager pm = getPersistenceManager();
    Trader trader = Trader.getTrader(pm);
    OrganisationLegalEntity mandator = trader.getMandator();

    if (mandator.equals(customer) && (vendor instanceof OrganisationLegalEntity)) {
      tradeSide = TradeSide.customerCrossOrganisation;
      // TODO: Implement foreign stuff
      throw new UnsupportedOperationException("NYI");
    }
    else {
      if (mandator.equals(vendor))
        tradeSide = TradeSide.vendor;
      else if (mandator.equals(customer))
        tradeSide = TradeSide.customerLocal;
      else
        throw new IllegalStateException("mandator is neither customer nor vendor! order=" + recurringOrder + " mandator=" + mandator);

      offerIDPrefix = getOfferIDPrefix(user, offerIDPrefix);
View Full Code Here


    if (customer == null)
      throw new IllegalStateException("order.getCustomer() returned null!");

    PersistenceManager pm = getPersistenceManager();
    Trader trader = Trader.getTrader(pm);
    OrganisationLegalEntity mandator = trader.getMandator();

    if (mandator.equals(customer) && (vendor instanceof OrganisationLegalEntity)) {
      tradeSide = TradeSide.customerCrossOrganisation;
      // TODO: Implement foreign stuff
      throw new UnsupportedOperationException("NYI");
    }
    else {
      if (mandator.equals(vendor))
        tradeSide = TradeSide.vendor;
      else if (mandator.equals(customer))
        tradeSide = TradeSide.customerLocal;
      else
        throw new IllegalStateException("mandator is neither customer nor vendor! order=" + order + " mandator=" + mandator);

      offerIDPrefix = getOfferIDPrefix(user, offerIDPrefix);
View Full Code Here

  {
    monitor.beginTask("Getting organisation legal entity", 100);
    try {
      String objectID = OrganisationLegalEntity.class + "/" + organisationID;

      OrganisationLegalEntity le = (OrganisationLegalEntity) getCache().get(null, objectID, fetchGroups, maxFetchDepth);
      if (le != null)
        return le;

      TradeManagerRemote tradeManager = JFireEjb3Factory.getRemoteBean(TradeManagerRemote.class, SecurityReflector.getInitialContextProperties());
      le = tradeManager.getOrganisationLegalEntity(organisationID, throwExceptionIfNotExistent, fetchGroups, maxFetchDepth);
View Full Code Here

TOP

Related Classes of org.nightlabs.jfire.trade.OrganisationLegalEntity

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.