Package com.portal.common
Class BEIDData
java.lang.Object
com.portal.common.BEIDData
- All Implemented Interfaces:
Serializable
,Comparable
- Direct Known Subclasses:
CurrencyData
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBEIDData
(Integer resourceID, String stringCode, String description, String symbol, Integer status, String statusAsString, Integer rounding, Integer roundingMode, Integer javaRoundingMode, BigDecimal toleranceAmountMin, BigDecimal toleranceAmountMax, BigDecimal tolerancePercent) Constructs an object with information for a BEID resource contained in the Portal BEID table. -
Method Summary
Modifier and TypeMethodDescriptionint
Return the affiliate resource description (Free domestic minutes, US Dollar, Euro, etc.)Return the Java rounding mode that corresponds to resource rounding mode.Return the affiliate currency ID (CURRENCY_USD, CURRENCY_EUR, etc.)Return the rounding (number of places to the right of the decimal point) for the resource.Return the rounding mode for the resource.Return the "status" (not set, active, inactive) for the resource.Return the "status" (not set, active, inactive) for the resource as a string.Return the "string code" for the resource.Return the affiliate symbol (Hrs, Min, $, FF, etc.) for the resource.Return the tolerance amount maximum for the resource.Return the tolerance amount minimum for the resource.Return the tolerance amount percent for the resource.static boolean
isBEIDCurrencyResource
(int resourceID) Is the resource ID a valid BEID currency resource ID?boolean
Is this BEID entry a currency resource?toString()
The default is to display the "description" of the BEID resource.
-
Field Details
-
m_ResourceID
-
-
Constructor Details
-
BEIDData
public BEIDData(Integer resourceID, String stringCode, String description, String symbol, Integer status, String statusAsString, Integer rounding, Integer roundingMode, Integer javaRoundingMode, BigDecimal toleranceAmountMin, BigDecimal toleranceAmountMax, BigDecimal tolerancePercent) Constructs an object with information for a BEID resource contained in the Portal BEID table.- Parameters:
resourceID
- The ID of the BEID resource.stringCode
- The low level resource code (i.e. USD)description
- The description of the resource (i.e. Euro)symbol
- The symbol for the resource (i.e. $)status
- The beid resource status.statusAsString
- The string description of beid resource status.rounding
- The number of places after the decimal point.roundingMode
- The BEID rounding mode (up, down, nearest)javaRoundingMode
- The Java rounding mode (up, down, nearest)toleranceAmountMin
- The minimum tolerance for billing operations.toleranceAmountMax
- The maximum tolerance for billing operations.tolerancePercent
- The tolerance percent for billing operations.
-
-
Method Details
-
isBEIDCurrencyResource
public static boolean isBEIDCurrencyResource(int resourceID) Is the resource ID a valid BEID currency resource ID?- Parameters:
currencyID
- The Portal BEID resource ID to evaluate.- Returns:
- Return true if the resource ID a valid BEID currency resource ID, otherwise return false.
-
isCurrencyResource
public boolean isCurrencyResource()Is this BEID entry a currency resource?- Returns:
- Return true if this is a currency resource otherwise return false.
-
getResourceID
Return the affiliate currency ID (CURRENCY_USD, CURRENCY_EUR, etc.)- Returns:
- The affiliate currency ID (CURRENCY_USD, CURRENCY_EUR, etc.)
-
getStringCode
Return the "string code" for the resource. For a currency resource this is the ISO symbol for the currency (USD, GBP, etc.)- Returns:
- The affiliate "string code" for the resource. For a currency resource this is the ISO symbol for the currency (USD, GBP, etc.)
-
getDescription
Return the affiliate resource description (Free domestic minutes, US Dollar, Euro, etc.)- Returns:
- The affiliate resource description (Free domestic minutes, US Dollar, Euro, etc.)
-
getSymbol
Return the affiliate symbol (Hrs, Min, $, FF, etc.) for the resource.- Returns:
- The affiliate symbol ID ($, FF, etc.) for the resource.
-
getStatus
Return the "status" (not set, active, inactive) for the resource.- Returns:
- The affiliate "status" for the resource. Will be one of the following values:\n PortalEnums.PinBeidStatus.NOT_SET\n PortalEnums.PinBeidStatus.ACTIVE\n PortalEnums.PinBeidStatus.INACTIVE
-
getStatusAsString
Return the "status" (not set, active, inactive) for the resource as a string.- Returns:
- The affiliate "status" for the resource as a string. Will be a string for not set, active, or inactive. Return "undefined" if the status is an undefined value (should never happen, but...).
-
getRounding
Return the rounding (number of places to the right of the decimal point) for the resource.- Returns:
- The rounding (number of places to the right of the decimal point) for the resource.
-
getRoundingMode
Return the rounding mode for the resource.- Returns:
- The rounding mode for the resource. Will be one of the following values:\n PortalEnums.BEID_ROUND_NEAREST\n PortalEnums.BEID_ROUND_UP\n PortalEnums.BEID_ROUND_DOWN\n PortalEnums.BEID_ROUND_EVEN
-
getJavaRoundingMode
Return the Java rounding mode that corresponds to resource rounding mode.- Returns:
- The Java rounding mode for the resource. Will be one of the following values:\n BigDecimal.ROUND_UP (for PortalEnums.BEID_ROUND_UP)\n BigDecimal.ROUND_DOWN (for PortalEnums.BEID_ROUND_DOWN)\n BigDecimal.ROUND_HALF_EVEN (for PortalEnums.BEID_ROUND_EVEN)\n BigDecimal.ROUND_HALF_UP (for PortalEnums.BEID_ROUND_NEAREST)\n
-
getToleranceAmountMin
Return the tolerance amount minimum for the resource.- Returns:
- The tolerance amount minimum for the resource.
-
getToleranceAmountMax
Return the tolerance amount maximum for the resource.- Returns:
- The tolerance amount maximum for the resource.
-
getTolerancePercent
Return the tolerance amount percent for the resource.- Returns:
- The tolerance percent for the resource.
-
toString
The default is to display the "description" of the BEID resource. If you change this you will break some GUI code that takes advantage of that assumption. -
compareTo
- Specified by:
compareTo
in interfaceComparable
-