ru.bitel.bgbilling.modules.subscription.server.bean

## Class SubscriptionUtils

- java.lang.Object
- - ru.bitel.bgbilling.modules.subscription.server.bean.SubscriptionUtils

-     public class SubscriptionUtils
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SubscriptionUtils(java.sql.Connection con)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `addSubscriptionJob(Subscription subscription, int moduleId, java.util.Date jobDateTime, SubscriptionDao subscriptionDao)`
    `java.math.BigDecimal` | `getSubscriptionCost(java.util.List<bitel.billing.server.tariff.TariffModuleTree> tariffModuleTrees, java.util.Date initDate, int serviceId)`
    `java.util.List<bitel.billing.server.tariff.TariffModuleTree>` | `getSubscriptionTariffModuleTree(int contractId, java.util.Date initDate, int moduleId)`
    `void` | `subscriptionActivate(Subscription subscription, java.util.Date initDate, int moduleId, int userId, boolean changeBalance, SubscriptionDao subscriptionDao)`
    `void` | `subscriptionActivate(Subscription subscription, java.util.Date initDate, int moduleId, int userId, SubscriptionDao subscriptionDao)`
    `void` | `subscriptionActivateApply(int contractId, int subscriptionId, int serviceId, java.util.Date initDate, java.math.BigDecimal cost, PeriodWithTime newRegistrationPeriod, int moduleId, int userId, SubscriptionDao subscriptionDao, BalanceUtils balanceUtils)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SubscriptionUtils

          public SubscriptionUtils(java.sql.Connection con)

  - ### Method Detail

    - #### subscriptionActivate

          public void subscriptionActivate(Subscription subscription,
                                           java.util.Date initDate,
                                           int moduleId,
                                           int userId,
                                           SubscriptionDao subscriptionDao)
                                    throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### subscriptionActivate

          public void subscriptionActivate(Subscription subscription,
                                           java.util.Date initDate,
                                           int moduleId,
                                           int userId,
                                           boolean changeBalance,
                                           SubscriptionDao subscriptionDao)
                                    throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### addSubscriptionJob

          public long addSubscriptionJob(Subscription subscription,
                                         int moduleId,
                                         java.util.Date jobDateTime,
                                         SubscriptionDao subscriptionDao)
                                  throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### subscriptionActivateApply

          public void subscriptionActivateApply(int contractId,
                                                int subscriptionId,
                                                int serviceId,
                                                java.util.Date initDate,
                                                java.math.BigDecimal cost,
                                                PeriodWithTime newRegistrationPeriod,
                                                int moduleId,
                                                int userId,
                                                SubscriptionDao subscriptionDao,
                                                BalanceUtils balanceUtils)
                                         throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### getSubscriptionTariffModuleTree

          public java.util.List<bitel.billing.server.tariff.TariffModuleTree> getSubscriptionTariffModuleTree(int contractId,
                                                                                                              java.util.Date initDate,
                                                                                                              int moduleId)

    - #### getSubscriptionCost

          public java.math.BigDecimal getSubscriptionCost(java.util.List<bitel.billing.server.tariff.TariffModuleTree> tariffModuleTrees,
                                                          java.util.Date initDate,
                                                          int serviceId)