Class ServiceObjectManager

java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
ru.bitel.bgbilling.common.dao.AbstarctDaoConstant
ru.bitel.bgbilling.modules.npay.server.bean.object.ServiceObjectManager

public class ServiceObjectManager extends ru.bitel.bgbilling.common.dao.AbstarctDaoConstant
  • Field Summary

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

    con, ERROR, fields, moduleId, 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, tableName
  • Constructor Summary

    Constructors
    Constructor
    Description
    ServiceObjectManager(Connection con, int moduleId)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    deleteServiceObject(int contractId)
     
    void
    deleteServiceObject(int id, int userId)
    Удаление абонплаты по коду записи в БД.
    void
    deleteServiceObject(int contractId, int entityModuleId, int entityId)
     
    Возвращает абонплату по коду записи в БД.
    getServiceObjectList(int contractId, int objectId, int entityMid, int entityId)
    Возвращает список абонплат договора.
    getServiceObjectList(int contractId, int objectId, int entityModuleId, int entityId, boolean hiddenClosed)
    Возвращает список абонплат договора.
    getServiceObjectList(int contractId, int serviceId, Period period)
     
    getServiceObjectList(int contractId, Date date)
    Возвращает список абонплат договора.
    Возвращает абонплаты объекта.
    getServiceObjectLogList(int contractId, int serviceObjectId)
     
    void
    moveContractSevice(ServiceObject contractService, int cidFrom, int cidTo, int objectTo, int userId)
    Перенос абонплаты на другой договор.
    void
    resetServiceObject(int objectId)
     
    void
    Обновление либо добавление абонплаты договора.
    void
    wrapContractSevice(ServiceObject contractService, int cidTo, int objectTo, int entityToId, int userId, Date dateClose, Date dateOpen)
    Разрыв абонплаты на два договора.

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

    getPeriod, getSQLOrder, getTableName, psSetDate, psSetInt, psSetString

    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

    • ServiceObjectManager

      public ServiceObjectManager(Connection con, int moduleId)
  • Method Details

    • getServiceObject

      public ServiceObject getServiceObject(int id) throws SQLException
      Возвращает абонплату по коду записи в БД.
      Parameters:
      id - код
      Returns:
      Throws:
      SQLException
    • updateServiceObject

      public void updateServiceObject(ServiceObject value) throws SQLException
      Обновление либо добавление абонплаты договора. Добавление новой записи производится value.getId() invalid input: '<'= 0.
      Parameters:
      value - добавляемая либо обновляемая абонплата
      Throws:
      SQLException
    • deleteServiceObject

      public void deleteServiceObject(int id, int userId) throws SQLException
      Удаление абонплаты по коду записи в БД.
      Parameters:
      id -
      Throws:
      SQLException
    • deleteServiceObject

      public void deleteServiceObject(int contractId) throws SQLException
      Throws:
      SQLException
    • deleteServiceObject

      public void deleteServiceObject(int contractId, int entityModuleId, int entityId) throws SQLException
      Throws:
      SQLException
    • resetServiceObject

      public void resetServiceObject(int objectId) throws SQLException
      Throws:
      SQLException
    • getServiceObjectListForObject

      public List<ServiceObject> getServiceObjectListForObject(int oid) throws ru.bitel.bgbilling.common.BGException
      Возвращает абонплаты объекта.
      Parameters:
      oid - код объекта
      Returns:
      Throws:
      ru.bitel.bgbilling.common.BGException
    • getServiceObjectList

      public List<ServiceObject> getServiceObjectList(int contractId, Date date) throws SQLException
      Возвращает список абонплат договора.
      Parameters:
      contractId - код договора
      date - дата, которую должны включать период выбираемых абонплат. Игнорируется при null
      Returns:
      Throws:
      SQLException
    • getServiceObjectList

      public List<ServiceObject> getServiceObjectList(int contractId, int serviceId, Period period) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • getServiceObjectList

      public List<ServiceObject> getServiceObjectList(int contractId, int objectId, int entityMid, int entityId) throws SQLException
      Возвращает список абонплат договора. Фильтры по entityId, entityId добавляются в запрос, только при неотрицательных значениях. Фильтр по objectId добавлется только при положительном значении.
      Parameters:
      contractId - код договора
      objectId - код объекта
      entityMid - код модуля, к сущности которого привязана абонплата
      entityId - код сущности модуля, к которой привязана абонплата
      Returns:
      Throws:
      SQLException
    • getServiceObjectList

      public List<ServiceObject> getServiceObjectList(int contractId, int objectId, int entityModuleId, int entityId, boolean hiddenClosed) throws SQLException
      Возвращает список абонплат договора. Фильтры по entityId, entityId добавляются в запрос, только при неотрицательных значениях. Фильтр по objectId добавлется только при положительном значении.
      Parameters:
      contractId - код договора
      objectId - код объекта
      entityModuleId - код модуля, к сущности которого привязана абонплата
      entityId - код сущности модуля, к которой привязана абонплата
      date - дата, которую должны включать периоды выбираемых абонплат
      Returns:
      Throws:
      SQLException
    • moveContractSevice

      public void moveContractSevice(ServiceObject contractService, int cidFrom, int cidTo, int objectTo, int userId) throws Exception
      Перенос абонплаты на другой договор.
      Parameters:
      contractService -
      cidFrom -
      cidTo -
      objectTo -
      userId -
      Throws:
      Exception
    • wrapContractSevice

      public void wrapContractSevice(ServiceObject contractService, int cidTo, int objectTo, int entityToId, int userId, Date dateClose, Date dateOpen) throws Exception
      Разрыв абонплаты на два договора.
      Parameters:
      contractService -
      cidTo -
      userId -
      dFrom -
      Throws:
      Exception
    • getServiceObjectLogList

      public List<ServiceObject> getServiceObjectLogList(int contractId, int serviceObjectId) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException