Skip to content

clsPremiumSizeDiscount

Represents a premium-size discount band. The class is retrieved through BOF criteria objects and exposes the loaded row to rating callers.

Purpose

  • Represents a premium-size discount band.
  • The class is retrieved through BOF criteria objects and exposes the loaded row to rating callers.

Context

  • Namespace: SAIF.Business.Policy.Rating
  • Assembly/package: SAIF.Business.Policy.Rating

Public members

Member Signature Purpose
PremiumDiscountCode Public Property PremiumDiscountCode() As String Discount-band code used to look up the premium-size discount schedule.
PremiumRangeLowerLimit Public Property PremiumRangeLowerLimit() As Decimal Lower premium threshold of the discount band that contains the requested premium amount.
PremiumRangeUpperLimit Public Property PremiumRangeUpperLimit() As Decimal Upper premium threshold of the discount band that contains the requested premium amount.
DiscountRate Public Property DiscountRate() As Decimal Discount percentage applied for this premium-size band.
BaseDiscountAmount Public Property BaseDiscountAmount() As Decimal Fixed base discount amount associated with this premium-size band.
ExcludedPremiumAmount Public Property ExcludedPremiumAmount() As Decimal Premium amount excluded before applying the band discount calculation.
Equals Public Overloads Shared Function Equals(ByVal objA As Object, ByVal objB As Object) As Boolean Compares two objects as premium-size-discount bands using the type-specific equality logic.
Equals Public Overloads Overrides Function Equals(ByVal inObject As Object) As Boolean Treats another object as equal when it is a clsPremiumSizeDiscount with the same band code and lower limit.
Equals Public Overloads Function Equals(ByVal inObject As clsPremiumSizeDiscount) As Boolean Treats two discount-band instances as the same row when code and lower premium limit match.
GetHashCode Public Overrides Function GetHashCode() As Integer Hashes DiscountRate, the value this type uses as its identity key in keyed collections.
ToString Public Overrides Function ToString() As String Formats the instance as its discount rate.
GetPremiumSizeDiscount Public Shared Function GetPremiumSizeDiscount(ByVal inDataportal As IDataPortalInfo, ByVal inPremiumDiscountCode As String, ByVal inPremiumSize As Decimal) As clsPremiumSizeDiscount Retrieves the a premium-size discount band identified by the key values or effective-date criteria supplied by the caller.
Member Public Const Retrieve_SQL As String = "Select " & "PREMIUM_DISCOUNT_RANGE.PREMIUM_DISCOUNT_CODE as PremiumDiscountCode, " & "PREMIUM_DISCOUNT_RANGE.LOWER_PREMIUM_RANGE as PremiumRangeLowerLimit, " & "PREMIUM_DISCOUNT_RANGE.UPPER_PREMIUM_RANGE as PremiumRangeUpperLimit, " & "PREMIUM_DISCOUNT_RANGE.DISCOUNT_RATE as DiscountRate, " & "PREMIUM_DISCOUNT_RANGE.BASE_DISCOUNT_AMT as BaseDiscountAmount, " & "PREMIUM_DISCOUNT_RANGE.EXCLUDED_PREMIUM_AMT as ExcludedPremiumAmount" & " From " & "PREMIUM_DISCOUNT_RANGE" Base PREMIUM_DISCOUNT_RANGE select statement that criteria append range predicates to during retrieval.
PremiumDiscountCode Public Property PremiumDiscountCode() As String Discount schedule code used to select the applicable premium-size band.
PremiumAmount Public Property PremiumAmount() As Decimal Premium amount matched against the row lower and upper premium bounds.
New Public Sub New(ByVal inDataPortalInfo As IDataPortalInfo) Creates an empty BOF object shell that shared factory methods or retrieval logic can populate with a loaded row.
New Public Sub New(ByVal inDataPortalInfo As IDataPortalInfo, ByVal inPremiumDiscountCode As String, ByVal inPremiumAmount As Decimal) Creates a criteria-backed instance seeded with inPremiumDiscountCode, inPremiumAmount so the next retrieval runs in the caller's requested context.
## Inherited public members
Member Signature Purpose
--- --- ---
Rules Property Rules As clsRulesManager Owns the BOF rules manager used to evaluate registered validation logic.†
BeginEdit Sub BeginEdit() Opens an n-level edit session for the business object.†
CancelEdit Sub CancelEdit() Rolls back the active edit scope.†
ApplyEdit Sub ApplyEdit() Commits the active edit scope.†
Error ReadOnly Property Error As String Surfaces aggregate broken-rule text through IDataErrorInfo.†
## Behavioral notes
- The object layers convenience logic over the loaded row, such as equality keys, related-row resolution, or validation helpers.
## Constraints and usage notes
- Retrieve the row with the same keys and effective context that the caller will use later, because helper members derive additional data from that loaded state.
> Note: Statements marked with † are derived from dependency library
> documentation via the Legends CLI. They describe inherited behavior from the
> indicated origin library and should be verified if the dependency version changes.
## Sources
- Business\SAIF.Business.Policy.Rating\clsPremiumSizeDiscount.vb