Package com.portal.app.cc.comp
Class PAccountInfo
java.lang.Object
com.portal.app.cc.comp.PAccountInfo
This class contains commonly referenced information for an Portal
account object. It contains:
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.
- 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 Summary
FieldsModifier and TypeFieldDescriptionfinal intfinal intfinal intfinal intprotected intprotected PModelHandleprotected Localeprotected PModelHandleprotected PModelHandleprotected PARSharedDataprotected PScopeEntryPointprotected int[]protected intprotected booleanprotected booleanprotected Stringprotected booleanprotected booleanprotected PModelHandleprotected ArrayListprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidCalling this method will nullify the references, so that garbage collection will be fast.intRetrieves the access order for this accountReturns the account level bill info object.Retrieves the locale of this account.Method which returns the billInfos poidsMethod which returns the billInfosReturn the A/R parent of this account.Retrieves the AR shared data objectintgetBalanceGroupCount(Poid billinfoPoid) Returns the balance group count for the passed bill info poid.getBillInfo(Poid p, boolean refresh) intgetBillinfoServiceCount(Poid billinfoPoid, boolean isAllBillInfoSelected) Returns the service count for the passed bill info poid.getBrand()Return the brand info for this accountbooleanReturns true if "change status" page is opened from services tab, otherwise false.intGets the services count, used only for services tab.int[]Return the int codes representing the primary/secondary currency for this account.Returns the default balance group poid of an account.intReturn the parent of this account.Gets the selected services, used only for services tab.getSubscriptionServices(boolean forceRefresh) Retrieves all the subscription Services for the selected AccountdoubleMethod which returns the total due amount of the account including the child accountsMethod which returns the total open bill due for an accountMethod which returns the total pending bill due for an accountbooleanMethod which returns true only when there is a pending bill due for an accountbooleanbooleanbooleanDetermines if the given bill unit has subordinate childrenbooleanhasChildren(FList billInfoFList) Determines if the given bill unit has subordinate childrenbooleanvoidbooleanisParent()Returns true if this account is the top most account in the hiearchy, it means no parents for this account.booleanbooleanbooleanDetermines if the given buill unit is subordinate to another bill unitbooleanisSubordinate(FList billInfoFList) Determines if the given buill unit is subordinate to another bill unitvoidrefresh()Called to refresh all the data via a call to Portal, but this occurs only if the data is marked as needing an update.voidAfter billing we need to reload open and pending bill dues.voidsetAccessOrder(int order) Application-specific state.voidsetChangeStatusPageMode(boolean mode) Pass true if "change status" page is called from "services" tab, If from "summary" tab, then pass "false".voidsetCountServicesTab(int intServices) Set the services count, used only for services tab.voidsetDisplayCurrency(int cur) voidsetServicesTabServices(PModelHandle pmhServices) Set the selected services, used only for services tab.voidMarks this data class as needing an update from Portal.
-
Field Details
-
mAccount
-
mParent
-
mARAccount
-
mARAccountBillInfo
-
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
-
mAccessOrder
protected int mAccessOrder -
mAccountLocale
-
mARData
-
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
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
- Returns:
- The PModelHandle for this account object
-
getAccountPoid
- Returns:
- The PModelHandle for this account object
-
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
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
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
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
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
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
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
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
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
Returns the balance group count for the passed bill info poid.- Parameters:
billinfoPoid-- Returns:
- int
-
getBillinfoServiceCount
Returns the service count for the passed bill info poid.- Parameters:
billinfoPoid-isAllBillInfoSelected-- Returns:
-
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
Retrieves the locale of this account.- Returns:
- the locale for this account
-
getARData
Retrieves the AR shared data object -
getAllBillInfos
Method which returns the billInfos- Returns:
- Vector type ,which returns the billinfos
-
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
Method which returns the total pending bill due for an account- Returns:
- BigDecimal type ,which returns the total pending bill due
-
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
-
destructor
public void destructor() -
hasBillHirarchy
public boolean hasBillHirarchy() -
getBillInfo
-
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
Set the selected services, used only for services tab.- Parameters:
pmhServices-
-
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
Returns the default balance group poid of an account.- Returns:
- Poid
-