Class PSharingItemData

java.lang.Object
com.portal.app.cc.sharing.PSharingItemData
Direct Known Subclasses:
PDiscountSharingItemData

public class PSharingItemData extends Object
This class stores all the data related to the Sharing(s),ie charge/discount.
  • Field Details

    • selected

      protected boolean selected
    • index

      protected int index
    • sharingPoid

      protected Poid sharingPoid
    • name

      protected String name
    • qty

      protected BigDecimal qty
    • description

      protected String description
    • validfrom

      protected Date validfrom
    • validto

      protected Date validto
    • events

      protected Object[] events
    • eventRenderer

      protected StringBuffer eventRenderer
  • Constructor Details

    • PSharingItemData

      protected PSharingItemData()
      Dummy constructor.
    • PSharingItemData

      public PSharingItemData(int index, FList sharing) throws EBufException
      Constructs a PSharingItemData with the specified data base index index and charge sharing FListsharing.
      Parameters:
      index - int the index at database
      sharing - FList the charge sharing flist
      Throws:
      EBufException
  • Method Details

    • setUsageMap

      protected void setUsageMap(SparseArray sa) throws EBufException
      This will set the usage map for the sharing from the passed flist's SparseArray.
      Parameters:
      sa - SparseArray the array of usage event types
      Throws:
      EBufException
    • equals

      public boolean equals(Object obj)
      Indicates whether some other PSharingItemData is same as this PSharingItemData?
      Overrides:
      equals in class Object
      Parameters:
      obj - Object the reference object with which to compare
      Returns:
      boolean true if this object(sharing) is the same as the obj(sharing) argument; false otherwise.
    • sortEvents

      public void sortEvents()
      This will sort the events associated with sharing. Also it will render the events to show as multi line in a cell.
    • setSelected

      public void setSelected(boolean b)
      This is used to select/unselect the sharing to include/exclude to/from a group. And this is used in PSharingAvailableDialog.
      Parameters:
      b - boolean
    • getEventCount

      public int getEventCount()
      Returns the event count.
      Returns:
      int the event count.
    • getIndex

      public int getIndex()
      Returns the index of sharing in data base with in a group.
      Returns:
      int the data base index
    • isSelected

      public boolean isSelected()
      Returns the sharing is included/excluded from the group.
      Returns:
      boolean
    • getSharingPoid

      public Poid getSharingPoid()
      Returns the sharing poid.
      Returns:
      Poid
    • getName

      public String getName()
      Returns the name of the sharing(discount/sponsor).
      Returns:
      String
    • getDescription

      public String getDescription()
      Returns the event description.
      Returns:
      String
    • getEventRenderer

      public String getEventRenderer()
      Returns the event renderer string to display all the events in a cell as multi lines.
      Returns:
      String
    • getValidFrom

      public Date getValidFrom()
      Returns the sharing's(discount/sponsor) with effect date.
      Returns:
      Date
    • getValidTo

      public Date getValidTo()
      Returns the sharing's(discount/sponsor) max. valid date.
      Returns:
      Date
    • getQty

      public BigDecimal getQty()
      Returns the discount quantity. This will be used only for discount sharings.
      Returns:
      BigDecimal the discount quantity