Class PGroupData

java.lang.Object
com.portal.app.cc.sharing.PGroupData

public class PGroupData extends Object
This class stores all the data related to a group.
  • Constructor Details

    • PGroupData

      public PGroupData(Poid p)
      Constructs an PGroupData with the specified group piodp.
      Parameters:
      p - Poid the group poid
    • PGroupData

      public PGroupData(Poid p, boolean globalCSG)
      Constructs an PGroupData with the group poid and global charge sharing flag.
      Parameters:
      p - Poid the group poid
      globalCSG - boolean indicates whether the group is global CSG or not
  • Method Details

    • equals

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

      public String toString()
      Overriden method from Object. Returns the name of the group.
      Overrides:
      toString in class Object
    • set

      public void set(FList flist) throws EBufException
      This will initialize the class variables mParent, mGroupName and mGroupOwner from the FList flist.
      Parameters:
      flist - FList the flist with data
      Throws:
      EBufException
    • setBillUnitName

      public void setBillUnitName(String name)
      This will set the mBillUnitName.
      Parameters:
      name - String the bill unit name
    • setPaymentMethod

      public void setPaymentMethod(String s)
      This will set the payment method paymentMethod.
      Parameters:
      s - String the payment method
    • setMemberCount

      public void setMemberCount(int i)
      This will set member count mMemberCount.
      Parameters:
      i - int member count
    • setParentPoid

      public void setParentPoid(Poid p)
      This will set the group parent mParent
      Parameters:
      p - Poid the parent poid
    • setAccountNumber

      public void setAccountNumber(String s)
      This will set the account number.
      Parameters:
      s - String the account number string
    • setGroupOwner

      public void setGroupOwner(Poid p)
      This will set the group owner.
      Parameters:
      p - Poid the group owner poid.
    • setGroupOwnerName

      public void setGroupOwnerName(String s)
      This will set the group owner name.
      Parameters:
      s - String the group owner name
    • setName

      public void setName(String name)
      This will set the group name.
      Parameters:
      name - String the group name
    • getName

      public String getName()
      Returns the group name.
      Returns:
      String
    • getAccountNumber

      public String getAccountNumber()
      Returns the account number.
      Returns:
      String the account number string
    • getParentPoid

      public Poid getParentPoid()
      Returns the parent poid.
      Returns:
      Poid
    • getGroupOwnerName

      public String getGroupOwnerName()
      Returns the group owner name.
      Returns:
      String
    • getGroupPoid

      public Poid getGroupPoid()
      Returns the group poid.
      Returns:
      Poid
    • getGroupOwner

      public Poid getGroupOwner()
      Returns the group owner poid.
      Returns:
      Poid
    • getPaymentMethod

      public String getPaymentMethod()
      Returns the payment method.
      Returns:
      String
    • getBillUnitName

      public String getBillUnitName()
      Returns the bill unit name.
      Returns:
      String
    • getMemberCount

      public int getMemberCount()
      Returns the member count.
      Returns:
      int
    • getSharingRenderer

      public String getSharingRenderer()
      Returns the render string to display group sharing in multilines.
      Returns:
      String
    • getSharingCount

      public int getSharingCount()
      Returns the number of sharings(discounts/sponsors) in a group.
      Returns:
      int
    • addSharing

      public void addSharing(String s)
      This will add sharing name to the sharing data structure.
      Parameters:
      s - String
    • sortPayFor

      public void sortPayFor()
      This will sort all the sharings.
    • getSharingItems

      public ArrayList getSharingItems()
      Returns the sharing items in a group. This is useful for Group Creation, Modification and View.
      Returns:
      ArrayList
    • getSharingItemsOriginal

      public ArrayList getSharingItemsOriginal()
      Returns the persisted sharing items in a group. This is useful for Group Creation, Modification. Make sure call this method only after calling the initSharingItemsOriginal(). Otherwise this will throw an exception.
      Returns:
      ArrayList
    • getSharingItemsDeleted

      public ArrayList getSharingItemsDeleted()
      Returns the sharings which are deleted from the group through PSharingAvailableDialog. This is useful for Group Creation, Modification and View.
      Returns:
      ArrayList
    • setSharingItemsDeleted

      public void setSharingItemsDeleted(ArrayList list)
      Set the sharings which need to be deleted from the group
      Parameters:
      list -
    • getSharingItemsAdded

      public ArrayList getSharingItemsAdded()
      Returns the sharings which are added from the group through PSharingAvailableDialog. This is useful for Group Creation, Modification and View.
      Returns:
      ArrayList
    • setSharingItemsAdded

      public void setSharingItemsAdded(ArrayList list)
      Set the additional sharings to add to the group
      Parameters:
      list -
    • setSharingItems

      public void setSharingItems(ArrayList l)
      This will set the sharing items which are ready to save after modifying the group. This is useful for Group Creation, Modification and View.
      Parameters:
      l - ArrayList
    • initSharingItemsOriginal

      public void initSharingItemsOriginal()
      Initializes with groups persisted sharing items. This should be called from the controller immediately after this object is constructed.
    • isGlobalCSG

      public boolean isGlobalCSG()
      Returns whether the group is Global Charge Sharing Group(CSG) or not.
      Returns:
      true means global CSG