Class PAccountInfo

java.lang.Object
com.portal.app.cc.comp.PAccountInfo

public class PAccountInfo extends Object
This class contains commonly referenced information for an Portal account object. It contains:
  • the PModelHandle for the account
  • the brand for the account
  • the primary/secondary currencies for the account
  • the account's parent PModelHandle, if one exists.

The purpose of this class is allow the application to call the opcodes required to obtain this account data once, instead of the various components that comprising the application calling those opcodes individually. This should help performance.
Version:
%version: 9 % %date_modified: Fri Oct 26 12:52:35 2001 %
Author:
kapono
  • Field Details

    • mAccount

      protected PModelHandle mAccount
    • mParent

      protected PModelHandle mParent
    • mARAccount

      protected PModelHandle mARAccount
    • mARAccountBillInfo

      protected PModelHandle mARAccountBillInfo
    • mBrandScope

      protected PScopeEntryPoint mBrandScope
    • mCurrencies

      protected int[] mCurrencies
    • mDisplayCurrency

      protected int mDisplayCurrency
    • mNeedsUpdate

      protected boolean mNeedsUpdate
    • mIsSubordinate

      protected boolean mIsSubordinate
    • mHasChildren

      protected boolean mHasChildren
    • mIsSponsor

      protected boolean mIsSponsor
    • mTopParent

      protected boolean mTopParent
    • mIsSponsorNew

      protected String mIsSponsorNew
    • mAccessOrder

      protected int mAccessOrder
    • mAccountLocale

      protected Locale mAccountLocale
    • mARData

      protected PARSharedData mARData
    • msubscriptionSvcList

      protected ArrayList msubscriptionSvcList
    • ACTIVE

      public final int ACTIVE
      See Also:
    • INACTIVE

      public final int INACTIVE
      See Also:
    • CLOSED

      public final int CLOSED
      See Also:
    • DEFUNCT

      public final int DEFUNCT
      See Also:
  • Constructor Details

    • PAccountInfo

      public PAccountInfo(PModelHandle pm)
      Creates a new PAccountInfo object. All data is obtained from Portal when the class is created, so this is not a cheap object to create (time-wise).
      Parameters:
      pm - The PModelHandle representing the account object
  • Method Details

    • initializeBillCombos

      public void initializeBillCombos()
    • getAccount

      public PModelHandle getAccount()
      Returns:
      The PModelHandle for this account object
    • getAccountPoid

      public Poid getAccountPoid()
      Returns:
      The PModelHandle for this account object
    • getParent

      public PModelHandle getParent()
      Return the parent of this account. May be null if there is no parent.
      Returns:
      The PModelHandle for this account object's parent
    • getARAccount

      public PModelHandle getARAccount()
      Return the A/R parent of this account. May be null.
      Returns:
      The PModelHandle for this account object's A/R acount, could be the account itself if it is not a subordinate.
    • hasChildren

      public boolean hasChildren()
      Returns:
      true if this account has subordinate children, flase otherwise
    • hasChildren

      public boolean hasChildren(PModelHandle p)
      Determines if the given bill unit has subordinate children
      Parameters:
      p - An bill unit object represented as a PModelHandle
      Returns:
      true if this bill unit has subordinate children, flase otherwise
    • hasChildren

      public boolean hasChildren(FList billInfoFList)
      Determines if the given bill unit has subordinate children
      Parameters:
      billInfoFList - An bill unit object represented as a FList
      Returns:
      true if this bill unit has subordinate children, flase otherwise
    • isSubordinate

      public boolean isSubordinate()
      Returns:
      true if this account is subordinate; false otherwise
    • isSubordinate

      public boolean isSubordinate(PModelHandle p)
      Determines if the given buill unit is subordinate to another bill unit
      Parameters:
      p - An bill unit object represented as a PModelHandle
      Returns:
      true if this bill unit is subordinate, false otherwise
    • isSubordinate

      public boolean isSubordinate(FList billInfoFList)
      Determines if the given buill unit is subordinate to another bill unit
      Parameters:
      p - An bill unit object represented as a FList
      Returns:
      true if this bill unit is subordinate, false otherwise
    • isSponsor

      public boolean isSponsor()
      Returns:
      true if this account is the owner of at least one sponsor group;
    • hasSubscriptionService

      public boolean hasSubscriptionService()
      Returns:
      true if this account has subordinate children, flase otherwise
    • getSubscriptionServices

      public ArrayList getSubscriptionServices(boolean forceRefresh)
      Retrieves all the subscription Services for the selected Account
      Parameters:
      forceRefresh - if true will get the data from Infranet server otherwise, it will return data from the cache
      Returns:
      An ArrayList which contains the Poids of all Subscription Services
    • getBrand

      public PScopeEntryPoint getBrand()
      Return the brand info for this account
      Returns:
      The PScopeEntryPoint representing this account's brand
    • getCurrencies

      public int[] getCurrencies()
      Return the int codes representing the primary/secondary currency for this account.
      Returns:
      An int array representing the primary/secondary currency for this account.
    • setUpdateNeeded

      public void setUpdateNeeded()
      Marks this data class as needing an update from Portal. This not result in an actual update - call refresh() explicitely for that to occur.
    • refresh

      public void refresh() throws RemoteException
      Called to refresh all the data via a call to Portal, but this occurs only if the data is marked as needing an update. This avoids multiple opcode calls that will return the same data already contained in this object.
      Throws:
      RemoteException
    • getBalanceGroupCount

      public int getBalanceGroupCount(Poid billinfoPoid)
      Returns the balance group count for the passed bill info poid.
      Parameters:
      billinfoPoid -
      Returns:
      int
    • getBillinfoServiceCount

      public int getBillinfoServiceCount(Poid billinfoPoid, boolean isAllBillInfoSelected)
      Returns the service count for the passed bill info poid.
      Parameters:
      billinfoPoid -
      isAllBillInfoSelected -
      Returns:
    • getAccountArBillInfo

      public PModelHandle getAccountArBillInfo()
      Returns the account level bill info object.
      Returns:
      Poid
    • setAccessOrder

      public void setAccessOrder(int order)
      Application-specific state. Tracks the order accounts are accessed.
      Parameters:
      The - order of access
    • setDisplayCurrency

      public void setDisplayCurrency(int cur)
    • getDisplayCurrency

      public int getDisplayCurrency()
    • getAccessOrder

      public int getAccessOrder()
      Retrieves the access order for this account
      Returns:
      The access order for this account
    • getAccountLocale

      public Locale getAccountLocale()
      Retrieves the locale of this account.
      Returns:
      the locale for this account
    • getARData

      public PARSharedData getARData()
      Retrieves the AR shared data object
    • getAllBillInfos

      public Vector getAllBillInfos()
      Method which returns the billInfos
      Returns:
      Vector type ,which returns the billinfos
    • getAllBillInfoPods

      public Vector getAllBillInfoPods()
      Method which returns the billInfos poids
      Returns:
      Vector type ,which returns the billinfos poids
    • reloadOpenAndPendingBillDues

      public void reloadOpenAndPendingBillDues()
      After billing we need to reload open and pending bill dues.
    • getTotalPendingBillDue

      public BigDecimal getTotalPendingBillDue()
      Method which returns the total pending bill due for an account
      Returns:
      BigDecimal type ,which returns the total pending bill due
    • getTotalOpenBillDue

      public BigDecimal getTotalOpenBillDue()
      Method which returns the total open bill due for an account
      Returns:
      BigDecimal type ,which returns the total open bill due
    • getTotalDueNow

      public double getTotalDueNow()
      Method which returns the total due amount of the account including the child accounts
      Returns:
      decimal, the total amount due for the account
    • hasAccountPendingBill

      public boolean hasAccountPendingBill()
      Method which returns true only when there is a pending bill due for an account
      Returns:
      boolean type ,which returns true/false
    • getAllBillInfosAndNameInfos

      public PModelHandle getAllBillInfosAndNameInfos()
    • destructor

      public void destructor()
    • hasBillHirarchy

      public boolean hasBillHirarchy()
    • getBillInfo

      public PModelHandle getBillInfo(Poid p, boolean refresh)
    • disposeAllResources

      public void disposeAllResources()
      Calling this method will nullify the references, so that garbage collection will be fast.
    • isParent

      public boolean isParent()
      Returns true if this account is the top most account in the hiearchy, it means no parents for this account.
    • setServicesTabServices

      public void setServicesTabServices(PModelHandle pmhServices)
      Set the selected services, used only for services tab.
      Parameters:
      pmhServices -
    • getServicesTabServices

      public PModelHandle getServicesTabServices()
      Gets the selected services, used only for services tab.
      Parameters:
      pmhServices -
    • setCountServicesTab

      public void setCountServicesTab(int intServices)
      Set the services count, used only for services tab.
      Parameters:
      intServices -
    • getCountServicesTab

      public int getCountServicesTab()
      Gets the services count, used only for services tab.
      Parameters:
      intCountServicesTab -
    • setChangeStatusPageMode

      public void setChangeStatusPageMode(boolean mode)
      Pass true if "change status" page is called from "services" tab, If from "summary" tab, then pass "false".
      Parameters:
      mode -
    • getChangeStatusPageMode

      public boolean getChangeStatusPageMode()
      Returns true if "change status" page is opened from services tab, otherwise false.
      Returns:
      isServicesTab
    • getDefaultBalanceGroup

      public Poid getDefaultBalanceGroup()
      Returns the default balance group poid of an account.
      Returns:
      Poid