Class BEIDData

java.lang.Object
com.portal.common.BEIDData
All Implemented Interfaces:
Serializable, Comparable
Direct Known Subclasses:
CurrencyData

public class BEIDData extends Object implements Serializable, Comparable
See Also:
  • Field Details

    • m_ResourceID

      protected Integer 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

      public Integer getResourceID()
      Return the affiliate currency ID (CURRENCY_USD, CURRENCY_EUR, etc.)
      Returns:
      The affiliate currency ID (CURRENCY_USD, CURRENCY_EUR, etc.)
    • getStringCode

      public String 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

      public String 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

      public String getSymbol()
      Return the affiliate symbol (Hrs, Min, $, FF, etc.) for the resource.
      Returns:
      The affiliate symbol ID ($, FF, etc.) for the resource.
    • getStatus

      public Integer 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

      public String 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

      public Integer 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

      public Integer 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

      public Integer 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

      public BigDecimal getToleranceAmountMin()
      Return the tolerance amount minimum for the resource.
      Returns:
      The tolerance amount minimum for the resource.
    • getToleranceAmountMax

      public BigDecimal getToleranceAmountMax()
      Return the tolerance amount maximum for the resource.
      Returns:
      The tolerance amount maximum for the resource.
    • getTolerancePercent

      public BigDecimal getTolerancePercent()
      Return the tolerance amount percent for the resource.
      Returns:
      The tolerance percent for the resource.
    • toString

      public String 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.
      Overrides:
      toString in class Object
      Returns:
      Return the appropriate string output for a BEID resource object.
    • compareTo

      public int compareTo(Object o)
      Specified by:
      compareTo in interface Comparable