Package ru.bitel.bgbilling.kernel.contract.autopayment.server.bean

# Class ContractAutopaymentManager

java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
ru.bitel.common.dao.AbstarctDaoConstant
ru.bitel.bgbilling.kernel.contract.autopayment.server.bean.ContractAutopaymentManager

All Implemented Interfaces:
  `AutoCloseable`

public class ContractAutopaymentManager extends ru.bitel.common.dao.AbstarctDaoConstant implements AutoCloseable

- ## Field Summary

  ### Fields inherited from class ru.bitel.common.dao.AbstarctDaoConstant

  `ERROR, SQL_ALL, SQL_AND, SQL_CALC_FOUND_ROWS, SQL_DELETE, SQL_DISTINCT, SQL_EQ, SQL_EQCS, SQL_FROM, SQL_GROUP, SQL_IN, SQL_INSERT, SQL_JOIN, SQL_LEFT_JOIN, SQL_LIMIT, SQL_NOT_IN, SQL_ON, SQL_ON_DUPLICATE_KEY_UPDATE, SQL_ORDER, SQL_SELECT, SQL_SET, SQL_UPDATE, SQL_VALUES, SQL_WHERE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ContractAutopaymentManager(Connection con, int moduleId)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `cleanForContract(int contractId)`
  `void`
  `close()`
  `protected ContractAutopayment`
  `getFromResultSet(ResultSet resultSet)`
  `static boolean`
  `isContractAutopaymentEnabled(Connection con, int moduleId, int contractId)`
  `boolean`
  `isEnabled(int contractId)`
  `boolean`
  `isEnabled(int contractId, Date onDate)`
  `void`
  `searchContractAutopayment(SearchResult<ContractAutopayment> searchResult, int contractId)`
  `boolean`
  `setEnabled(int contractId, boolean enabled, int userId)`

  ### Methods inherited from class ru.bitel.common.dao.AbstarctDaoConstant

  `getSQLOrder, psSetDate, psSetInt, psSetString, sqlLimit`

  ### Methods inherited from class ru.bitel.bgbilling.kernel.base.server.logger.BGLogger

  `error, error, error, getLogger, logError, logError, warn`

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

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

- ## Constructor Details

  - ### ContractAutopaymentManager

    public ContractAutopaymentManager(Connection con, int moduleId)

- ## Method Details

  - ### isEnabled

    public boolean isEnabled(int contractId) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### isEnabled

    public boolean isEnabled(int contractId, Date onDate) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### setEnabled

    public boolean setEnabled(int contractId, boolean enabled, int userId) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### searchContractAutopayment

    public void searchContractAutopayment(SearchResult<ContractAutopayment> searchResult, int contractId) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### cleanForContract

    public void cleanForContract(int contractId) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### getFromResultSet

    protected ContractAutopayment getFromResultSet(ResultSet resultSet) throws SQLException
    Throws:
      `SQLException`

  - ### close

    public void close() throws ru.bitel.bgbilling.common.BGException
    Specified by:
      `close` in interface `AutoCloseable`
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### isContractAutopaymentEnabled

    public static boolean isContractAutopaymentEnabled(Connection con, int moduleId, int contractId) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`