java.lang.Object
de.hybris.platform.sap.sapordermgmtbol.transaction.order.businessobject.impl.PartnerListImpl
All Implemented Interfaces:
PartnerList, Serializable, Cloneable, Iterable<Map.Entry<String,PartnerListEntry>>

public class PartnerListImpl extends Object implements PartnerList
List of business partners and their partner functions.
See Also:
  • Constructor Details

    • PartnerListImpl

      public PartnerListImpl()
      Creates a new PartnerList object.
  • Method Details

    • setGenericFactory

      public void setGenericFactory(GenericFactory genericFactory)
      Parameters:
      genericFactory - Factory to access SAP session beans
    • createPartnerListEntry

      public PartnerListEntry createPartnerListEntry()
      Creates an empty PartnerListEntryData for the basket.
      Specified by:
      createPartnerListEntry in interface PartnerList
      Returns:
      PartnerListEntry which can added to the partnerList
    • createPartnerListEntry

      public PartnerListEntry createPartnerListEntry(TechKey partnerGUID, String partnerId)
      Creates a initialised PartnerListEntryData for the basket.
      Specified by:
      createPartnerListEntry in interface PartnerList
      Parameters:
      partnerGUID - techkey of the business partner
      partnerId - id of the business partner
      Returns:
      PartnerListEntry which can added to the partnerList
    • getPartnerData

      public PartnerListEntry getPartnerData(String bpRole)
      Get the business partner for the given partner function(role).
      Specified by:
      getPartnerData in interface PartnerList
      Parameters:
      bpRole - Name of the partner function
      Returns:
      PartnerListEntryData of the business partner, with the given partner function (role) or null if not found
    • getSoldTo

      public PartnerListEntryImpl getSoldTo()
      Convenience method to Get the soldto business partner, or null, if not available
      Returns:
      PartnerListEntry of the soldTo business partner, or null if not found
    • getSoldToData

      public PartnerListEntry getSoldToData()
      Convenience method to Get the soldto business partner, or null, if not available
      Specified by:
      getSoldToData in interface PartnerList
      Returns:
      PartnerListEntryData of the soldTo business partner, or null if not found
    • getReseller

      public PartnerListEntryImpl getReseller()
      Convenience method to Get the reseller business partner, or null, if not available
      Returns:
      PartnerListEntry of the reseller business partner, or null if not found
    • getResellerData

      public PartnerListEntry getResellerData()
      Convenience method to Get the reseller business partner, or null, if not available
      Specified by:
      getResellerData in interface PartnerList
      Returns:
      PartnerListEntryData of the reseller business partner, or null if not found
    • getContact

      public PartnerListEntryImpl getContact()
      Convenience method to Get the contact business partner, or null, if not available
      Returns:
      PartnerListEntry of the contact business partner, or null if not found
    • getContactData

      public PartnerListEntry getContactData()
      Convenience method to Get the contact business partner, or null, if not available
      Specified by:
      getContactData in interface PartnerList
      Returns:
      PartnerListEntry of the contact business partner, or null if not found
    • getSoldFrom

      public PartnerListEntryImpl getSoldFrom()
      Convenience method to Get the soldfrom business partner, or null, if not available
      Returns:
      PartnerListEntry of the soldfrom business partner, or null if not found
    • getSoldFromData

      public PartnerListEntry getSoldFromData()
      Convenience method to Get the soldfrom business partner, or null, if not available
      Specified by:
      getSoldFromData in interface PartnerList
      Returns:
      PartnerListEntry of the soldfrom business partner, or null if not found
    • getPayer

      public PartnerListEntryImpl getPayer()
      Convenience method to Get the payer business partner, or null, if not available
      Returns:
      PartnerListEntry of the payer business partner, or null if not found
    • getPayerData

      public PartnerListEntry getPayerData()
      Convenience method to Get the payer business partner, or null, if not available
      Specified by:
      getPayerData in interface PartnerList
      Returns:
      PartnerListEntryData of the payer business partner, or null if not found
    • setPartner

      public void setPartner(String bpRole, PartnerListEntryImpl entry)
      Set the business partner for the given partner function (role).
      Parameters:
      bpRole - Name of the partner function
      entry - the PartnerListEntry for the business partner
    • setPartnerData

      public void setPartnerData(String bpRole, PartnerListEntry entry)
      Set the business partner for the given function (role).
      Specified by:
      setPartnerData in interface PartnerList
      Parameters:
      bpRole - Name of the partner function
      entry - the PartnerListEntry for the business partner
    • setSoldTo

      public void setSoldTo(PartnerListEntryImpl entry)
      Convenience method to set the soldto business partner
      Parameters:
      entry - of the soldTo business partner
    • setSoldToData

      public void setSoldToData(PartnerListEntry entry)
      Convenience method to set the soldto business partner
      Specified by:
      setSoldToData in interface PartnerList
      Parameters:
      entry - of the soldTo business partner
    • setContact

      public void setContact(PartnerListEntryImpl entry)
      Convenience method to set the contact business partner
      Parameters:
      entry - of the contact business partner
    • setContactData

      public void setContactData(PartnerListEntry entry)
      Convenience method to set the contact business partner
      Specified by:
      setContactData in interface PartnerList
      Parameters:
      entry - of the contact business partner
    • setSoldFrom

      public void setSoldFrom(PartnerListEntryImpl entry)
      Convenience method to set the sold-from business partner
      Parameters:
      entry - of the sold-from business partner
    • setSoldFromData

      public void setSoldFromData(PartnerListEntry entry)
      Convenience method to set the sold-from business partner
      Specified by:
      setSoldFromData in interface PartnerList
      Parameters:
      entry - of the sold-from business partner
    • setReseller

      public void setReseller(PartnerListEntryImpl entry)
      Convenience method to set the reseller business partner
      Parameters:
      entry - of the reseller business partner
    • setResellerData

      public void setResellerData(PartnerListEntry entry)
      Convenience method to set the reseller business partner
      Parameters:
      entry - of the reseller business partner
    • setPayer

      public void setPayer(PartnerListEntryImpl entry)
      Convenience method to set the payer business partner
      Parameters:
      entry - of the payer business partner
    • setPayerData

      public void setPayerData(PartnerListEntry entry)
      Convenience method to set the payer business partner
      Specified by:
      setPayerData in interface PartnerList
      Parameters:
      entry - of the payer business partner
    • removePartner

      public void removePartner(String bpRole)
      remove the business partner for the given partner function (role).
      Parameters:
      bpRole - Name of the partner function
    • removePartnerData

      public void removePartnerData(String bpRole)
      remove the business partner for the given partner function (role).
      Specified by:
      removePartnerData in interface PartnerList
      Parameters:
      bpRole - Name of the partner function
    • removePartner

      public void removePartner(TechKey bpTechKey)
      Remove the business partner with the given techKey.
      Parameters:
      bpTechKey - TechKey of the businesspartner, to delete
    • removePartnerData

      public void removePartnerData(TechKey bpTechKey)
      remove the business partner with the given techKey.
      Specified by:
      removePartnerData in interface PartnerList
      Parameters:
      bpTechKey - TechKey of the businesspartner, to delete
    • clearList

      public void clearList()
      clear the business partner list
      Specified by:
      clearList in interface PartnerList
    • toString

      public String toString()
      Returns a string representation of the object.
      Overrides:
      toString in class Object
      Returns:
      object as string
    • getAllToString

      public String getAllToString()
      Description copied from interface: PartnerList
      Get a string representation of this partnerList which is unique for these partners
      Specified by:
      getAllToString in interface PartnerList
      Returns:
      string
    • getList

      public Map<String,PartnerListEntry> getList()
      get the business partner list
      Specified by:
      getList in interface PartnerList
      Returns:
      MashMap list of the business partners
    • setList

      public void setList(Map<String,PartnerListEntry> partnerList)
      set the business partner list
      Parameters:
      partnerList - new list of the business partners
    • clone

      public PartnerList clone()
      Specified by:
      clone in interface PartnerList
      Overrides:
      clone in class Object
      Returns:
      clone
      See Also:
    • iterator

      Returns en iterator over the Entrys of Partner List in form of Map.Entry The keys are the partner function and the values are ParterListEntry objects.
      Specified by:
      iterator in interface Iterable<Map.Entry<String,PartnerListEntry>>
      Returns:
      iterator over the partners and their parternfunctions