All Implemented Interfaces:
BackendAware, BusinessObject, MessageListHolder, HeaderBase, SimpleHeader, Serializable, Cloneable
Direct Known Subclasses:
HeaderSalesDocument

public class HeaderBaseImpl extends SimpleHeaderImpl implements HeaderBase
Common Header Information for all objects of the bo layer that are considered to be sales documents.
See Also:
  • Field Details

    • changeable

      protected boolean changeable
      Document can be changed?
    • changedAt

      protected Date changedAt
      Changed date
    • createdAt

      protected Date createdAt
      Created date
    • currency

      protected String currency
      Currency
    • division

      protected String division
      Division
    • disChannel

      protected String disChannel
      Distribution channel
    • documentType

      protected DocumentType documentType
      Document type
    • freightValue

      protected BigDecimal freightValue
      Freight value
    • grossValue

      protected BigDecimal grossValue
      Gross value
    • netValue

      protected BigDecimal netValue
      Net value
    • netValueWOFreight

      protected BigDecimal netValueWOFreight
      Net value without freight
    • grossValueWOFreight

      protected BigDecimal grossValueWOFreight
      Gross value without freight
    • totalValue

      protected BigDecimal totalValue
      Total value
    • partnerList

      protected PartnerList partnerList
      Partner list
    • processType

      protected String processType
      Process type
    • processTypeDesc

      protected String processTypeDesc
      Process type description
    • salesDocNumber

      protected String salesDocNumber
      Sales document number from back end
    • purchaseOrderExt

      protected String purchaseOrderExt
      Purchase order number
    • postingDate

      protected Date postingDate
      Posting date
    • salesDocumentsOrigin

      protected String salesDocumentsOrigin
      Origin of sales document
    • salesOrg

      protected String salesOrg
      Sales organization
    • salesOffice

      protected String salesOffice
      Sales office
    • reqDeliveryDate

      protected Date reqDeliveryDate
      Required delivery date
    • validFrom

      protected Date validFrom
      Valid from date
    • validTo

      protected Date validTo
      Valid to date
    • shipCond

      protected String shipCond
      Shipping condition
    • taxValue

      protected BigDecimal taxValue
      Tax value
    • totalDiscount

      protected BigDecimal totalDiscount
      Total discount
    • deliveryPriority

      protected String deliveryPriority
      Delivery Priority
    • predecessorList

      protected List<ConnectedDocument> predecessorList
      List of predecessors
    • successorList

      protected List<ConnectedDocument> successorList
      List of successors
  • Constructor Details

    • HeaderBaseImpl

      public HeaderBaseImpl()
  • Method Details

    • addPredecessor

      public void addPredecessor(ConnectedDocument predecessorData)
      Description copied from interface: HeaderBase
      Adds a ConnectedDocument to the predecessor list. A null reference passed to this function will be ignored, in this case nothing will happen.
      Specified by:
      addPredecessor in interface HeaderBase
      Parameters:
      predecessorData - ConnectedDocument to be added to the predecessor list
    • addSuccessor

      public void addSuccessor(ConnectedDocument successorData)
      Description copied from interface: HeaderBase
      Adds a ConnectedDocument to the successor list. A null reference passed to this function will be ignored, in this case nothing will happen.
      Specified by:
      addSuccessor in interface HeaderBase
      Parameters:
      successorData - ConnectedDocument to be added to the successor list
    • clear

      public void clear()
      Drops the state of the object. All reference fields, except partnerList, are set to null, all primitive types are set to the default values they would have after the creation of a new instance. Use this method to reset the state to the state a newly created object would have. The advantage is, that the overhead caused by the normal object creation is omitted.
      Specified by:
      clear in interface SimpleHeader
      Overrides:
      clear in class SimpleHeaderImpl
    • clone

      public Object clone()
      Instead of a shallow-copy this returns a deep-copy of this HeaderBaseImpl instance.
      Specified by:
      clone in interface HeaderBase
      Overrides:
      clone in class SimpleHeaderImpl
      Returns:
      a deep-copy of this HeaderBase
    • createText

      public Text createText()
      Description copied from interface: HeaderBase
      Creates a text object. This method is used by back end objects to get instances of the text object.
      Specified by:
      createText in interface HeaderBase
      Returns:
      newly created text object
    • createConnectedDocument

      public ConnectedDocument createConnectedDocument()
      Description copied from interface: HeaderBase
      create a ConnectedDocument object.
      Specified by:
      createConnectedDocument in interface HeaderBase
      Returns:
      new ConnectedDocument Instance
    • getChangedAt

      public Date getChangedAt()
      Description copied from interface: HeaderBase
      Get the date, the document was changed the last time.
      Specified by:
      getChangedAt in interface HeaderBase
      Returns:
      the date, the document was changed the last time
    • getCreatedAt

      public Date getCreatedAt()
      Description copied from interface: HeaderBase
      Get the date, the document was created.
      Specified by:
      getCreatedAt in interface HeaderBase
      Returns:
      date, the document was created
    • getCurrency

      public String getCurrency()
      Description copied from interface: HeaderBase
      Get the currency used for this document.
      Specified by:
      getCurrency in interface HeaderBase
      Returns:
      the currency used for this document
    • getDeliveryPriority

      public String getDeliveryPriority()
      Description copied from interface: HeaderBase
      Returns the delivery priority key
      Specified by:
      getDeliveryPriority in interface HeaderBase
      Returns:
      String
    • getDisChannel

      public String getDisChannel()
      Description copied from interface: HeaderBase
      Get the distribution channel.
      Specified by:
      getDisChannel in interface HeaderBase
      Returns:
      distribution channel
    • getDivision

      public String getDivision()
      Description copied from interface: HeaderBase
      Get the devision.
      Specified by:
      getDivision in interface HeaderBase
      Returns:
      the devision
    • getDocumentType

      public DocumentType getDocumentType()
      Description copied from interface: HeaderBase
      Returns the type of the document, the header belongs to.
      Specified by:
      getDocumentType in interface HeaderBase
      Returns:
      the document type.
    • getFreightValue

      public BigDecimal getFreightValue()
      Description copied from interface: HeaderBase
      Get the price for the freight of the order.
      Specified by:
      getFreightValue in interface HeaderBase
      Returns:
      the price for the freight of the
    • getGrossValue

      public BigDecimal getGrossValue()
      Description copied from interface: HeaderBase
      Get the price including all taxes but not the freight.
      Specified by:
      getGrossValue in interface HeaderBase
      Returns:
      the value
    • getNetValue

      public BigDecimal getNetValue()
      Description copied from interface: HeaderBase
      Get the net price
      Specified by:
      getNetValue in interface HeaderBase
      Returns:
      the price
    • getNetValueWOFreight

      public BigDecimal getNetValueWOFreight()
      Description copied from interface: HeaderBase
      Get the net price without freight.
      Specified by:
      getNetValueWOFreight in interface HeaderBase
      Returns:
      the price
    • getPartnerId

      public String getPartnerId(String partnerFunction)
      Description copied from interface: HeaderBase
      Returns the partner id for the given partner function.
      Specified by:
      getPartnerId in interface HeaderBase
      Parameters:
      partnerFunction - partnerFucntion to be checked
      Returns:
      partner id
    • getPartnerKey

      public TechKey getPartnerKey(String partnerFunction)
      Description copied from interface: HeaderBase
      Returns the partner key for the given partner function.
      Specified by:
      getPartnerKey in interface HeaderBase
      Parameters:
      partnerFunction - partnerFucntion to be checked
      Returns:
      partner GUID
    • getPartnerList

      public PartnerList getPartnerList()
      Description copied from interface: HeaderBase
      Get the business partner list
      Specified by:
      getPartnerList in interface HeaderBase
      Returns:
      PartnerList list of business partners
    • getPostingDate

      public Date getPostingDate()
      Description copied from interface: HeaderBase
      Get the date the order was created from the customer's point of view.
      Specified by:
      getPostingDate in interface HeaderBase
      Returns:
      the posting date
    • getPredecessorList

      public List<ConnectedDocument> getPredecessorList()
      Description copied from interface: HeaderBase
      Get the predecessor list
      Specified by:
      getPredecessorList in interface HeaderBase
      Returns:
      list of all predecessor documents
    • getProcessType

      public String getProcessType()
      Description copied from interface: HeaderBase
      Get the process type of the document.
      Specified by:
      getProcessType in interface HeaderBase
      Returns:
      process type
    • getProcessTypeDesc

      public String getProcessTypeDesc()
      Description copied from interface: HeaderBase
      Get the description of the process type
      Specified by:
      getProcessTypeDesc in interface HeaderBase
      Returns:
      description of the process type
    • getPurchaseOrderExt

      public String getPurchaseOrderExt()
      Description copied from interface: HeaderBase
      Get the external purchase order number.
      Specified by:
      getPurchaseOrderExt in interface HeaderBase
      Returns:
      the purchase order number
    • getReqDeliveryDate

      public Date getReqDeliveryDate()
      Description copied from interface: HeaderBase
      Get the requested delivery date.
      Specified by:
      getReqDeliveryDate in interface HeaderBase
      Returns:
      the request delivery date
    • getSalesDocNumber

      public String getSalesDocNumber()
      Description copied from interface: HeaderBase
      Get the number of the sales document the header belongs to.
      Specified by:
      getSalesDocNumber in interface HeaderBase
      Returns:
      the number of the sales document
    • getSalesDocumentsOrigin

      public String getSalesDocumentsOrigin()
      Description copied from interface: HeaderBase
      Get the origin of the sales document.
      Specified by:
      getSalesDocumentsOrigin in interface HeaderBase
      Returns:
      the origin of the sales document
    • getSalesOffice

      public String getSalesOffice()
      Description copied from interface: HeaderBase
      Get the sales office.
      Specified by:
      getSalesOffice in interface HeaderBase
      Returns:
      the sales office
    • getSalesOrg

      public String getSalesOrg()
      Description copied from interface: HeaderBase
      Get the sales organization for the document.
      Specified by:
      getSalesOrg in interface HeaderBase
      Returns:
      the sales organization
    • getShipCond

      public String getShipCond()
      Description copied from interface: HeaderBase
      Get the shipping conditions for the document.
      Specified by:
      getShipCond in interface HeaderBase
      Returns:
      the shipping conditions
    • getSuccessorList

      public List<ConnectedDocument> getSuccessorList()
      Description copied from interface: HeaderBase
      Get the successor list
      Specified by:
      getSuccessorList in interface HeaderBase
      Returns:
      list of all successor documents
    • getTaxValue

      public BigDecimal getTaxValue()
      Description copied from interface: HeaderBase
      Get the taxes that have to be paid for the document.
      Specified by:
      getTaxValue in interface HeaderBase
      Returns:
      the taxes
    • getTotalDiscount

      public BigDecimal getTotalDiscount()
      Specified by:
      getTotalDiscount in interface HeaderBase
      Returns:
      total discount, which is used for strike through prices
    • isChangeable

      public boolean isChangeable()
      Description copied from interface: HeaderBase
      Check whether or not the document is changeable.
      Specified by:
      isChangeable in interface HeaderBase
      Returns:
      true if the document is changeable, otherwise false.
    • setChangeable

      public void setChangeable(boolean changeable)
      Description copied from interface: HeaderBase
      Set whether or not the document is changeable using a String parameter.
      Specified by:
      setChangeable in interface HeaderBase
      Parameters:
      changeable - " " or "" indicates that the document is changeable, all other values that it is changeable.
    • setChangedAt

      public void setChangedAt(Date changedAt)
      Description copied from interface: HeaderBase
      Set the date, the document was changed the last time.
      Specified by:
      setChangedAt in interface HeaderBase
      Parameters:
      changedAt - the date, the document was changed the last time
    • setCreatedAt

      public void setCreatedAt(Date createdAt)
      Description copied from interface: HeaderBase
      Set the date, document was created.
      Specified by:
      setCreatedAt in interface HeaderBase
      Parameters:
      createdAt - the date to be set
    • setCurrency

      public void setCurrency(String currency)
      Description copied from interface: HeaderBase
      Set the currency used for the document the header belongs to.
      Specified by:
      setCurrency in interface HeaderBase
      Parameters:
      currency - the currency to be set
    • setDeliveryPriority

      public void setDeliveryPriority(String deliveryPriority)
      Description copied from interface: HeaderBase
      Sets the delivery priority key.
      Specified by:
      setDeliveryPriority in interface HeaderBase
      Parameters:
      deliveryPriority - key
    • setDisChannel

      public void setDisChannel(String disChannel)
      Description copied from interface: HeaderBase
      Set the distribution channel.
      Specified by:
      setDisChannel in interface HeaderBase
      Parameters:
      disChannel - the distribution channel to be set
    • setDivision

      public void setDivision(String division)
      Description copied from interface: HeaderBase
      Set the devision.
      Specified by:
      setDivision in interface HeaderBase
      Parameters:
      division - the devision to be set
    • setDocumentType

      public void setDocumentType(DocumentType documentType)
      Description copied from interface: HeaderBase
      Set the document type.
      Specified by:
      setDocumentType in interface HeaderBase
      Parameters:
      documentType - document type
    • setFreightValue

      public void setFreightValue(BigDecimal freightValue)
      Description copied from interface: HeaderBase
      Set the price for the freight of the order.
      Specified by:
      setFreightValue in interface HeaderBase
      Parameters:
      freightValue - the price for the freight
    • setGrossValue

      public void setGrossValue(BigDecimal grossValue)
      Description copied from interface: HeaderBase
      Set the price including all taxes but not the freight.
      Specified by:
      setGrossValue in interface HeaderBase
      Parameters:
      grossValue - the price to be set
    • setNetValue

      public void setNetValue(BigDecimal netValue)
      Description copied from interface: HeaderBase
      Set the net price
      Specified by:
      setNetValue in interface HeaderBase
      Parameters:
      netValue - the price to be set
    • setNetValueWOFreight

      public void setNetValueWOFreight(BigDecimal netValueWOFreight)
      Description copied from interface: HeaderBase
      Set the net price without freight.
      Specified by:
      setNetValueWOFreight in interface HeaderBase
      Parameters:
      netValueWOFreight - the price to be set
    • setPartnerList

      public void setPartnerList(PartnerList partnerList)
      Description copied from interface: HeaderBase
      Sets the business partner list.
      Specified by:
      setPartnerList in interface HeaderBase
      Parameters:
      partnerList - list of business partners
    • setPostingDate

      public void setPostingDate(Date postingDate)
      Description copied from interface: HeaderBase
      Set the date the order was created from the customer's point of view.
      Specified by:
      setPostingDate in interface HeaderBase
      Parameters:
      postingDate - the date to be set
    • setProcessType

      public void setProcessType(String processType)
      Description copied from interface: HeaderBase
      Set the the process type of the document.
      Specified by:
      setProcessType in interface HeaderBase
      Parameters:
      processType - the process type to be set
    • setProcessTypeDesc

      public void setProcessTypeDesc(String processTypeDesc)
      Description copied from interface: HeaderBase
      Sets the description of the process type
      Specified by:
      setProcessTypeDesc in interface HeaderBase
      Parameters:
      processTypeDesc - The processTypeDesc to set
    • setPurchaseOrderExt

      public void setPurchaseOrderExt(String purchaseOrderExt)
      Description copied from interface: HeaderBase
      Set the external purchase order number.
      Specified by:
      setPurchaseOrderExt in interface HeaderBase
      Parameters:
      purchaseOrderExt - the number to be set
    • setReqDeliveryDate

      public void setReqDeliveryDate(Date reqDeliveryDate)
      Description copied from interface: HeaderBase
      Set the requested delivery date.
      Specified by:
      setReqDeliveryDate in interface HeaderBase
      Parameters:
      reqDeliveryDate - the requested delivery date to be set.
    • setSalesDocNumber

      public void setSalesDocNumber(String salesDocNumber)
      Description copied from interface: HeaderBase
      Set the number of the sales document the header belongs to.
      Specified by:
      setSalesDocNumber in interface HeaderBase
      Parameters:
      salesDocNumber - the number of the sales document
    • setSalesDocumentsOrigin

      public void setSalesDocumentsOrigin(String salesDocOrigin)
      Description copied from interface: HeaderBase
      Set the origin of the sales document.
      Specified by:
      setSalesDocumentsOrigin in interface HeaderBase
      Parameters:
      salesDocOrigin - the origin to be set
    • setSalesOffice

      public void setSalesOffice(String salesOffice)
      Description copied from interface: HeaderBase
      Set the sales office.
      Specified by:
      setSalesOffice in interface HeaderBase
      Parameters:
      salesOffice - the sales office
    • setSalesOrg

      public void setSalesOrg(String salesOrg)
      Description copied from interface: HeaderBase
      Set the sales organization for the document.
      Specified by:
      setSalesOrg in interface HeaderBase
      Parameters:
      salesOrg - the sales organization.
    • setShipCond

      public void setShipCond(String shipCond)
      Description copied from interface: HeaderBase
      Set the shipping conditions for the document.
      Specified by:
      setShipCond in interface HeaderBase
      Parameters:
      shipCond - the shipping conditions
    • setTaxValue

      public void setTaxValue(BigDecimal taxValue)
      Description copied from interface: HeaderBase
      Set the taxes that have to be paid for the document.
      Specified by:
      setTaxValue in interface HeaderBase
      Parameters:
      taxValue - the taxes to be set
    • setTechKey

      public void setTechKey(TechKey techKey)
      Sets the key for the document and sets the docuemnt to dirty, so that a re-read is enforced with netx read.
      Specified by:
      setTechKey in interface BusinessObject
      Overrides:
      setTechKey in class BusinessObjectBase
      Parameters:
      techKey - the techKey to be set
    • setTotalDiscount

      public void setTotalDiscount(BigDecimal totalDiscount)
      Description copied from interface: HeaderBase
      sets the total discount, which is used for strike through prices
      Specified by:
      setTotalDiscount in interface HeaderBase
      Parameters:
      totalDiscount - totalDiscount as BigDecimal
    • toString

      public String toString()
      Returns a simplifies string representation of the object. Useful for debugging/logging purpose, but not for display on the User Interface.
      Overrides:
      toString in class SimpleHeaderImpl
      Returns:
      object as string
    • getGrossValueWOFreight

      public BigDecimal getGrossValueWOFreight()
      Description copied from interface: HeaderBase
      Get the gross price without freight.
      Specified by:
      getGrossValueWOFreight in interface HeaderBase
      Returns:
      the gross price without freight
    • setGrossValueWOFreight

      public void setGrossValueWOFreight(BigDecimal grossValueWOFreight)
      Description copied from interface: HeaderBase
      Set the gross value without freight.
      Specified by:
      setGrossValueWOFreight in interface HeaderBase
      Parameters:
      grossValueWOFreight - the price to be set
    • consolidateDate

      protected Date consolidateDate(Date date)
      If year >9999: Set it to 9999
      Parameters:
      date -
      Returns:
      Changed date (if needed)
    • getValidFrom

      public Date getValidFrom()
      Description copied from interface: HeaderBase
      Get the date, the document is valid from.
      Specified by:
      getValidFrom in interface HeaderBase
      Returns:
      date, the document is valid from
    • getValidTo

      public Date getValidTo()
      Description copied from interface: HeaderBase
      Get the date, the document is valid to.
      Specified by:
      getValidTo in interface HeaderBase
      Returns:
      date, the document is valid to
    • setValidFrom

      public void setValidFrom(Date validFrom)
      Description copied from interface: HeaderBase
      Sets the date, the document is valid from.
      Specified by:
      setValidFrom in interface HeaderBase
      Parameters:
      validFrom - the validFrom date to be set.
    • setValidTo

      public void setValidTo(Date validTo)
      Description copied from interface: HeaderBase
      Sets the date, the document is valid to.
      Specified by:
      setValidTo in interface HeaderBase
      Parameters:
      validTo - the validTo date to be set.